mirror of
https://github.com/zoobab/rtl8710.git
synced 2024-11-24 05:24:14 +00:00
separate cortex.ocd file
This commit is contained in:
parent
a1c1f34bc9
commit
36a2e0e8c5
3 changed files with 11 additions and 10 deletions
2
Makefile
2
Makefile
|
@ -24,7 +24,7 @@ clean:
|
||||||
rm -rf $(FILENAME_PREFIX).bin $(FILENAME_PREFIX).elf
|
rm -rf $(FILENAME_PREFIX).bin $(FILENAME_PREFIX).elf
|
||||||
|
|
||||||
install:
|
install:
|
||||||
openocd -f interface/stlink-v2-1.cfg -f rtl8710.ocd -c "init" -c "reset halt" -c "load_image $(FILENAME_PREFIX).bin $(ADDRESS) bin" -c "cortex_start $(ADDRESS)" -c "shutdown"
|
openocd -f interface/stlink-v2-1.cfg -f rtl8710.ocd -f cortex/cortex.ocd -c "init" -c "reset halt" -c "load_image $(FILENAME_PREFIX).bin $(ADDRESS) bin" -c "cortex_bootstrap $(ADDRESS)" -c "shutdown"
|
||||||
|
|
||||||
reset:
|
reset:
|
||||||
openocd -f interface/stlink-v2-1.cfg -f rtl8710.ocd -c "init" -c "reset halt" -c "reset run" -c "shutdown"
|
openocd -f interface/stlink-v2-1.cfg -f rtl8710.ocd -c "init" -c "reset halt" -c "reset run" -c "shutdown"
|
||||||
|
|
10
cortex/cortex.ocd
Normal file
10
cortex/cortex.ocd
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
proc cortex_bootstrap {start} {
|
||||||
|
# disable interrupts
|
||||||
|
reg faultmask 0x01
|
||||||
|
set vectors ""
|
||||||
|
mem2array vectors 32 $start 2
|
||||||
|
reg sp $vectors(0)
|
||||||
|
reg pc $vectors(1)
|
||||||
|
resume
|
||||||
|
}
|
||||||
|
|
|
@ -46,12 +46,3 @@ if {![using_hla]} {
|
||||||
cortex_m reset_config sysresetreq
|
cortex_m reset_config sysresetreq
|
||||||
}
|
}
|
||||||
|
|
||||||
proc cortex_start {address} {
|
|
||||||
reg faultmask 0x01
|
|
||||||
set vectors ""
|
|
||||||
mem2array vectors 32 $address 2
|
|
||||||
reg sp $vectors(0)
|
|
||||||
reg pc $vectors(1)
|
|
||||||
resume
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue