Vladimir N. Shilov 2 лет назад
Родитель
Сommit
80f367e3e4
6 измененных файлов с 223 добавлено и 0 удалено
  1. 35 0
      .vscode/c_cpp_properties.json
  2. 23 0
      .vscode/dryrun.log
  3. 101 0
      .vscode/launch.json
  4. 16 0
      .vscode/settings.json
  5. 40 0
      .vscode/tasks.json
  6. 8 0
      Elektronika-12.code-workspace

+ 35 - 0
.vscode/c_cpp_properties.json

@@ -0,0 +1,35 @@
+{
+    "version": 4,
+    "configurations": [
+        {
+            "name": "Elektronika-12",
+            "defines": [
+                "STM32F030x6="
+            ],
+            "includePath": [
+                "${workspaceRoot}/inc",
+                "${workspaceRoot}/MCU/CMSIS/Include",
+                "${workspaceRoot}/MCU/CMSIS/Device/ST/STM32F0xx/Include",
+                "C:/MCU/gcc-arm/arm-none-eabi/include"
+            ],
+            "compilerPath": "C:/MCU/gcc-arm/bin/arm-none-eabi-gcc.exe",
+            "forcedInclude": [],
+            "cStandard": "gnu17",
+            "cppStandard": "c++17",
+            "intelliSenseMode": "windows-gcc-arm",
+            "configurationProvider": "ms-vscode.makefile-tools",
+            "browse": {
+                "path": [
+                    "${workspaceRoot}/inc",
+                    "${workspaceRoot}/MCU/CMSIS/Include",
+                    "${workspaceRoot}/MCU/CMSIS/Device/ST/STM32F0xx/Include",
+                    "C:/MCU/gcc-arm/arm-none-eabi/include",
+                    "C:/MCU/gcc-arm/lib/gcc/arm-none-eabi/10.3.1/include",
+                    "C:/MCU/gcc-arm/lib/gcc/arm-none-eabi/10.3.1/include-fixed"
+                ],
+                "limitSymbolsToIncludedHeaders": true,
+                "databaseFilename": "${workspaceRoot}/.vscode/browse.vc.db"
+            }
+        }
+    ]
+}

+ 23 - 0
.vscode/dryrun.log

@@ -0,0 +1,23 @@
+make.exe --dry-run --always-make --keep-going --print-directory
+make: Entering directory '/d/Projects/Elektronika-12'
+ 
+mkdir -p build
+echo Compiling: src/main.c
+arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 -mtune=cortex-m0 -DSTM32F030 -DSTM32F030x6 -I./inc -IMCU/CMSIS/Include -IMCU/CMSIS/Device/ST/STM32F0xx/Include -Os -ffunction-sections -fdata-sections -fomit-frame-pointer -falign-functions=16 -fno-strict-aliasing -ffast-math -msoft-float -mfloat-abi=soft -MD -MP -MF .dep/main.o.d -std=gnu99 -Wall -pedantic src/main.c -o build/main.o
+echo Compiling: src/board.c
+arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 -mtune=cortex-m0 -DSTM32F030 -DSTM32F030x6 -I./inc -IMCU/CMSIS/Include -IMCU/CMSIS/Device/ST/STM32F0xx/Include -Os -ffunction-sections -fdata-sections -fomit-frame-pointer -falign-functions=16 -fno-strict-aliasing -ffast-math -msoft-float -mfloat-abi=soft -MD -MP -MF .dep/board.o.d -std=gnu99 -Wall -pedantic src/board.c -o build/board.o
+ 
+echo Compiling: src/rtos.c
+arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 -mtune=cortex-m0 -DSTM32F030 -DSTM32F030x6 -I./inc -IMCU/CMSIS/Include -IMCU/CMSIS/Device/ST/STM32F0xx/Include -Os -ffunction-sections -fdata-sections -fomit-frame-pointer -falign-functions=16 -fno-strict-aliasing -ffast-math -msoft-float -mfloat-abi=soft -MD -MP -MF .dep/rtos.o.d -std=gnu99 -Wall -pedantic src/rtos.c -o build/rtos.o
+echo Compiling: MCU/system_stm32f0xx.c
+arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 -mtune=cortex-m0 -DSTM32F030 -DSTM32F030x6 -I./inc -IMCU/CMSIS/Include -IMCU/CMSIS/Device/ST/STM32F0xx/Include -Os -ffunction-sections -fdata-sections -fomit-frame-pointer -falign-functions=16 -fno-strict-aliasing -ffast-math -msoft-float -mfloat-abi=soft -MD -MP -MF .dep/system_stm32f0xx.o.d -std=gnu99 -Wall -pedantic MCU/system_stm32f0xx.c -o build/system_stm32f0xx.o
+echo Compiling asm: MCU/startup_stm32f030x6.s
+arm-none-eabi-gcc -x assembler-with-cpp -c -mthumb -mcpu=cortex-m0 -mtune=cortex-m0 -DSTM32F030 -DSTM32F030x6 -I./inc -IMCU/CMSIS/Include -IMCU/CMSIS/Device/ST/STM32F0xx/Include -Os -ffunction-sections -fdata-sections -fomit-frame-pointer -falign-functions=16 -fno-strict-aliasing -ffast-math -msoft-float -mfloat-abi=soft -MD -MP -MF .dep/startup_stm32f030x6.o.d -std=gnu99 -Wall -pedantic MCU/startup_stm32f030x6.s -o build/startup_stm32f030x6.o
+echo Linking: build/El12.elf
+arm-none-eabi-gcc build/main.o build/board.o build/rtos.o build/system_stm32f0xx.o build/startup_stm32f030x6.o  -mthumb -mcpu=cortex-m0 -specs=nano.specs -TMCU/STM32F030K6_FLASH.ld -lc -lm -lnosys -Wl,-Map=build/El12.map,--cref -Wl,--gc-sections -o build/El12.elf
+echo '--------------------------------------------------------------------'
+arm-none-eabi-size build/El12.elf
+rm -f build/*.o
+arm-none-eabi-objcopy -O ihex build/El12.elf build/El12.hex
+make: Leaving directory '/d/Projects/Elektronika-12'
+ 

+ 101 - 0
.vscode/launch.json

@@ -0,0 +1,101 @@
+// Configure debug launch settings
+// Feel free to copy these and modify them for your debugger and MCU
+{
+    "version": "0.2.0",
+    "projectName": "Elektronika-12",
+    "configurations": [
+    
+        {
+            "name": "JLink launch",
+            "cwd": "${workspaceRoot}",
+            "executable": "${workspaceRoot}/build/El12.elf",
+            "request": "launch",
+            "type": "cortex-debug",
+            "servertype": "jlink",
+            "device": "STM32F030K6",
+            "interface": "swd",
+            "runToMain": true, // else it starts at reset handler - not interested
+            "preLaunchTask": "Build all", // configured in tasks.json
+            // "preLaunchCommands": ["Build all"], // you can execute command instead of task
+            "svdFile": "${workspaceRoot}/MCU/STM32F030.svd", // Include svd to watch device peripherals
+            "swoConfig":
+            {
+                "enabled": true,
+                "cpuFrequency": 480000000,
+                "swoFrequency": 4000000,
+                "source": "probe",
+                "decoders":
+                [
+                    {
+                        "label": "ITM port 0 output",
+                        "type": "console",
+                        "port": 0,
+                        "showOnStartup": true,
+                        "encoding": "ascii"
+                    }
+                ]
+            }
+        },
+        {
+            "name": "JLink attach",
+            "cwd": "${workspaceRoot}",
+            "executable": "${workspaceRoot}/build/El12.elf",
+            "request": "attach",
+            "type": "cortex-debug",
+            "servertype": "jlink",
+            "device": "STM32F030K6",
+            "interface": "swd",
+            "runToMain": true, // else it starts at reset handler - not interested
+            "preLaunchTask": "Build all", // configured in tasks.json
+            // "preLaunchCommands": ["Build all"], // you can execute command instead of task
+            "svdFile": "${workspaceRoot}/MCU/STM32F030.svd", // Include svd to watch device peripherals
+            "swoConfig":
+            {
+                "enabled": true,
+                "cpuFrequency": 480000000,
+                "swoFrequency": 4000000,
+                "source": "probe",
+                "decoders":
+                [
+                    {
+                        "label": "ITM port 0 output",
+                        "type": "console",
+                        "port": 0,
+                        "showOnStartup": true,
+                        "encoding": "ascii"
+                    }
+                ]
+            }
+        },
+        {
+            "name": "STlink launch",
+            "cwd": "${workspaceRoot}",
+            "executable": "${workspaceRoot}/build/El12.elf",
+            "request": "launch",
+            "type": "cortex-debug",
+            "servertype": "stutil",
+            "device": "STM32F030K6",
+            "interface": "swd",
+            "runToMain": true, // else it starts at reset handler - not interested
+            "preLaunchTask": "Build all", // configured in tasks.json
+            // "preLaunchCommands": ["Build all"], // you can execute command instead of task
+            "svdFile": "${workspaceRoot}/MCU/STM32F030.svd", // Include svd to watch device peripherals
+            "swoConfig": {} // currently (v1.7.0) not supported
+        },
+        {
+            "name": "STlink attach",
+            "cwd": "${workspaceRoot}",
+            "executable": "${workspaceRoot}/build/El12.elf",
+            "request": "attach",
+            "type": "cortex-debug",
+            "servertype": "stutil",
+            "device": "STM32F030K6",
+            "interface": "swd",
+            "runToMain": true, // else it starts at reset handler - not interested
+            "preLaunchTask": "Build all", // configured in tasks.json
+            // "preLaunchCommands": ["Build all"], // you can execute command instead of task
+            "svdFile": "${workspaceRoot}/MCU/STM32F030.svd", // Include svd to watch device peripherals
+            "swoConfig": {} // currently (v1.7.0) not supported
+        },
+    ]
+}

+ 16 - 0
.vscode/settings.json

@@ -0,0 +1,16 @@
+{
+    "cortex-debug.armToolchainPath": "C:/MCU/gcc-arm/bin",
+    "cortex-debug.gdbPath": "C:/MCU/gcc-arm/bin/arm-none-eabi-gdb.exe",
+    "cortex-debug.openocdPath": "C:/MCU/OpenOCD/bin/openocd.exe",
+    "cortex-debug.JLinkGDBServerPath": "C:/MCU/SEGGER/JLink/JLinkGDBServerCL.exe",
+    "cortex-debug.stutilPath": "C:/MCU/STMicroelectronics/stlink/bin/st-util.exe",
+    "cortex-debug.stlinkPath": "C:/MCU/STMicroelectronics/STLinkGDB.exe",
+    "cortex-debug.stm32cubeprogrammer": ""
+    "makefile.launchConfigurations": [
+        {
+            "cwd": "${workspaceRoot}/build",
+            "binaryPath": "${workspaceRoot}/build/El12.elf",
+            "binaryArgs": []
+        }
+    ]
+}

+ 40 - 0
.vscode/tasks.json

@@ -0,0 +1,40 @@
+{
+    "tasks": [
+        {
+            "label": "Build all",
+            "group": "build",
+            "type": "shell",
+            "command": "make",
+            "args": ["all", "-j4"]
+        },
+        {
+            "label": "ReBuild",
+            "group": "build",
+            "type": "shell",
+            "command": "make",
+            "args": ["clean", "all"]
+        },
+        {
+            "label": "Clean all",
+            "group": "build",
+            "type": "shell",
+            "command": "make",
+            "args": ["clean"]
+        },
+        {
+            "label": "JFlash",
+            "group": "build",
+            "type": "shell",
+            "command": "make",
+            "args": ["-j4","jflash"]
+        },
+        {
+            "label": "STflash",
+            "group": "build",
+            "type": "shell",
+            "command": "make",
+            "args": ["-j4","stflash"]
+        }
+    ],
+    "version": "2.0.0"
+}

+ 8 - 0
Elektronika-12.code-workspace

@@ -0,0 +1,8 @@
+{
+	"folders": [
+		{
+			"path": "."
+		}
+	],
+	"settings": {}
+}