Adapt to OpenOCD 0.10.0

This commit is contained in:
Telekatz 2017-07-13 20:51:20 +02:00
parent 436b89bb03
commit 986751eb5d
4 changed files with 32 additions and 19 deletions

View file

@ -25,8 +25,9 @@
#ARMPATH = $(ARMBASE)/bin/ #ARMPATH = $(ARMBASE)/bin/
TOOLPREFIX = arm-none-eabi- TOOLPREFIX = arm-none-eabi-
LPCTOOL = lpctool LPCTOOL = lpctool
OPENOCDPATH = F:\Tools\OpenOCD OPENOCDPATH = F:\Tools\OpenOCD_0_10
OPENOCD = $(OPENOCDPATH)\openocd.exe -f betty.cfg -f $(OPENOCDPATH)\interface\uniprog.cfg #OPENOCD = $(OPENOCDPATH)\bin\openocd.exe -f $(OPENOCDPATH)\scripts\interface\jlink.cfg -f betty.cfg
OPENOCD = $(OPENOCDPATH)\bin\openocd.exe -f $(OPENOCDPATH)\scripts\interface\uniprog.cfg -f betty.cfg
############################################################### ###############################################################
##### #####
@ -42,12 +43,9 @@ OD = $(ARMPATH)$(TOOLPREFIX)objdump
SIZE = $(ARMPATH)$(TOOLPREFIX)size SIZE = $(ARMPATH)$(TOOLPREFIX)size
CPUFLAGS = -mcpu=arm7tdmi-s CPUFLAGS = -mcpu=arm7tdmi-s
OPTFLAGS = -Os CFLAGS = -Wall -mthumb-interwork -g3 -c
CFLAGS = -Wall -mthumb-interwork
INC = -I. -Iinterrupt -Idisplay -Ikeyboard -Iaudio -Iinfrared -Iserial -Iflash -Icc1100 -Igui -Itimer -Igames -Iadc -Irtc -Itools INC = -I. -Iinterrupt -Idisplay -Ikeyboard -Iaudio -Iinfrared -Iserial -Iflash -Icc1100 -Igui -Itimer -Igames -Iadc -Irtc -Itools
ASFLAGS = -g -I. -mthumb-interwork ASFLAGS = -g -I. -mthumb-interwork
#LDFLAGS = -Tlpc2220_rom.ld -Map boop.map
#LIBS = -lc -lgcc
LDFLAGS = -mthumb-interwork -nostartfiles -Xlinker -Map -Xlinker boop.map -Tlpc2220_rom.ld LDFLAGS = -mthumb-interwork -nostartfiles -Xlinker -Map -Xlinker boop.map -Tlpc2220_rom.ld
THUMBFLAGS = -mthumb THUMBFLAGS = -mthumb
@ -55,6 +53,9 @@ COMPILE = $(CC) $(CPUFLAGS) $(CFLAGS) $(INC)
ifeq ($(MAKECMDGOALS),debug) ifeq ($(MAKECMDGOALS),debug)
COMPILE += -D DEBUGMODE COMPILE += -D DEBUGMODE
OPTFLAGS = -O0
else
OPTFLAGS = -Os
endif endif
ifeq ($(MAKECMDGOALS),release) ifeq ($(MAKECMDGOALS),release)

View file

@ -20,24 +20,31 @@ if { [info exists CPUTAPID ] } {
} }
#coonfigure reset options #coonfigure reset options
jtag_nsrst_delay 50 adapter_nsrst_delay 1
jtag_ntrst_delay 50 jtag_ntrst_delay 1
#use combined on interfaces or targets that can't set TRST/SRST separately #use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst trst_push_pull srst_push_pull reset_config srst_only srst_pulls_trst trst_push_pull srst_push_pull
jtag_khz 1000 adapter_khz 1000
#jtag scan chain #jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME
# Event handlers # Event handlers
$_TARGETNAME configure -event reset-start {jtag_khz 1000} $_TARGETNAME configure -event reset-start {adapter_khz 1000}
$_TARGETNAME configure -event reset-init {betty_init} $_TARGETNAME configure -event reset-init {betty_init}
$_TARGETNAME configure -event gdb-attach {
halt
}
$_TARGETNAME configure -event gdb-attach {
reset init
}
arm7_9 dcc_downloads enable arm7_9 dcc_downloads enable
$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x10000 -work-area-backup 0 $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x10000 -work-area-backup 0
@ -45,7 +52,7 @@ $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x10000 -work-
#flash bank <name> <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>] #flash bank <name> <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
set _FLASHNAME $_CHIPNAME.flash set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME cfi 0x80000000 0x00100000 2 2 $_TARGETNAME flash bank $_FLASHNAME cfi 0x80000000 0x00100000 2 2 $_TARGETNAME
flash bank $_FLASHNAME cfi 0x82000000 0x00100000 2 2 $_TARGETNAME #flash bank $_FLASHNAME cfi 0x82000000 0x00100000 2 2 $_TARGETNAME
arm7_9 fast_memory_access enable arm7_9 fast_memory_access enable
@ -58,8 +65,8 @@ proc betty_init { } {
# PLLCFG: 0x42 = psel = 10 (4) = msel= 00010 (3) = 240 mhz Fcco*/ # PLLCFG: 0x42 = psel = 10 (4) = msel= 00010 (3) = 240 mhz Fcco*/
mww 0xe01fc084 0x42 mww 0xe01fc084 0x42
# Activate PLL settings # Activate PLL settings
#mww 0xe01fc08c 0xaa mww 0xe01fc08c 0xaa
#mww 0xe01fc08c 0x55 mww 0xe01fc08c 0x55
#sleep 100 #sleep 100
# Memory Bank Configuration # Memory Bank Configuration
@ -69,7 +76,7 @@ proc betty_init { } {
mww 0xffe00008 0x10000420 mww 0xffe00008 0x10000420
# BCFG1: 8 bit, 3 sram wst, rble, 5 wst 3 idcy : Betty: LCD @ 0x81000000 # BCFG1: 8 bit, 3 sram wst, rble, 5 wst 3 idcy : Betty: LCD @ 0x81000000
#mww 0xffe00004 0x00000400 mww 0xffe00004 0x00000400
# GPIO Pin COnfiguration for Flash access # GPIO Pin COnfiguration for Flash access
# PINSEL0: # PINSEL0:
@ -88,14 +95,19 @@ proc betty_init { } {
mww 0xe0028008 0x002018D0 mww 0xe0028008 0x002018D0
# disable watchdog # disable watchdog
#mww 0xfffffd44 0x00008000 mww 0xfffffd44 0x00008000
# enable user reset # enable user reset
#mww 0xfffffd08 0xa5000001 mww 0xfffffd08 0xa5000001
} }
proc flash_boop {IMAGE} { proc flash_boop {IMAGE} {
reset init reset init
flash erase_sector 0 0 0
flash erase_check 0
flash erase_sector 0 0 last flash erase_sector 0 0 last
flash erase_check 0
flash write_bank 0 $IMAGE 0 flash write_bank 0 $IMAGE 0
reset run reset run
} }

Binary file not shown.

View file

@ -413,7 +413,7 @@ void startRFIRQ(void) {
VICIntEnable = INT_EINT0; VICIntEnable = INT_EINT0;
} }
inline void stopRFIRQ(void) { void stopRFIRQ(void) {
VICIntEnClr = INT_EINT0; VICIntEnClr = INT_EINT0;
} }