Added rpi-pico-sdk

This commit is contained in:
AlexanderHD27
2024-09-10 15:36:38 +02:00
parent 8b97a1853d
commit 29af5335f5
25 changed files with 3354 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/include/**",
"${workspaceFolder}/lib/pico-sdk/lib/tinyusb/src"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-gcc-arm",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}

31
motor-control/firmware/.vscode/launch.json vendored Executable file
View File

@@ -0,0 +1,31 @@
{
// 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": "Pico: Debug External OpenOCD",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"preLaunchTask": "Pico: flash freeRTOS_test",
"type": "cortex-debug",
"servertype": "external",
"gdbPath" : "gdb-multiarch",
"gdbTarget": "localhost:3333",
"device": "RP2040",
"configFiles": [
"interface/cmsis-dap.cfg",
"target/rp2040.cfg"
],
"svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
"runToEntryPoint": "main",
"postRestartCommands": [
"continue"
]
}
]
}

View File

@@ -0,0 +1,78 @@
{
"cSpell.words": [
"apcsw",
"apreg",
"apsel",
"arrayname",
"baseaddr",
"Bhaskra",
"bitwidth",
"BOOTSEL",
"cget",
"channellist",
"charmsg",
"clkdiv",
"cpnum",
"deassert",
"deasserted",
"deasserting",
"doxygen",
"dpreg",
"drawio",
"dreq",
"eabi",
"eventlist",
"gpio",
"helptext",
"jtag",
"lindex",
"memaccess",
"microcontroller",
"multiarch",
"multicore",
"Pico",
"picoprobe",
"pindirs",
"pinout",
"pregen",
"resexit",
"semihosting",
"srst",
"struct",
"targetname",
"TPIU",
"trst",
"UART",
"virt",
"waitstate",
"watchpoint",
"watchpoints",
"wready"
],
"cmake.sourceDirectory": "/home/alexander/Projects/gobot/motor-control/firmware",
"cmake.buildDirectory": "${workspaceFolder}/firmware/build",
"cmake.configureOnOpen": true,
"files.associations": {
"timer.h": "c",
"stdlib.h": "c",
"stdio.h": "c",
"string.h": "c",
"assert.h": "c",
"gen.h": "c",
"multicore.h": "c",
"pio.h": "c",
"freertos.h": "c",
"random": "c",
"queue.h": "c",
"string_view": "c",
"instructionformat.h": "c",
"includeglobals.h": "c",
"dacconfig.h": "c",
"freertosconfig.h": "c"
},
"cortex-debug.variableUseNaturalFormat": false,
"todo-tree.filtering.ignoreGitSubmodules": true,
"todo-tree.tree.showBadges": true,
"terminal.integrated.scrollback": 10000,
"C_Cpp.refactoring.includeHeader": "always",
}

View File

@@ -0,0 +1,171 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cmake",
"label": "CMake: build main",
"command": "build",
"targets": [
"main"
],
"options": {
"cwd": "${workspaceRoot}"
},
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
},
{
"type": "shell",
"label": "Pico: flash main",
"command": [
"scripts/flash.exp",
"${workspaceRoot}/build/bin/main.elf"
],
"options": {
"cwd": "${workspaceRoot}"
},
"group": "test",
"dependsOn": ["CMake: build main"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
},
{
"type": "cmake",
"label": "CMake: build usb_test",
"command": "build",
"targets": [
"usb_test"
],
"options": {
"cwd": "${workspaceRoot}"
},
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
},
{
"type": "shell",
"label": "Pico: flash usb_test",
"command": [
"scripts/flash.exp",
"${workspaceRoot}/build/bin/usb_test.elf"
],
"options": {
"cwd": "${workspaceRoot}"
},
"group": "test",
"dependsOn": ["CMake: build usb_test"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
},
{
"type": "cmake",
"label": "CMake: build freeRTOS_test",
"command": "build",
"targets": [
"freeRTOS_test"
],
"options": {
"cwd": "${workspaceRoot}"
},
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
},
{
"type": "shell",
"label": "Pico: flash freeRTOS_test",
"command": [
"scripts/flash.exp",
"${workspaceRoot}/build/bin/freeRTOS_test.elf"
],
"options": {
"cwd": "${workspaceRoot}"
},
"group": "test",
"dependsOn": ["CMake: build freeRTOS_test"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
},
{
"type": "shell",
"label": "Pico: launch openocd",
"command": [
"scripts/launch_openocd.sh"
],
"options": {
"cwd": "${workspaceRoot}"
},
"isBackground": true
},
{
"type": "cmake",
"label": "CMake: Clean",
"command": "clean"
},
{
"type": "cmake",
"label": "CMake: Clean Rebuild",
"command": "cleanRebuild"
},
{
"type": "cmake",
"label": "CMake: Configure",
"command": "configure"
},
{
"type": "shell",
"label": "Doxygen: Generate Docs",
"command": [
"doxygen ./docs/Doxyfile",
],
"options": {
"cwd": "${workspaceRoot}"
}
}
]
}