From 9559c516d1066edacfedece1e8e6827925914ad4 Mon Sep 17 00:00:00 2001 From: Johannes Paehr Date: Sun, 21 Dec 2025 15:57:50 +0100 Subject: [PATCH] added readme --- .gitignore | 44 +++++++++++++++++++++++++ .vscode/c_cpp_properties.json | 16 +++++++++ .vscode/extensions.json | 19 +++++++++++ .vscode/launch.json | 61 ++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 62 +++++++++++++++++++++++++++++++++++ README.md | 4 +++ 6 files changed, 206 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36d0c13 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Linker files +*.ilk + +# Debugger Files +*.pdb + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# debug information files +*.dwo + +# ignore build Files +build/ \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..fecd703 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,16 @@ +{ + "version": 4, + "configurations": [ + { + /** + * ms-vscode.cmake-tools plugin should be installed. + * + * It provides data for C/C++ plugin, + * such as include paths, browse paths, defines, etc. + */ + "name": "STM32", + "configurationProvider": "ms-vscode.cmake-tools", + "intelliSenseMode": "${default}" + } + ] +} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..10b3a6d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,19 @@ +{ + "recommendations": [ + "ms-vscode.cpptools", // (dependencies to ms-vscode.cpptools-extension-pack) + "ms-vscode.cpptools-themes", // (dependencies to ms-vscode.cpptools-extension-pack) + "ms-vscode.cmake-tools", // (dependencies to ms-vscode.cpptools-extension-pack) + "twxs.cmake", // (dependencies to ms-vscode.cpptools-extension-pack) + "ms-vscode.cpptools-extension-pack", // Provides CMake and C++ file coloring, completion & support + "dan-c-underwood.arm", // Provides syntax highlighting for the Arm Assembly language + "zixuanwang.linkerscript", // Provides syntax highlighting for linker scripts + "ms-vscode.hexeditor", // Provides hex editor fo viewing & anipulating files in their raw hexadecimal representation + "trond-snekvik.gnu-mapfiles", // Provides syntax highlighting and symbol listing for GNU linker .map files + "jeff-hykin.better-cpp-syntax", // Provides syntax highlighting for C++ + "marus25.cortex-debug", // Provides debug support on Arm Cortex-M + "mcu-debug.debug-tracker-vscode", // Dependencies to "marus25.cortex-debug" + "mcu-debug.memory-view", // Dependencies to "marus25.cortex-debug" + "mcu-debug.peripheral-viewer", // Dependencies to "marus25.cortex-debug" + "mcu-debug.rtos-views" // Dependencies to "marus25.cortex-debug" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..c539064 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,61 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Build & Debug Microcontroller - ST-Link", + "cwd": "${workspaceFolder}", + "type": "cortex-debug", + "executable": "${command:cmake.launchTargetPath}", + // Let CMake extension decide executable: "${command:cmake.launchTargetPath}" + // Or fixed file path: "${workspaceFolder}/path/to/filename.elf" + "request": "launch", + "servertype": "stlink", + "device": "STM32G030F6Px", //MCU used + "interface": "swd", + "serialNumber": "", //Set ST-Link ID if you use multiple at the same time + "runToEntryPoint": "main", + "svdFile": "${config:STM32VSCodeExtension.cubeCLT.path}/STMicroelectronics_CMSIS_SVD/STM32G030.svd", + "v1": false, //Change it depending on ST Link version + "serverpath": "${config:STM32VSCodeExtension.cubeCLT.path}/STLink-gdb-server/bin/ST-LINK_gdbserver", + "stm32cubeprogrammer":"${config:STM32VSCodeExtension.cubeCLT.path}/STM32CubeProgrammer/bin", + "stlinkPath": "${config:STM32VSCodeExtension.cubeCLT.path}/STLink-gdb-server/bin/ST-LINK_gdbserver", + "armToolchainPath": "${config:STM32VSCodeExtension.cubeCLT.path}/GNU-tools-for-STM32/bin", + "gdbPath":"${config:STM32VSCodeExtension.cubeCLT.path}/GNU-tools-for-STM32/bin/arm-none-eabi-gdb", + "serverArgs": [ + "-m","0", + ], + //"preLaunchTask": "Build + Flash" + /* If you use external loader, add additional arguments */ + //"serverArgs": ["--extload", "path/to/ext/loader.stldr"], + }, + { + "name": "Attach to Microcontroller - ST-Link", + "cwd": "${workspaceFolder}", + "type": "cortex-debug", + "executable": "${command:cmake.launchTargetPath}", + // Let CMake extension decide executable: "${command:cmake.launchTargetPath}" + // Or fixed file path: "${workspaceFolder}/path/to/filename.elf" + "request": "attach", + "servertype": "stlink", + "device": "STM32G030F6Px", //MCU used + "interface": "swd", + "serialNumber": "", //Set ST-Link ID if you use multiple at the same time + "runToEntryPoint": "main", + "svdFile": "${config:STM32VSCodeExtension.cubeCLT.path}/STMicroelectronics_CMSIS_SVD/STM32G030.svd", + "v1": false, //Change it depending on ST Link version + "serverpath": "${config:STM32VSCodeExtension.cubeCLT.path}/STLink-gdb-server/bin/ST-LINK_gdbserver", + "stm32cubeprogrammer":"${config:STM32VSCodeExtension.cubeCLT.path}/STM32CubeProgrammer/bin", + "stlinkPath": "${config:STM32VSCodeExtension.cubeCLT.path}/STLink-gdb-server/bin/ST-LINK_gdbserver", + "armToolchainPath": "${config:STM32VSCodeExtension.cubeCLT.path}/GNU-tools-for-STM32/bin", + "gdbPath":"${config:STM32VSCodeExtension.cubeCLT.path}/GNU-tools-for-STM32/bin/arm-none-eabi-gdb", + "serverArgs": [ + "-m","0", + ], + /* If you use external loader, add additional arguments */ + //"serverArgs": ["--extload", "path/to/ext/loader.stldr"], + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..ce3b438 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,62 @@ +{ + "version": "2.0.0", + "windows": { + "options": { + "shell": { + "executable": "cmd.exe", + "args": ["/d", "/c"] + } + } + }, + "tasks": [ + { + "type": "shell", + "label": "CubeProg: Flash project (SWD)", + "command": "STM32_Programmer_CLI", + "args": [ + "--connect", + "port=swd", + "--download", + "${command:cmake.launchTargetPath}", + // Let CMake extension decide executable: "${command:cmake.launchTargetPath}", + "-hardRst", // Hardware reset - if rst pin is connected + "-rst", // Software reset (backup) + "--start" // Start execution + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [] + }, + { + "label": "Build + Flash", + "dependsOrder": "sequence", + "dependsOn": [ + "CMake: clean rebuild", + "CubeProg: Flash project (SWD)", + ] + }, + { + "type": "cmake", + "label": "CMake: clean rebuild", + "command": "cleanRebuild", + "targets": [ + "all" + ], + "preset": "${command:cmake.activeBuildPresetName}", + "group": "build", + "problemMatcher": [], + "detail": "CMake template clean rebuild task" + }, + { + "type": "shell", + "label": "CubeProg: List all available communication interfaces", + "command": "STM32_Programmer_CLI", + "args": ["--list"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [] + } + ] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ba0d69 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Firmware for Slotcar Controller + +- based on STM32g30 +- TLE5012b \ No newline at end of file