File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ ifeq ($(ARCH),RISCV)
4747 CROSS_COMPILE: =riscv32-unknown-elf-
4848 CFLAGS+ =-fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -march=rv32imac -mabi=ilp32 -mcmodel=medany -nostartfiles -DARCH_RISCV
4949 LDFLAGS+=-march =rv32imac -mabi=ilp32 -mcmodel=medany
50+
51+ # Prune unused functions and data
52+ CFLAGS +=-ffunction-sections -fdata-sections
53+ LDFLAGS+ =-Wl,--gc-sections
54+
5055 OBJS+ =src/boot_riscv.o src/vector_riscv.o
5156 ARCH_FLASH_OFFSET =0x20000000
5257endif
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ Loading with JLink:
6969
7070```
7171JLinkExe -device FE310 -if JTAG -speed 4000 -jtagconf -1,-1 -autoconnect 1
72- loadfile wolfboot.hex
73- reset
72+ loadbin factory.bin 0x20010000
73+ rnh
7474```
7575
7676### Debugging
@@ -81,9 +81,12 @@ In one terminal:
8181` JLinkGDBServer -device FE310 -port 3333 `
8282
8383In another terminal:
84+ ` riscv64-unknown-elf-gdb test-app/image.elf -ex "set remotetimeout 240" -ex "target extended-remote localhost:3333" `
85+ or
8486` riscv64-unknown-elf-gdb wolfboot.elf -ex "set remotetimeout 240" -ex "target extended-remote localhost:3333" `
8587
8688
89+
8790## STM32-F407
8891
8992Example 512KB partitioning on STM32-F407
You can’t perform that action at this time.
0 commit comments