# 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

Rate this post
 0 ▲ useful ▼ not useful
hi,

since a few days i try to set up a SDK to program a NXP1768 (ARM LPC1768
Cortex M3 LCD Board from Steitec)
http://www.steitec.net/ARM-Boards/ARM-LPC1768-Cortex-M3-LCD-Board.html
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
http://www.yagarto.de/examples/index.html

The first thing i noticed, was that eclipse dont find  typical c
hedaers, for example the stdint.h, but i could successfull build the
project.
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
debugger.
At configuration point where you have to copy in  the Initialization
Commands, I ve included the folowing two listings:

---------------------------------------
1:
# 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

2:

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

break ResetHandler
break main
continue
----------------------------------------

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

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...

 1 #include "lpc17xx.h"  2 #include "type.h"  3 4 int main (void)  5 {  6  uint32_t i, j;  7   8  SystemInit();  9 10  //LED = P2[0..7]  11  LPC_PINCON->PINSEL4 &= ~(0xFFFF); // Reset P2[0..7] = GPIO  12  LPC_GPIO2->FIODIR |= 0xFF; // P2[0..7] = Outputs  13  LPC_GPIO2->FIOCLR = 0xFF; // Turn-OFF all LED  14 15  //Loop LED Test  16  while(1)  17  {  18  for(i = 0; i < 8; i++)  19  {  20  LPC_GPIO2->FIOSET = 1 << i;  21  for(j = 1000000; j > 0; j--);  22  }  23  LPC_GPIO2->FIOCLR = 0x000000FF;  24  for(j = 1000000; j > 0; j--);  25  }  26 } 

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
target?
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 ???

[c]
PORT2  |=     0xFF;
[c/]

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:

-----------
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

OEM : SEGGER-EDU

Feature(s) : FlashBP, GDB
---

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

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

with best thanks,
sven

• $formula (LaTeX syntax)$