diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..9a6a19f --- /dev/null +++ b/.clang-format @@ -0,0 +1,20 @@ +# For more options, open this url: https://clang.llvm.net.cn/docs/ClangFormatStyleOptions.html +--- +BasedOnStyle: Microsoft +IndentWidth: 4 +UseTab: Never +TabWidth: 4 +ColumnLimit: 0 +--- +Language: Cpp +AccessModifierOffset: -4 +NamespaceIndentation: All +FixNamespaceComments: false +BreakBeforeBraces: Linux +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AllowShortBlocksOnASingleLine: true +IndentCaseLabels: true +SortIncludes: false +AlignConsecutiveMacros: AcrossEmptyLines +AlignConsecutiveAssignments: Consecutive diff --git a/.eide/eide.yml b/.eide/eide.yml new file mode 100644 index 0000000..aab9b90 --- /dev/null +++ b/.eide/eide.yml @@ -0,0 +1,73 @@ +version: "4.1" +name: Stm32F10xTmp +type: ARM +deviceName: null +packDir: null +srcDirs: [] +virtualFolder: + name: + files: [] + folders: [] +dependenceList: [] +outDir: Output +miscInfo: + uid: d92a06a9fb4c340402d39197c79d1252 +targets: + Debug: + cppPreprocessAttrs: + defineList: [] + incList: [] + libList: [] + excludeList: [] + settings: + debugger: cortex-debug + toolchain: GCC + toolchainConfigMap: + GCC: + archExtensions: "" + cpuType: Cortex-M3 + floatingPointHardware: none + options: + version: 5 + afterBuildTasks: [] + asm-compiler: + ASM_FLAGS: "" + beforeBuildTasks: [] + c/cpp-compiler: + CXX_FLAGS: "" + C_FLAGS: "" + language-c: c11 + language-cpp: c++11 + one-elf-section-per-data: true + one-elf-section-per-function: true + optimization: level-debug + warnings: all-warnings + global: + $float-abi-type: hard + misc-control: "" + not-use-syscalls: true + output-debug-info: enable + use-newlib-nano: true + linker: + $outputTaskExcludes: + - .bin + LD_FLAGS: "" + LIB_FLAGS: -lm + output-format: elf + remove-unused-input-sections: true + scatterFilePath: .lds + storageLayout: + RAM: [] + ROM: [] + useCustomScatterFile: true + uploadConfigMap: + JLink: + baseAddr: "" + bin: "" + cpuInfo: + cpuName: "null" + vendor: "null" + otherCmds: "" + proType: 1 + speed: 8000 + uploader: JLink diff --git a/.eide/files.options.yml b/.eide/files.options.yml new file mode 100644 index 0000000..269f4d6 --- /dev/null +++ b/.eide/files.options.yml @@ -0,0 +1,20 @@ +########################################################################################## +# Append Compiler Options For Source Files +########################################################################################## + +# syntax: +# : +# For get pattern syntax, please refer to: https://www.npmjs.com/package/micromatch +# +# examples: +# 'main.cpp': --cpp11 -Og ... +# 'src/*.c': -gnu -O2 ... +# 'src/lib/**/*.cpp': --cpp11 -Os ... +# '!Application/*.c': -O0 +# '**/*.c': -O2 -gnu ... + +version: "2.1" +options: + Debug: + files: {} + virtualPathFiles: {} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..3e192b9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,40 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "${command:eide.project.build}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "flash", + "type": "shell", + "command": "${command:eide.project.uploadToDevice}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "build and flash", + "type": "shell", + "command": "${command:eide.project.buildAndFlash}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "rebuild", + "type": "shell", + "command": "${command:eide.project.rebuild}", + "group": "build", + "problemMatcher": [] + }, + { + "label": "clean", + "type": "shell", + "command": "${command:eide.project.clean}", + "group": "build", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/Stm32F10xTmp.code-workspace b/Stm32F10xTmp.code-workspace new file mode 100644 index 0000000..c1f8cb2 --- /dev/null +++ b/Stm32F10xTmp.code-workspace @@ -0,0 +1,47 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "clangd.arguments": [ + "--header-insertion=never" + ], + "files.autoGuessEncoding": true, + "C_Cpp.default.configurationProvider": "cl.eide", + "C_Cpp.errorSquiggles": "disabled", + "files.associations": { + ".eideignore": "ignore", + "*.a51": "a51", + "*.h": "c", + "*.c": "c", + "*.hxx": "cpp", + "*.hpp": "cpp", + "*.c++": "cpp", + "*.cpp": "cpp", + "*.cxx": "cpp", + "*.cc": "cpp" + }, + "[yaml]": { + "editor.insertSpaces": true, + "editor.tabSize": 4, + "editor.autoIndent": "advanced" + } + }, + "extensions": { + "recommendations": [ + "cl.eide", + "keroc.hex-fmt", + "xiaoyongdong.srecord", + "hars.cppsnippets", + "zixuanwang.linkerscript", + "redhat.vscode-yaml", + "IBM.output-colorizer", + "cschlosser.doxdocgen", + "ms-vscode.vscode-serial-monitor", + "dan-c-underwood.arm", + "marus25.cortex-debug" + ] + } +} \ No newline at end of file