From: larwe on
I found my J-Link lying around and tried again to get IAR to play nice
with an NXP ARM7, and I'm heading to the conclusion that this
toolchain simply doesn't work with NXP. Here's what happens - it's
really weird, so maybe someone can explain:

- Create an empty C main project (main just returns 0)
- Select the correct chip as target
- Select J-Link as the debugger
- Uncheck the "run to main" box

Starting debug, you can single-step through the startup code until it
jumps to ?main, where it encounters this code:

?main:
00000180 E3A00001 MOV R0, #0x1
00000184 EBFFFFF4 BL ?Veneer (0) for __low_level_init ;
0x15C
00000188 E3500000 CMP R0, #0x0
0000018C 1BFFFFCF BLNE __iar_data_init2 ; 0xD0
__iar_init$$done:
00000190 E3A00000 MOV R0, #0x0
00000194 EBFFFFF3 BL ?Veneer (0) for main ; 0x168

Here's where it gets weird. When you try to step over the BLNE
instruction, the J-Link programming window pops up again, and the
debugger doesn't get to the next instruction - it looks like it's
still running. Hitting the break button shows that the CPU is now
stuck at the abort vector. It never reaches main.

Same behavior, though slightly different code, if ARM mode is selected
rather than Thumb. I've tried this on a Keil MCB2130 (LPC2138) and an
Olimex LPC2106 board, identical results. Does anyone have a clue what
could be causing this?

It's really whacked out. IAR's sales rep has called me several times
asking if I'm going to write a check for $4,000 for a single node
license for this compiler. Quite the comedian.
From: Chris Burrows on
"larwe" <zwsdotcom(a)gmail.com> wrote in message
news:6385b196-7283-4d93-9767-1aca3422f0ce(a)r27g2000yqb.googlegroups.com...
>
> It's really whacked out. IAR's sales rep has called me several times
> asking if I'm going to write a check for $4,000 for a single node
> license for this compiler.

Next time he calls ask him to transfer you to one of their tech experts to
answer your question. You will either get it fixed or you won't hear from
him again ;-)

Alternatively, see if anybody in the LPC2000 Yahoo Tech group can help:

http://tech.groups.yahoo.com/group/lpc2000

Regards,
Chris Burrows
CFB Software

Astrobe: ARM Oberon-07 Development System
http://www.astrobe.com


From: FreeRTOS info on
On 30/06/2010 03:13, larwe wrote:
> I found my J-Link lying around and tried again to get IAR to play nice
> with an NXP ARM7, and I'm heading to the conclusion that this
> toolchain simply doesn't work with NXP.

I can assure you it does - I have used it many many times.

You don't say which NXP ARM7 you are trying to use though. Take a look
in the IAR examples directory to see if there is a sample project for it
- then use that as a base for your project (use the same start up code,
debugger macros, project settings, etc.). Once you have it working you
can remove their demo code, and add in your own.

Are you using an up to date version of IAR?

--

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers. More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.



From: Chris H on
In message <6385b196-7283-4d93-9767-1aca3422f0ce(a)r27g2000yqb.googlegroup
s.com>, larwe <zwsdotcom(a)gmail.com> writes
>I found my J-Link lying around and tried again to get IAR to play nice
>with an NXP ARM7, and I'm heading to the conclusion that this
>toolchain simply doesn't work with NXP.

Then you are doing something wrong... thousands of people are
successfully using the Segger J-link and IAR suite on NXP ARM7 parts.
Including NXP.

As I have said before I have noticed that over the years you seem to
have problems with most professional tools companies. As many people are
successfully using the combination you say does not work it seems "the
workman is blaming his tools".

>It's really whacked out. IAR's sales rep has called me several times
>asking if I'm going to write a check for $4,000 for a single node
>license for this compiler. Quite the comedian.

So why is the IAR salesman a "comedian"? it is you who are unable use a
professional development suite as thousands of others clearly can. For
comedian try a mirror.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



From: Mike Harrison on
On Tue, 29 Jun 2010 19:13:31 -0700 (PDT), larwe <zwsdotcom(a)gmail.com> wrote:

>I found my J-Link lying around and tried again to get IAR to play nice
>with an NXP ARM7, and I'm heading to the conclusion that this
>toolchain simply doesn't work with NXP. Here's what happens - it's
>really weird, so maybe someone can explain:
>
>- Create an empty C main project (main just returns 0)
>- Select the correct chip as target
>- Select J-Link as the debugger
>- Uncheck the "run to main" box
>
>Starting debug, you can single-step through the startup code until it
>jumps to ?main, where it encounters this code:
>
>?main:
> 00000180 E3A00001 MOV R0, #0x1
> 00000184 EBFFFFF4 BL ?Veneer (0) for __low_level_init ;
>0x15C
> 00000188 E3500000 CMP R0, #0x0
> 0000018C 1BFFFFCF BLNE __iar_data_init2 ; 0xD0
>__iar_init$$done:
> 00000190 E3A00000 MOV R0, #0x0
> 00000194 EBFFFFF3 BL ?Veneer (0) for main ; 0x168
>
>Here's where it gets weird. When you try to step over the BLNE
>instruction, the J-Link programming window pops up again, and the
>debugger doesn't get to the next instruction - it looks like it's
>still running. Hitting the break button shows that the CPU is now
>stuck at the abort vector. It never reaches main.
>
>Same behavior, though slightly different code, if ARM mode is selected
>rather than Thumb. I've tried this on a Keil MCB2130 (LPC2138) and an
>Olimex LPC2106 board, identical results. Does anyone have a clue what
>could be causing this?
>
>It's really whacked out. IAR's sales rep has called me several times
>asking if I'm going to write a check for $4,000 for a single node
>license for this compiler. Quite the comedian.

It definitely does work, but some of the setup is non-obvious and you will struggle to get there
from a blank project.
However there are plenty of sample projects in the IAR installation dir, targetted at their
kickstart boards - look at the linker and debugger settings in these.

A couple of quick things from memory - ensure the watchdog is disabled, ensure 'use flash loader'
is set