Apologies for the newbie question, it’s my first attempt with IAR tools. I have a board with LPC2368. When I connect J-Link and run JLink.exe, it identifies one JTAG device and says that it’s ARM7. It suggests that wiring of JTAG is correct. When I try to download a simple program from Embedded Bench into the chip, it doesn’t verify and I get warnings:
Verify error at address 0x00000093, target byte: 0xFF, byte in file: 0x4B
Verify error at address 0x00000094, target byte: 0xFF, byte in file: 0x9C
Could you help me identify causes of this problem?
In the Project → Options - > Debugger I didn’t have the “Use flash loader(s)” box checked. I’ve checked it. The list of flash loaders now says “….(default)”. My target is set to LPC2368. When I run the debugger, it tries to download to the target and generates a different error:
Check that you have the correct pllup/down ( can’t remember which offhand -check the on-chip debug section of the UM) on the RTCK pin ( J-link doesn’t use it but the MCU uses it to enable debug functions, and I think it can do flaky things if left floating.
Also check you have the latest J-Link drivers from Segger.com
You definitely want ‘use flash loader’ enabled - I think default is OK but may depend on version.
If in doubt, try loading one of the IAR example workspaces as this will have everything set up right, and theer are quite a few things that need setting right…
I use the Segger (black) J-Link as well as the rebranded yellow IAR J-Link box with IAR tools. With the J-Link - I do NOT set the Flash Loader - it will error with it, BUT, you must have the processor type properly set in the Project Options → Select LPC2368 from the processor pulldown list (do not just say “ARM7 family”). I am using this right now for work on an LPC2103 project and it works great, and you get flash breakpoints for free - at least with the LPC21xx family - I expect any LPC2000 serieis as well.
Do run the latest Segger installation and let it update the DLL that it finds in the IAR subdirectory.
I’ve also found that if the device descriction file (.ddf) isn’t correct things will act funky, as the tool’s memory map info isn’t correct (which will also happen if the processor isn’t properly selected). We’ve discovered some “tricks” with the macro files as well. As suggested, if you can get a sample project to work you can use that as a template.