Hi,
I'm just getting going with an AM4379 IDK dev board and running programs over JTAG. I am using the "out of the box" IDK_AM437X target and GEL file with CCS 6.0.1, and I'm only interested in the A9 core, not anything else onboard.
If I power cycle the board and then start a fresh debug session, everything works fine. The init GEL runs automatically on connect. I can load code, it runs to main() and breaks, and I can step through etc.
Now suppose I want to run something else, either a new build of the same application or a new application. What should I do?
I can think of several options, but none of them is very satisfactory, so I'm sure I'm missing something:
- Just use "restart", which is what the IDK release notes suggest. This sometimes works, but clearly isn't fully resetting the device to a known state, and sometimes the board init hangs if you re-enter this way.
- Use "CPU Reset (SW)" without re-running the GEL init script.
- Use "CPU Reset (SW)" and then re-run the GEL init script. After this, a loaded program doesn't break in main(), but seems to get stuck in the boot ROM.
- Use "System Reset". Note this doesn't naturally come to a breakpoint, but just hangs. I've tried adding a breakpoint at the reset address 0x30_000 and then System Reset, which does break, then GEL init script. This just seems to confuse the chip badly, and nothing works after that. (see log below)
- Use the "CPU reset" button on the board - no go, this really annoys the emulator.
- Power cycle every time, disconnecting and reconnecting the debugger. I also have to re-connect my UART terminal. This is working for me but is quite tedious.
I've worked with a TMS320C6678 and TMS470AM3359 and in both cases, you could reliably get the SoC inc peripherals back to a "known" state with a System Reset or CPU HW reset followed by a GEL init script. ("Restart" was never enough). CPU HW reset isn't offered with this chip, and the System Reset gives
CortexA9: Trouble Reading Memory Block at 0x800896a4 on Page 0 of Length 0x20: (Error -1205 @ 0x800896A4) Device memory bus has an error and may be hung. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.1.600.0)
CortexA9: Error: (Error -1204 @ 0x3D5B) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.1.600.0)
Any thoughts? Tweaks to the GEL file? Better magic places to put a breakpoint when resetting?
Thanks,
Gordon