Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Blinky.mp4
Binary file not shown.
Binary file added Menuconfig.mkv
Binary file not shown.
25 changes: 25 additions & 0 deletions app/.vscode/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
{
"key": "ctrl+shift+b",
"command": "workbench.action.tasks.build"
},
{
"key": "ctrl+shift+r",
"command": "workbench.action.tasks.runTask",
"args": "Build"
},
{
"key": "ctrl+shift+k",
"command": "workbench.action.tasks.runTask",
"args": "Clean"
},
{
"key": "ctrl+shift+f",
"command": "workbench.action.tasks.runTask",
"args": "Flash"
},
{
"key": "ctrl+shift+i",
"command": "C_Cpp.ResetDatabase"
}
]
61 changes: 61 additions & 0 deletions app/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug STM32 (NUCLEO-F303RE)",
"type": "cortex-debug",
"request": "launch",
"svdFile": "${workspaceFolder}/boards/STM32F303.svd",
"preLaunchTask": "Compile STM32",
"cwd": "${workspaceFolder}",
"executable": "${workspaceFolder}/build-nucleo_f303re/zephyr/zephyr.elf",
"servertype": "openocd",
"device": "STM32F303RE",
"interface": "swd",
"gdbPath": "${env:HOME}/zephyr-course/sdk/zephyr-sdk-1.0.1/gnu/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
"toolchainPrefix": "arm-zephyr-eabi",
"serverpath": "${env:HOME}/zephyr-course/sdk/zephyr-sdk-1.0.1/hosttools/sysroots/x86_64-pokysdk-linux/usr/bin/openocd",
"configFiles": [
"interface/stlink.cfg",
"target/stm32f3x.cfg"
],
"runToEntryPoint": "main",
"preLaunchCommands": [
"monitor reset halt"
],
"postLaunchCommands": [
"monitor reset halt",
"load"
],
"showDevDebugOutput": "raw"
},
{
"name": "Debug ESP32 (J-Link)",
"type": "cortex-debug",
"request": "launch",
"svdFile": "${workspaceFolder}/boards/esp32.svd",
"preLaunchTask": "Compile ESP32 and start openOCD",
"executable": "${workspaceFolder}/build-esp32/zephyr/zephyr.elf",
"servertype": "external", // Tells Cortex-Debug NOT to start OpenOCD
"gdbTarget": "localhost:3333", // The default GDB port for OpenOCD
"cwd": "${workspaceFolder}",
"device": "ESP32",
"gdbPath": "${env:HOME}/zephyr-course/sdk/zephyr-sdk-1.0.1/gnu/xtensa-espressif_esp32_zephyr-elf/bin/xtensa-espressif_esp32_zephyr-elf-gdb",
"rtos": "Zephyr",
"overrideLaunchCommands": [
"set remote hardware-watchpoint-limit 2",
"set remote hardware-breakpoint-limit 2",
"target remote localhost:3333",
"monitor reset halt",
"monitor [target current] configure -event gdb-detach { shutdown }",
"maintenance flush register-cache"
],
"postStartSessionCommands": [
"set remotetimeout 60",
"monitor reset halt",
"thb main",
"continue"
]
}
]
}
41 changes: 41 additions & 0 deletions app/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"C_Cpp.default.compileCommands": "${workspaceFolder}/compile_commands.json",


"[kconfig]": {
"editor.tabSize": 8,
"editor.insertSpaces": false,
"editor.autoIndent": "full"
},
"editor.autoIndent": "full",
"editor.autoIndentOnPaste": true,

"VsCodeTaskButtons.tasks": [
{
"label": "$(gear) Build",
"alignment": "right",
"task": "Build",
"color": "warning"
},
{
"label": "$(explorer-view-icon) Compile",
"alignment": "right",
"task": "Compile"
},
{
"label": "$(zap) Flash",
"alignment": "right",
"task": "Flash",
"color": "warning"
},
{
"label": "$(notebook-delete-cell) Clean",
"alignment": "right",
"task": "Clean",
"color": "error"
}
]


}

165 changes: 165 additions & 0 deletions app/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile",
"type": "shell",
"command": "${workspaceFolder}/scripts/build.sh",
"args": [
"${input:board}",
"${workspaceFolder}",
"incremental"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "Build",
"type": "shell",
"command": "${workspaceFolder}/scripts/build.sh",
"args": [
"${input:board}",
"${workspaceFolder}",
"rebuild"
],
"problemMatcher": []
},
{
"label": "Clean",
"type": "shell",
"command": "${workspaceFolder}/scripts/clean.sh",
"args": [
"${input:board}",
"${workspaceFolder}"
],
"problemMatcher": []
},
{
"label": "Flash",
"type": "shell",
"command": "${workspaceFolder}/scripts/flash.sh",
"args": [
"${input:board}",
"${workspaceFolder}"
],
"dependsOn": "Compile",
"dependsOrder": "sequence",
"problemMatcher": []
},
{
"label": "Compile STM32",
"type": "shell",
"command": "${workspaceFolder}/scripts/build.sh",
"args": [
"nucleo_f303re",
"${workspaceFolder}",
"incremental"
],
"problemMatcher": []
},
{
"label": "Compile ESP32",
"type": "shell",
"command": "${workspaceFolder}/scripts/build.sh",
"args": [
"esp32",
"${workspaceFolder}",
"incremental"
],
"problemMatcher": []
},
{
"label": "Build STM32",
"type": "shell",
"command": "${workspaceFolder}/scripts/build.sh",
"args": [
"nucleo_f303re",
"${workspaceFolder}",
"rebuild"
],
"problemMatcher": []
},
{
"label": "Build ESP32",
"type": "shell",
"command": "${workspaceFolder}/scripts/build.sh",
"args": [
"esp32",
"${workspaceFolder}",
"rebuild"
],
"problemMatcher": []
},
{
"label": "Clean STM32",
"type": "shell",
"command": "${workspaceFolder}/scripts/clean.sh",
"args": [
"nucleo_f303re",
"${workspaceFolder}"
],
"problemMatcher": []
},
{
"label": "Clean ESP32",
"type": "shell",
"command": "${workspaceFolder}/scripts/clean.sh",
"args": [
"esp32",
"${workspaceFolder}"
],
"problemMatcher": []
},
{
"label": "Run OpenOCD",
"type": "shell",
"command": "sudo /usr/bin/openocd -f interface/jlink.cfg -f target/esp32.cfg -c \"gdb_port 3333\" -c \"adapter speed 5000\"",
"isBackground": true,
"problemMatcher": {
"owner": "custom",
"pattern": {
"regexp": "^.*$"
},
"background": {
"activeOnStart": true,
"beginsPattern": "Open On-Chip Debugger",
"endsPattern": "3333"
}
},
"presentation": {
"reveal": "always",
"panel": "dedicated",
"clear": true
}
},
{
"label": "Compile ESP32 and start openOCD",
"dependsOn": [
"Compile ESP32",
"Run OpenOCD"
],
"dependsOrder": "sequence"
},
{
"label": "menuconfig",
"type": "shell",
"command": "west build -t menuconfig",
"problemMatcher": []
}
],
"inputs": [
{
"id": "board",
"type": "pickString",
"description": "Select board",
"options": [
"nucleo_f303re",
"esp32"
],
"default": "nucleo_f303re"
}
]
}
Loading