Skip to content

Commit c810e9b

Browse files
committed
UnoR4WiFi: add debug rules for IDE2
Former-commit-id: 2424e7f
1 parent 721dd1a commit c810e9b

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

platform.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,16 @@ tools.bossac.cmd=bossac
111111
tools.bossac.upload.params.verbose=-d
112112
tools.bossac.upload.params.quiet=
113113
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -e -w "{build.path}/{build.project_name}.bin" -R
114+
115+
# Debugger configuration (general options)
116+
# ----------------------------------------
117+
# EXPERIMENTAL feature:
118+
# - this is alpha and may be subject to change without notice
119+
debug.executable={build.path}/{build.project_name}.elf
120+
debug.toolchain=gcc
121+
debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
122+
debug.toolchain.prefix=arm-none-eabi-
123+
debug.server=openocd
124+
debug.server.openocd.path={runtime.tools.openocd-0.11.0-arduino2.path}/bin/openocd
125+
debug.server.openocd.scripts_dir={runtime.tools.openocd-0.11.0-arduino2.path}/share/openocd/scripts/
126+
debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/openocd.cfg

variants/UNOWIFIR4/openocd.cfg

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#
2+
# Renesas RA4M1 w/ ARM Cortex-M4
3+
#
4+
5+
source [find interface/cmsis-dap.cfg]
6+
7+
if { [info exists CHIPNAME] } {
8+
set _CHIPNAME $CHIPNAME
9+
} else {
10+
set _CHIPNAME ra4m1
11+
}
12+
13+
if { [info exists CPU_JTAG_TAPID] } {
14+
set _CPU_JTAG_TAPID $CPU_JTAG_TAPID
15+
} else {
16+
set _CPU_JTAG_TAPID 0x5ba00477
17+
}
18+
19+
if { [info exists CPU_SWD_TAPID] } {
20+
set _CPU_SWD_TAPID $CPU_SWD_TAPID
21+
} else {
22+
set _CPU_SWD_TAPID 0x5ba02477
23+
}
24+
25+
source [find target/swj-dp.tcl]
26+
27+
if { [using_jtag] } {
28+
set _CPU_TAPID $_CPU_JTAG_TAPID
29+
} else {
30+
set _CPU_TAPID $_CPU_SWD_TAPID
31+
}
32+
33+
swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_TAPID
34+
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
35+
36+
set _TARGETNAME $_CHIPNAME.cpu
37+
target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
38+
39+
if { [info exists WORKAREASIZE] } {
40+
set _WORKAREASIZE $WORKAREASIZE
41+
} else {
42+
# 32 KB On-Chip SRAM
43+
set _WORKAREASIZE 0x10000
44+
}
45+
46+
$_TARGETNAME configure -work-area-phys 0x1ffe0000 \
47+
-work-area-size $_WORKAREASIZE -work-area-backup 0
48+
49+
if { ![using_hla] } {
50+
cortex_m reset_config sysresetreq
51+
}
52+
53+
adapter speed 1000

0 commit comments

Comments
 (0)