LPC 1766STK and ARM-JTAG-EW problem

I’m using the LPC 1766STK and ARM-JTAG-EW for my final year school project. I’ve always had troubles downloading programs to the microcontroller. Sometimes it works (rarely) and by the next time I boot up my computer it doesn’t work anymore. I tried this on my desktop and laptop. I use IAR Embedded workbench 5.41 with the driver by olimex.

Now I’m trying to find out what’s the problem by downloading the sample programs from olimex to it but I keep getting this error:


J-Link


ERROR: Target examination failed - please check JTAG/SW connection, error code -2113 (ADIv5 Debug Port transaction error)


Abort Retry Ignore


After that I get


IarIdePm


Failed to load flash loader: D:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\NXP\FlashNXPLPC512K_Cortex.flash


OK


This is what I get in my debug log:

Fri Jan 14 12:24:18 2011: Loaded macro file: D:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\NXP\LPC17xx.mac

Fri Jan 14 12:24:18 2011: DLL version: V1.0d, compiled Feb 22 2010 11:20:57

Fri Jan 14 12:24:18 2011: Firmware: Firmware version: 1.5; Hardware board revision: A; Additional version information: Date of firmware compilation: Feb 22 2010, 11:19:34, Source revision: 1021

Fri Jan 14 12:24:18 2011: RAW: Examination error -2113 (ADIv5 Debug Port transaction error)

Fri Jan 14 12:24:47 2011: Fatal error: ERROR: Target examination failed - please check JTAG/SW connection, error code -2113 (ADIv5 Debug Port transaction error) Session aborted!

Fri Jan 14 12:24:47 2011: Failed to load flash loader: D:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\NXP\FlashLayout1RAM32K_Cortex.out

Fri Jan 14 12:24:47 2011: Failed to load flash loader: D:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\config\flashloader\NXP\FlashNXPLPC512K_Cortex.flash

Fri Jan 14 12:25:00 2011: RAW: Target halt check error -2120 (CoreSight Debug functionality requested but component not present on the chip)

I tried a lot of things in the settings, but I only got it working once and the settings somehow didn’t save…

I hope anyone can help me.

Thanks

Have you tried reducing the JTAG speed? Some JTAG interfaces (such as the genuine Wiggler) can’t run at full speed.

I use the adaptive setting as speed, I tried using auto to but it didn’t work out. =/

Thanks for the help though!

I don’t use IAR, but the fact that it says J-Link up there tells me it’s looking for a Segger J-Link and not the Olimex device.

The user manual from the Olimex ARM-JTAG-EW says this:

1.2. Software Features

  • DLL mostly compatible with original jlinkarm.dll from IAR-EW

  • works with IAR Embedded Workbench 5.30 from IAR Systems

  • supports ARM7TDMI targets (e.g. SAM7, LPC2000, STR7)

  • supports Cortex M3 targets (e.g. STM32, LPC1000)

  • ability to put “external” breakpoints that trigger on a user-defined event

  • external event sources are the target MCU voltage, target supply voltage and target consumption current

I did replace the dll, but the weird thing is that it worked in the past sometimes.

Just being curious, but have you tried to set the target microcontroller (Project options) to LPC1766?

BTW, you can try to download programs into flash with a serial programmer (Flash Magic or some other) .

I have worked with IAR 6.10 and there is an menu option “Debug without downloading”, so first download it over the serial connection and then debug with the JTAG.

krkan:
Just being curious, but have you tried to set the target microcontroller (Project options) to LPC1766?

Yes, I tried it. But changing it had no effect =/

krkan:
BTW, you can try to download programs into flash with a serial programmer (Flash Magic or some other) .

I have worked with IAR 6.10 and there is an menu option “Debug without downloading”, so first download it over the serial connection and then debug with the JTAG.

I’ll look into this, thanks.

I’ve got no idea how this happened, but it works now :S and I didn’t change anything compared to a few days ago.

Thanks for the help =)

I’ve used a USB J-Link with IAR on Windows for 2 years. No issues.

Love it.

Esp. flash breakpoints.

Yeah, after spending a couple of days in order to make ARM-USB-OCD work somewhat stable in combination with LPC1766 (with GCC and IAR), those commercial JTAG tools do not look so expensive now: :lol:

It’s more a function of the software. The CrossWorks ARM tools work fine with home-made JTAGs like Wiggler clones, as well as those from Olimex, and other suppliers, and Rowley’s own CrossConnect units, of course.

please,

can anyone send me the ARM-JTAG-EW driver for IAR v 5.4, we have bought the JTAG, but unfortunately we don’t have the convenient driver. The OLIMEX website only contains driver for IAR v6 , because i worked with an old version of IAR, fouedbti@yahoo.fr, or a link to download,

Thank you

I have the same problem. The ARM-JTAG-EW does NOT work. I installed the driver and copied the dll under Win 7 64Bit and IAR EW 6.10.

When i try do debugg the example codes i get the Error:

Could not get JTAG TAP state, error code -1134 (connection timed out)

Sometimes but only the first time (after reconnect i think) there is an error, that thays that its not able to reset the target (IO-error or something else). After that error there is the error above when i try to edbug.

What iam do wrong. Iam very pi**ed off. I paid lot of money and it does not work.

Even under Win XP 32Bit (but) IAR EW 6.2 it does not work. But there is an other Error. The dll seems to be wrong/corrupt oder somethings else. May be the driver does not work with this new EW version.

The tip from krkan (flashing with serial programmer) is no option for me. I paid for the ARM-JTAG-EW because it should be possible to flash AND debug under IAR.

Somebody can help me?

edit:

When i try to debug the first time after reconnect, there comes the error massage and than the ARM-JTAG-EW LED blinks green. Maybe that helps.

I am confused, now it works but there are Errors.

What iam exactly have done:

Downloaded ARM-JTAG-EW firmware 1.0.3.0 and (de)upgraded the Bootloader/Firmware with arm-jtag-ew-fwupd.exe

Copied the jlink.dll from firmware 1.0.6.0 into iar directory /bin

opened example project and tryied to debug. Than IAR has an old firmware and asked for autmatikc upgrade. I accepted und IAR upgraded the olimex programmer. After that IAR said there were 2 errors but i can ignore them.

Here is the debug-log:

Sat Jun 04 12:36:19 2011: Loaded macro file: D:\Programme\IAR Workbench ARM\arm\config\flashloader\NXP\LPC17xx.mac

Sat Jun 04 12:36:19 2011: JLINK command: ProjectFile = F:\Elektrotechnik\Development\ARM LPC1766\Beispielcode by Olimex\LPC1766-STK\AudioDevice\settings\AudioDevice_Flash Debug.jlink, return = 0

Sat Jun 04 12:36:19 2011: JLINK command: device = LPC1766, return = 0

Sat Jun 04 12:36:19 2011: DLL version: V1.0f, compiled Feb 21 2011 10:51:32

Sat Jun 04 12:36:19 2011: Firmware: Firmware version: 1.6; Hardware board revision: A; Additional version information: Date of firmware compilation: Feb 20 2011, 23:21:56, Source revision: 1023M

Sat Jun 04 12:36:19 2011: Selecting SWD as current target interface.

Sat Jun 04 12:36:20 2011: Number of hardware breakpoint registers: 6

Sat Jun 04 12:36:20 2011: Number of hardware watchpoint registers: 4

Sat Jun 04 12:36:20 2011: JTAG speed is initially set to: 32 kHz

Sat Jun 04 12:36:20 2011: Hardware reset with strategy 0 was performed

Sat Jun 04 12:36:20 2011: Initial reset was performed

Sat Jun 04 12:36:20 2011: ------- Prepare for flashloader -------

Sat Jun 04 12:36:21 2011: 1224 bytes downloaded and verified (2.47 Kbytes/sec)

Sat Jun 04 12:36:21 2011: Loaded debugee: D:\Programme\IAR Workbench ARM\arm\config\flashloader\NXP\FlashLayout1RAM8K_Cortex.out

Sat Jun 04 12:36:21 2011: Target reset

Sat Jun 04 12:36:27 2011: Downloaded F:\Elektrotechnik\Development\ARM LPC1766\Beispielcode by Olimex\LPC1766-STK\AudioDevice\Flash Debug\Exe\AudioDevice.out to flash memory.

Sat Jun 04 12:36:27 2011: Loaded macro file: F:\Elektrotechnik\Development\ARM LPC1766\Beispielcode by Olimex\LPC1766-STK\AudioDevice\config\Flash.mac

Sat Jun 04 12:36:27 2011: Hardware reset with strategy 0 was performed

Sat Jun 04 12:36:29 2011: 59384 bytes downloaded into FLASH and verified (7.86 Kbytes/sec)

Sat Jun 04 12:36:29 2011: Loaded debugee: F:\Elektrotechnik\Development\ARM LPC1766\Beispielcode by Olimex\LPC1766-STK\AudioDevice\Flash Debug\Exe\AudioDevice.out

Sat Jun 04 12:36:29 2011: Hardware reset with strategy 0 was performed

Sat Jun 04 12:36:29 2011: Target reset

Sat Jun 04 12:36:30 2011: (1,35): [syntax error, unexpected TYPE_NAME, expecting IDENTIFIER]

Sat Jun 04 12:36:30 2011: Error when defining macro

Sat Jun 04 12:36:30 2011: There were 2 errors during the initialization of the debugging session.

The software runs and i can debug i think until now. Hopefully it works now. Bur can someone say what that errors mean or if i can do anything else to run that programmer perfectly?

Greetings