Forum: ARM programming with GCC/GNU tools Setting up a SDK for a LPC1768 Cortex M3 LCD Board from Steitec in combination with the Jlink

Author: sven (Guest)
Posted on:

Rate this post
0 useful
not useful

since a few days i try to set up a SDK to program a NXP1768 (ARM LPC1768 
Cortex M3 LCD Board from Steitec) 
in combination with a J-Link EDU.
The first test was with the open source option --> Yagrato + Eclipse
I've done every step in the yagarto tutorial. I started a new project 
and imported the example LPC1768Test from the yagrato download section. 

The first thing i noticed, was that eclipse dont find  typical c 
hedaers, for example the stdint.h, but i could successfull build the 
The next thing i wanna do is to use the debugging function in 
combination with the J-Link, so i followed the tutorial to configure the 
At configuration point where you have to copy in  the Initialization 
Commands, I ve included the folowing two listings:

# connect to the J-Link gdb server
target remote localhost:2331

# Set gdb server to little endian
monitor endian little

# Set JTAG speed to 1000 kHz
monitor speed 1000

# Reset the target
monitor reset
monitor sleep 100

# Set JTAG speed in khz
monitor speed auto

# Vector table placed in RAM
monitor writeu32 0xE000ED08 = 0x10000000


monitor reg r13 = (0x10000000)
monitor reg pc = (0x10000004)

break ResetHandler
break main

After that i started the Segger GDB Server (I use Version 4.42a), an now 
all things are connected. The problem
no target connected (red symbol), but i see a target voltage (3,27 V 
green symbol) an the Jlink connected (also green symbol).
What is my mistake?
Then i start debugging and the GDB Server connects to the target (all 
symbols are green), but i could not step to code an error occures.
"Execusion is suspended because of error" What is wrong?

After that frustrating tutorial, i only wanna to find out how i could 
flash the nxp.... just a simple blinking led code...please!

So the next option I've choosen, was a trial version of IAR Embedded 
Workbench (btw: V 6.30.2) in combination with J-Link EDU.
I started with a little test project for GPIO usage.
Here the source...
#include "lpc17xx.h"
#include "type.h"

int main (void)
  uint32_t i, j;

  //LED = P2[0..7]
  LPC_PINCON->PINSEL4 &= ~(0xFFFF);         // Reset P2[0..7] = GPIO
  LPC_GPIO2->FIODIR   |=     0xFF;        // P2[0..7] = Outputs 
  LPC_GPIO2->FIOCLR    =     0xFF;        // Turn-OFF all LED

  //Loop LED Test
    for(i = 0; i < 8; i++)
      LPC_GPIO2->FIOSET = 1 << i;
    for(j = 1000000; j > 0; j--);  
    LPC_GPIO2->FIOCLR = 0x000000FF;
    for(j = 1000000; j > 0; j--);

I got errors in the lines the pins are reseted an set as output. 
"identifier LPC_OINCON is undefined",
okay propably defined in th header! Where do i get this header, from 
NXP,or is it a part of the IAR workbench, because i have to choose the 
 And how could i add it to the project?

Could i set the port directly, without any definition?
Like you can do it with AVRs, like this ???

PORT2  |=     0xFF;

The last thing i did, was to install a trial version of Keil u Vision,
i started a new project ...again and build it and all went well until i 
press the load button, then an error occures

here is the log file:

JLink info:
DLL: V4.08b, compiled Jun 30 2009 19:10:31

Firmware: J-Link ARM V8 compiled Feb  8 2012 14:30:39

Hardware: V8.00
S/N : 268002467


Feature(s) : FlashBP, GDB

* JLink
Info: TotalIRLen = 4, IRPrint = 0x01
JLink Info: Found Cortex-M3 r2p0, Little endian.
JLink Info: TPIU fitted.
JLink Info: ETM fitted.
JLink Info:   FPUnit: 6 code (BP) slots and 2 literal slots
JLink Error: Unknown OEM - Please obtain an updated version of the 
JLinkARM.dll from www.segger.com

so far thats it. I would be very happy if you could help me in this 

with best thanks,


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.