Skip to content

Instantly share code, notes, and snippets.

@trollcop
Last active September 16, 2019 17:57
Show Gist options
  • Save trollcop/7afa7c2dcacf79f6768bb8f41fe6690b to your computer and use it in GitHub Desktop.
Save trollcop/7afa7c2dcacf79f6768bb8f41fe6690b to your computer and use it in GitHub Desktop.
riscv gnu-mcu-eclipse on windows try
1. https://github.com/gnu-mcu-eclipse/org.eclipse.epp.packages/releases/
2. https://github.com/gnu-mcu-eclipse/windows-build-tools/releases
3. https://github.com/gnu-mcu-eclipse/riscv-none-gcc/releases
unzip #1 to ex. f:\eclipse
unzip #2 and #3 to %appdata%\GNU MCU Eclipse
\GNU MCU Eclipse\Build Tools
\GNU MCU Eclipse\RISC-V Embedded GCC
Start Eclipse
make new riscv project
create src\lib
copy to lib\ GD32VF103_standard_peripheral and RISCV from templates
confirm:
Window->Preferences
MCU->Global Segger J-Link Path
project properties
path and symbols
includes: src\lib\GD32VF103_standard_peripheral src\lib\GD32VF103_standard_peripheral\Include src src\lib\RISCV\drivers
includes asm: src/lib/RISCV/drivers
symbols: HXTAL_VALUE=8000000 USE_STDPERIPH_DRIVER=1
C/C++ build -> Settings
Select Configuration: All configurations
/ GNU RiscV Cross Linker
General -> Script Files ${workspace_loc:/${ProjName}/src/lib/RISCV/env_Eclipse/GD32VF103xB.lds}
General -> [x] Do not use standard start files (-nostartfiles)
Miscellaneous -> [x] Use newlib-nano (--specs=nano.specs)
Run->Debug Configurations
GDB SEGGER J-Link Debugging
Debugger Tab
Device Name GD32VF103CBT6
Interface->JTAG
Initial Speed Auto
Current status:
Flashing works, running works.
Debug doesn't work (stepping)
Modifying peripheral registers reflects state (ex. GPIO), so debug connection definitely works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment