Hello, Here is some documentation.
1.OPENOCD NEW COMMAND 1.1 TARGET NEW COMMAND smp command in target, allows to group the target working in smp. target smp targetname1 targetname2 targetname3 ... all target have different coreid targetname1 has coreid 0 targetname2 has coreid 1 targetname3 has coreid 2 ... With this command only one gdb session is created for the list of target. 1.2 CORTEX_A NEW COMMAND As follow, here is the list of additional commands for target cortex_A (This commands apply to the current target (cortex_a8)) 1.2.1 cortex_a8 smp_on following this command, the behavior is as follow. - the set of hardware breakpoint => the same hardware break point is set on all target list. - halt command => trigger the halt of the other target - resume command => trigger the write of context of all target in the list, the restart of current target launch the restart of the other. - a dedicated gdb command is implemented for switching the target displayed by the gdb session see 2. - following a breakpoint: the target stopped by the breakpoint is displayed to the gdb session. 1.2.2 cortex_a8 smp_off The current target is the one displayed in the gdb session, only this target is controlled, this behavior is needed during system boot (u-boot for instance) 1.2.3 cortex_a8 smp_gdb Display/fix the target number displayed in gdb instance This command is mainly for testing. example : >cortex_a8 smp_gdb gdb coreid 0 -> -1 0 : coreid 0 is displayed to gdb ,-> -1 : next resume triggers a real resume > cortex_a8 smp_gdb 1 gdb coreid 0 -> 1 0 :coreid 0 is displayed to gdb ,->1 : next resume displays coreid 1 to gdb > resume > cortex_a8 smp_gdb gdb coreid 1 -> 1 1 :coreid 1 is displayed to gdb ,->1 : next resume displays coreid 1 to gdb > cortex_a8 smp_gdb -1 gdb coreid 1 -> -1 1 :coreid 1 is displayed to gdb, -1 : next resume triggers a real resume 2.GDB PROTOCOL ADDSON FOR DISPLAYING OTHER CORE CONTEXT It is a copy paste of explanations from src/target/smp.c /* implementation of new packet in gdb interface for smp feature */ /* */ /* j : smp status request */ /* J : smp set request */ /* */ /* jc :read core id displayed by gdb connection */ /* reply XXXXXXXX core id is int32_t , 8 hex digits */ /* */ /* Reply ENN error not supported (target not smp) */ /* */ /* JcXX set core id displayed at next gdb continue */ /* maximum 8 bytes described core id int32_t (8 hex digits) */ /* (core id -1 , reserved for returning to normal continue mode) */ /* Reply ENN error not supported(target not smp,core id out of range) */ /* Reply OK : for success */ /* */ /* handling of this packet within gdb can be done by the creation */ /* internal variable by mean of function allocate_computed_value */ /* set $_core 1 => Jc01 packet is sent */ /* print $_core => jc packet is sent and result is affected in $ */ /* Another way to test this packet is the usage of maintenance packet */ /* maint packet Jc01 */ /* maint packet jc Example in a .gdbscript for a target with 2 core having id 0 and 1 (u8500) /* force the display of coreid 0 */ define toggle0 maint packet Jc0 continue maint packet Jc-1 end /* force the display of coreid 1 */ define toggle1 mmaintenance packet Jc1 continue maintenance packet Jc-1 maint packet jc end 3. GDB RESET PACKET USAGE Example of script for resetting target in gdb (u8500) define reset maintenance packet R maintenance packet Jc0 continue maintenance packet Jc-1 end -----Original Message----- From: Øyvind Harboe [mailto:oyvind.har...@zylin.com] Sent: Tuesday, April 19, 2011 10:11 AM To: Michel JAOUEN Cc: Tomek CEDRO; luca ellero; openocd-development@lists.berlios.de Subject: Re: [Openocd-development] cortex_a :smp feature Hi Michel, thanks for the effort here! Could you write some documentation? I'd like to let these patches cool off and leave some time for feedback. -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development