Dear all,
I am currently working on the Zolertia Firefly Rev A board :
github.com/Zolertia/Resources/wiki
github.com/Zolertia/Resources/…fly/Hardware/Revision%20A
It contains the :
TI CC2538 ti.com/lit/ug/swru319c/swru319c.pdf
so there is a Cortex-M3 and the ICE-Pick JTAG interface.
I would like to be able to halt the CPU before or after the bootloader and debug with GDB (gdb-multiarch on Debian 64bits) the small OS already supported :
-Contiki, RIOT, Openthread
I just got the SEGGER JLink EDU mini and started to read the JLink documentation and I am not sure to understand what are the good practices for writing our own JLinkScript. Is there a way to see the generic JLinkScript or are we suppose to start from scratch ?
It turns out that the JLink documentation UM08001 (6.34 Rev3) mentions several times that the ICEPick module is a bit tricky :
- p116 some devices need special connect sequences (e.g. devices with TI ICEPick modules)
- p170 (about InitTarget()) Example devices are MCUs from TI which have a so-called ICEPick JTAG unit on them that needs to be configured via JTAG, before the actual CPU core is accessible via JTAG.
- p177 This function has to be called again, each time the JTAG chain changes (for dynamically changing JTAG chains like those which include a TI ICEPick), in order to setup the JTAG chain again.
(by the way, I am not sure, but it seems there is an error on the definition of IRPre, DRPre, IRPost, DRPost ... sometimes IRPre is defined for devices closer to TDI, sometimes for those closer to TDO..)
So now, let's suppose I want to "printf" some variables :
Display All
gives me :
Display All
But if I would like to understand :
- what was the Default InitTarget() used
And if I would like to understand/experiment with the reset strategies beyond the RSetType command and read what was the ResetTarget() and AfterResetTarget() functions actually used, I would prefer not start from scratch.
Of course there are some ICEPick JLinkScript available :
- /opt/SEGGER/JLink_V632i/Devices/TI/TI_CC3200.JLinkScript
- /opt/SEGGER/JLink_V632i/Devices/Cypress/PSoC6/CY8C6xxx_CM0p_tm_xA.JLinkScript
- /opt/SEGGER/JLink_V632i/Samples/JLink/Scripts/ScriptBeagleBoard_OMAP3530.JLinkScript ( still using __int64)
but there are not for the same board and it would be much easier if there was some way to dump the "generic" procedure. Or at least a very verbose++++ mode. I havn't seen any differences with this for example :
Can you please provide a way to understand what is the generic procedure because it's very hard to write JLinkScript from scratch and adapt TI_CC3200.JLinkScript
Thank you in advance for any advice !
A.
I am currently working on the Zolertia Firefly Rev A board :
github.com/Zolertia/Resources/wiki
github.com/Zolertia/Resources/…fly/Hardware/Revision%20A
It contains the :
TI CC2538 ti.com/lit/ug/swru319c/swru319c.pdf
so there is a Cortex-M3 and the ICE-Pick JTAG interface.
I would like to be able to halt the CPU before or after the bootloader and debug with GDB (gdb-multiarch on Debian 64bits) the small OS already supported :
-Contiki, RIOT, Openthread
I just got the SEGGER JLink EDU mini and started to read the JLink documentation and I am not sure to understand what are the good practices for writing our own JLinkScript. Is there a way to see the generic JLinkScript or are we suppose to start from scratch ?
It turns out that the JLink documentation UM08001 (6.34 Rev3) mentions several times that the ICEPick module is a bit tricky :
- p116 some devices need special connect sequences (e.g. devices with TI ICEPick modules)
- p170 (about InitTarget()) Example devices are MCUs from TI which have a so-called ICEPick JTAG unit on them that needs to be configured via JTAG, before the actual CPU core is accessible via JTAG.
- p177 This function has to be called again, each time the JTAG chain changes (for dynamically changing JTAG chains like those which include a TI ICEPick), in order to setup the JTAG chain again.
(by the way, I am not sure, but it seems there is an error on the definition of IRPre, DRPre, IRPost, DRPost ... sometimes IRPre is defined for devices closer to TDI, sometimes for those closer to TDO..)
So now, let's suppose I want to "printf" some variables :
C Source Code: zolertia.JLinkScript
- int SetupTarget (void) {
- int r;
- JLINK_SYS_Report("");
- JLINK_SYS_Report("Beginning of JLinkScript SetupTarget");
- r = JLINK_JTAG_GetDeviceId(0);
- JLINK_SYS_Report1("Device 0: ", r);
- r = JLINK_JTAG_GetDeviceId(1);
- JLINK_SYS_Report1("Device 1: ", r);
- JLINK_SYS_Report1("IRPre ",JLINK_JTAG_IRPre);
- JLINK_SYS_Report1("DRPre ",JLINK_JTAG_DRPre);
- JLINK_SYS_Report1("IRPost ",JLINK_JTAG_IRPost);
- JLINK_SYS_Report1("DRPost ",JLINK_JTAG_DRPost);
- JLINK_SYS_Report1("IRLen ",JLINK_JTAG_IRLen);
- JLINK_SYS_Report1("TotalIRLen ",JTAG_TotalIRLen);
- JLINK_SYS_Report("End of JLinkScript SetupTarget");
- JLINK_SYS_Report("");
- }
gives me :
Source Code: zolertia.log
- ...
- InitTarget: Found ICE-Pick with ID: 0x8B96402F
- InitTarget: Found CPU TAP 0x4BA00477
- Scanning AP map to find all available APs
- AP[1]: Stopped AP scan as end of AP map has been reached
- AP[0]: AHB-AP (IDR: 0x24770011)
- Iterating through AP map to find AHB-AP to use
- AP[0]: Core found
- AP[0]: AHB-AP ROM base: 0xE00FF000
- CPUID register: 0x412FC230. Implementer code: 0x41 (ARM)
- Found Cortex-M3 r2p0, Little endian.
- FPUnit: 6 code (BP) slots and 2 literal slots
- CoreSight components:
- ROMTbl[0] @ E00FF000
- ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 002BB000 SCS
- ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 002BB002 DWT
- ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
- ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 002BB001 ITM
- ROMTbl[0][4]: E0040000, CID: B105900D, PID: 002BB923 TPIU-Lite
- Beginning of JLinkScript SetupTarget
- Device 0: 0x4BA00477
- Device 1: 0x8B96402F
- IRPre 0x00000000
- DRPre 0x00000000
- IRPost 0x00000006
- DRPost 0x00000001
- IRLen 0x00000004
- TotalIRLen 0x0000000A
- End of JLinkScript SetupTarget
- Cortex-M3 identified.
- J-Link>
But if I would like to understand :
- what was the Default InitTarget() used
And if I would like to understand/experiment with the reset strategies beyond the RSetType command and read what was the ResetTarget() and AfterResetTarget() functions actually used, I would prefer not start from scratch.
Of course there are some ICEPick JLinkScript available :
- /opt/SEGGER/JLink_V632i/Devices/TI/TI_CC3200.JLinkScript
- /opt/SEGGER/JLink_V632i/Devices/Cypress/PSoC6/CY8C6xxx_CM0p_tm_xA.JLinkScript
- /opt/SEGGER/JLink_V632i/Samples/JLink/Scripts/ScriptBeagleBoard_OMAP3530.JLinkScript ( still using __int64)
but there are not for the same board and it would be much easier if there was some way to dump the "generic" procedure. Or at least a very verbose++++ mode. I havn't seen any differences with this for example :
Thank you in advance for any advice !
A.