From: Dominic R. <Dom...@gm...> - 2024-05-30 09:05:33
|
Hi Martin, Am 29/05/2024 um 12:01 schrieb Salko, MARTIN: > Dear openocd users/developers. > > I have an issue with connecting to our product using the xds110 debuger, > and openocd with gbd. > I have openocd built using mingw-w64, from gitlab repository with > following commit: > > 2c8376b - target/xtensa: avoid IHI for writes to non-executable memory > (this is because support for ti am243x was added recently) > > I’m trying to connect to a running cpu, then reset it and run it again, > I’d like to essentially do a step by step trace. I'm not sure what you're trying to achieve is possible. Not due to OpenOCD, but due to the way the AM24x works. For all I know you can't debug these things from reset. There's a ROM that is executing before you get a chance to take control. Typically that ROM will load the bootloader, which then loads the application. The ROM only accepts an image in x509 format that contains some meta-data and is used for signature verification (in case of a fused HS-SE device). When working on bootloader stuff I'd put a while loop early in my code and simply attach the debugger, then step out of the loop. When working with application stuff you can put a "null" bootloader in non-volatile memory that just sets up memory and the cores. You then attach the debugger, load your application straight to RAM, and the debug from there. Maybe you could share a bit more about what problem you're trying to solve, then I might be able to give you some hints on how to approach that. Apart from that it'd be interesting how good "reset halt" is expected to work these days with complex SoCs like the AM24x. My expectation is "not", and what you're seeing then is just follow-up errors. > This is an error I’m getting from open ocd, when gdb connects to the > first core: > oocd ('err', 'Error: JTAG-DP STICKY ERROR\r\n') > > oocd ('err', 'Error: Failed to read memory at 0xe000ed00\r\n') > > oocd ('err', 'Error executing event gdb-attach on target > am243.cpu.sysctrl:\r\n') > Best Regards, Dominic |