Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging Against CC3220 #12

Open
rei-vilo opened this issue Dec 19, 2017 · 2 comments
Open

Debugging Against CC3220 #12

rei-vilo opened this issue Dec 19, 2017 · 2 comments
Assignees
Labels

Comments

@rei-vilo
Copy link
Member

rei-vilo commented Dec 19, 2017

Server

  • OpenOCD should be 0.9.0, not 0.10.0
$
openocd -f cc3220_xds110.cfg 

Open On-Chip Debugger 0.9.0 (2016-09-30-17:45)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
adapter speed: 2500 kHz
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.0
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 2500 kHz
Info : SWD IDCODE 0x2ba01477
Info : cc3220.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection on tcp/3333
undefined debug reason 7 - target needs reset
requesting target halt and executing a soft reset
Warn : soft_reset_halt is deprecated, please use 'reset halt' instead.
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000eb0c msp: 0x20004000
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Info : The target is not running when halt was requested, stopping GDB.
Info : dropped 'gdb' connection

Client

$
arm-none-eabi-gcc/6.3.1-20170620/bin/arm-none-eabi-gdb

GNU gdb (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 7.12.1.20170417-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) target extended :3333
Remote debugging using :3333
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x0000eb0c in ?? ()
(gdb) monitor soft_reset_halt
requesting target halt and executing a soft reset
soft_reset_halt is deprecated, please use 'reset halt' instead.
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000eb0c msp: 0x20004000
(gdb) file embeddedcomputing.elf
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from embeddedcomputing.elf...done.
(gdb) load
Loading section .intvecs, size 0x3c lma 0x20004000
Loading section .text, size 0x6eb8 lma 0x20004040
Ignoring packet error, continuing...
Loading section .c_int00, size 0x34 lma 0x2000aef8
Loading section .rodata, size 0xa64 lma 0x2000af2c
Ignoring packet error, continuing...
Loading section .data, size 0x6f4 lma 0x2000b990
Loading section .ARM.exidx, size 0x8 lma 0x2000c084
Loading section .empty, size 0xf4 lma 0x2000d4b8
Start address 0x2000aef8, load size 33148
Transfer rate: 1 KB/sec, 4143 bytes/write.
Reply contains invalid hex digit 79
(gdb) break embed1.ino:156
Reply contains invalid hex digit 79
(gdb) c
Continuing.
warning: Invalid remote reply: 00f0
warning: Invalid remote reply: 
warning: Invalid remote reply: 

Discussion

Documentation on http://ti.com and http://e2e.ti.com is rather scarce.

The same configuration against the CC3200 required setting sp and cp manually.

set $sp = g_pfnVectors[0]
set $pc = g_pfnVectors[1]
@rei-vilo
Copy link
Member Author

rei-vilo commented Dec 21, 2017

OpenOCD could be 0.10.0 with the configuration file provided at Wed, Dec 20 2017 11:25 PM.

OpenOCD connects successfully but requires SOP [2..0] = 001 = SWD, while uploading into RAM requires SOP [2..0] = 010 (not documented as per #11).

GDB client connects to OpenOCD but (gdb) load command fails. Please refer to Thu, Dec 21 2017 4:10 PM sq. for more details.

How to upload to RAM and debug against the CC3220S / CC3220SF?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants