Skip to content

Commit 31cbdd0

Browse files
committed
Improve reliability of run_from_ram by making sure the processor is halted first.
1 parent cd63ac1 commit 31cbdd0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/app_without_flash/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ flash : runfromram
1313

1414
clean : cv_clean
1515

16+
# Halt request, full halt request, disable autoexecution, write to RAM, set EPC=start of ram, issue resume request.
17+
# Optionally, you could put a -T here to immediately terminal.
18+
1619
runfromram : $(TARGET).bin
17-
$(MINICHLINK)/minichlink -w $(TARGET).bin 0x20000000
18-
$(MINICHLINK)/minichlink -s 0x18 0 # Disable auto execution
19-
$(MINICHLINK)/minichlink -s 0x04 0x20000000 # Write DATA0 = RAM start
20-
$(MINICHLINK)/minichlink -s 0x17 0x002307b1 # Write DATA0 to DPC
21-
$(MINICHLINK)/minichlink -s 0x10 0x40000001 -T # Resume Request
20+
$(MINICHLINK)/minichlink -ks 0x10 0x80000001 -s 0x10 0x80000003 -s 0x18 0 -w $(TARGET).bin 0x20000000 -s 0x04 0x20000000 -s 0x17 0x002307b1 -s 0x10 0x40000001 -T
21+
2222

2323
flash : cv_flash
2424
clean : cv_clean

0 commit comments

Comments
 (0)