mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[build] Add an f730 folder
This commit is contained in:
36
build/f730/gdb_script.gdb
Normal file
36
build/f730/gdb_script.gdb
Normal file
@@ -0,0 +1,36 @@
|
||||
# Add a routine to debug ARM exceptions
|
||||
|
||||
define armex
|
||||
printf "SCB_CFSR 0x%x\n", *0xE000ED28
|
||||
printf "SCB_HFSR 0x%x\n", *0xE000ED2C
|
||||
printf "SCB_HFSR 0x%x\n", *0xE000ED2C
|
||||
printf "SCB_MMAR 0x%x\n", *0xE000ED34
|
||||
printf "SCB_BFAR 0x%x\n", *0xE000ED38
|
||||
printf "xPSR 0x%x\n", *(int *)($msp+28)
|
||||
printf "ReturnAddress 0x%x\n", *(int *)($msp+24)
|
||||
printf "LR (R14) 0x%x\n", *(int *)($msp+20)
|
||||
printf "R12 0x%x\n", *(int *)($msp+16)
|
||||
printf "R3 0x%x\n", *(int *)($msp+12)
|
||||
printf "R2 0x%x\n", *(int *)($msp+8)
|
||||
printf "R1 0x%x\n", *(int *)($msp+4)
|
||||
printf "R0 0x%x\n", *(int *)($msp)
|
||||
printf "Return instruction:\n"
|
||||
x/i *(int *)($msp+24)
|
||||
end
|
||||
|
||||
document armex
|
||||
ARMv7 Exception entry behavior.
|
||||
xPSR, ReturnAddress, LR (R14), R12, R3, R2, R1, and R0
|
||||
end
|
||||
|
||||
# Let's connect to OpenOCD
|
||||
target remote localhost:3333
|
||||
|
||||
# GDB pagniation is annoying
|
||||
set pagination off
|
||||
|
||||
# Load our executable
|
||||
load
|
||||
|
||||
# Tell OpenOCD to reset and halt
|
||||
monitor reset halt
|
||||
7
build/f730/openocd.cfg
Normal file
7
build/f730/openocd.cfg
Normal file
@@ -0,0 +1,7 @@
|
||||
source [find interface/stlink.cfg]
|
||||
|
||||
transport select hla_swd
|
||||
|
||||
source [find target/stm32f7x.cfg]
|
||||
|
||||
reset_config none separate
|
||||
1
build/platform.f730.mak
Normal file
1
build/platform.f730.mak
Normal file
@@ -0,0 +1 @@
|
||||
include build/platform.device.mak
|
||||
@@ -25,7 +25,7 @@ products += $(patsubst %.$(EXE),%.map,$(filter %.$(EXE),$(products)))
|
||||
|
||||
.PHONY: %_run
|
||||
%_run: %.$(EXE)
|
||||
$(GDB) -x build/device/gdb_script.gdb $<
|
||||
$(GDB) -x build/$(PLATFORM)/gdb_script.gdb $<
|
||||
|
||||
%.map: %.elf
|
||||
@echo "LDMAP $@"
|
||||
@@ -48,7 +48,7 @@ products += $(patsubst %.$(EXE),%.map,$(filter %.$(EXE),$(products)))
|
||||
|
||||
.PHONY: openocd
|
||||
openocd:
|
||||
openocd -f build/device/openocd.cfg
|
||||
openocd -f build/$(PLATFORM)/openocd.cfg
|
||||
|
||||
ifeq ($(EPSILON_USB_DFU_XIP)$(EPSILON_DEVICE_BENCH),10)
|
||||
flasher.$(EXE): LDFLAGS = --gc-sections -T ion/src/device/usb/flasher.ld
|
||||
|
||||
1
build/targets.f730.mak
Normal file
1
build/targets.f730.mak
Normal file
@@ -0,0 +1 @@
|
||||
include build/targets.device.mak
|
||||
Reference in New Issue
Block a user