Currently, I would like program my µC (TI am3359) with a JTAG probe OLIMEX ARM-USB-OCD and IAR Embedded Workbench.
For this, I have realized the following steps:
1.Install driver for the probe => driver find into "Olimex-ODS-9.0-revK.exe"
2. Start a GDB server => openocd-0.6.1.exe -f ../scripts/interface/olimex-arm-usb-ocd.cfg -f ../scripts/target/am335x.cg with "adapter_khz 6000"
3. Start IAR:
a. Choose "GDB Server" as debugger
b. In GDB Server tab, I have filled field "TCP/IP address or hostname" with "localhost,3333"
4. Start the download => this error occure "Fatal error: Return function __iar_return_from_swi not found, must exist when using SWI semihosting with GDB Server Session aborted!"
Is it someone could help me to resolved this problem ?
For information, this manip on an µC STMF103 run correctly !
I haven't achieved any successful connection between an OpenOCD debugger and AM335x but I have few suggestions (excuse me if you have already considered those).
1. Try using OpenOCD 0.7.0 instead of 0.6.1 - it might be downloaded from Freddie Chopin's web site: http://www.freddiechopin.info/en/download/category/4-openocd (http://www.freddiechopin.info/en/download/category/4-openocd). Also it might be useful to post a screenshot of what happens when you execute the connection command (does everything end successfully with the board showing the hardware breakpoints, etc).
2. The "adapter_khz 6000" seems high for ARM-USB-OCD, try with 1000 or 2000 initially
3. Check if the AM3359 JTAG layout is the ARM one or the TI one. Our debuggers use the 20-pin JTAG layout. This might be seen in the table here: http://processors.wiki.ti.com/index.php/JTAG_Connectors (http://processors.wiki.ti.com/index.php/JTAG_Connectors)
4. Have you downloaded the MSP430 Starter Ware package for AM335x? It is available here: http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/starterware/latest/index_FDS.html (http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/starterware/latest/index_FDS.html). More information about the IAR EW part is available here: http://processors.wiki.ti.com/index.php/StarterWare_Getting_Started_02.00.XX.XX#IAR_Embedded_work_bench_for_ARM (http://processors.wiki.ti.com/index.php/StarterWare_Getting_Started_02.00.XX.XX#IAR_Embedded_work_bench_for_ARM)
Thanks for your answer and sorry for this later answer but I started a new project before to close this point.
I try all suggestions that you give me but result is the same : "Fatal error: Return function __iar_return_from_swi not found, must exist when using SWI semihosting with GDB Server Session aborted!" message on IAR.
Below, you can see two screenshots:
- one after the execution of the connection command => errors occurred uniquely once after HW reset of µC
- the second shows information after the download of the application with IAR