-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compile, and tweak wait for debugger work.
Change behavior to: 1. Printf will wait up to 120ms at boot. 2. If printf has timed out, it will immediately continue. 3. If a debugger is reattached, it will keep printing. 4. If a debugger is attached, it will wait up to 120ms. Then continue at full speed. Fix GDB on minichlink. Update minichlink.exe Add `make gdbclient` as a target and change single step behavior. Further tweaks to vs code launch (need to backport to template). And, also, improvements to windows GDB. * Optimize pgm-esp32-s2-ch32xx.c * Improve VS Code build * Fix stepping for older GDBs Properly define flash memory section.
- Loading branch information
Showing
17 changed files
with
352 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,35 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "RISCV32EC", | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/../../ch32v003fun", | ||
"${workspaceFolder}/../../extralibs", | ||
"/usr/include/newlib" //why? the configurationProvider ought to find this | ||
"${workspaceFolder}/../../ch32v003fun" | ||
], | ||
"defines": [ | ||
"CH32V003", | ||
"__riscv", | ||
"USE_SIGNALS", | ||
"CH32V003FUN_BASE" | ||
"defines": [], | ||
"compilerPath": "/usr/bin/clang", | ||
"cppStandard": "c++20", | ||
"intelliSenseMode": "linux-clang-x64", | ||
"compilerArgs": [ | ||
"-DCH32V003FUN_BASE" | ||
], | ||
"configurationProvider": "ms-vscode.makefile-tools" | ||
}, | ||
{ | ||
"name": "Win32", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${workspaceFolder}/../../ch32v003fun" | ||
], | ||
"defines": [], | ||
"compilerPath": "riscv64-unknown-elf-gcc-10.1.0.exe", | ||
"cppStandard": "c++20", | ||
"compilerArgs": [ | ||
"-DCH32V003FUN_BASE" | ||
], | ||
"compilerPath": "/usr/bin/riscv64-unknown-elf-gcc", | ||
"cStandard": "gnu11", | ||
"cppStandard": "gnu++17", | ||
"intelliSenseMode": "gcc-x86", //works. Someday, intellisense might get riscv modes | ||
"compilerArgs": [], | ||
"configurationProvider": "ms-vscode.makefile-tools" | ||
} | ||
], | ||
"version": 4 | ||
} | ||
"version": 4, | ||
"enableConfigurationSquiggles": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,33 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "cppdbg GDB Debug Target", | ||
"name": "GDB Debug Target", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/template.elf", | ||
"program": "debugprintfdemo.elf", | ||
"args": [], | ||
"stopAtEntry": true, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"deploySteps": [ // 'make ...gdbserver' doesn't seem to work here. The Makefile calls 'minichlink -baG'... Needs -aG. Easier to add minichlink as a seperate step below | ||
{ | ||
"type": "shell", //isn't there some way to call a task from tasks.json? | ||
"command": "make --directory=${workspaceFolder} -j 1 closechlink flash", | ||
}, | ||
{ | ||
"type": "shell", | ||
"command": "${workspaceFolder}/../../minichlink/minichlink -aG", | ||
"continueOn": "gdbserver running" | ||
}, | ||
], | ||
"preLaunchTask": "run_flash_and_gdbserver", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true, | ||
}, | ||
"ignoreFailures": true | ||
} | ||
], | ||
"svdPath": "${workspaceFolder}/../../misc/CH32V003xx.svd", // extension 'Peripheral Viewer' by mcu-debug (cortex-debug) | ||
"miDebuggerPath": "gdb-multiarch", | ||
"miDebuggerServerAddress": "localhost:2000", | ||
"logging": { | ||
"engineLogging": false | ||
}, | ||
"miDebuggerServerAddress": "127.0.0.1:2000" | ||
}, | ||
{ | ||
"name": "Run Only (In Terminal)", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "", | ||
"preLaunchTask": "run_flash_and_gdbserver", | ||
} | ||
] | ||
} | ||
"preLaunchTask": "run_flash_and_monitor", | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.