10 years, 8 months ago.

Export to Keil uVision 4 for LPC11U24

I exported a simple Led-Blinky for !! LPC11U24 !! to Keil.

I can compile it but when I download it does not work.

When I try to simulate the Programm in Keil I get the following access violation after the first asm Satements in the Reset-Handler

SystemInit:

0x00000650 B5F0 PUSH {r4-r7,lr}

0x00000652 4A26 LDR r2,[pc,#152] ; @0x000006EC

0x00000654 6B90 LDR r0,[r2,#0x38]

0x00000656 2120 MOVS r1,#0x20

* error 65: access violation at 0x40048238 : no 'read' permission

When I generate the Program with the Online-Compiler it works.

This ist the Programm: BusOut leds(LED1,LED2,LED3,LED4);

int main() { int val=1; while(1) { leds = val; val = val << 1; if( val>=16 ) val = 1; wait(0.5); } }

I am using uVision V.4.73.0.0

Can anybody check this and if it works send me a working Keil-Project with MBed-Lib for LPC11U24

I am already using Keil and MBed-Lib for LPC1768 and for this Processor everything works fine

Thanks Michael

1 Answer

10 years, 8 months ago.

Probably, you flash a binary file without a valid checksum (the detail).

In keil, Options for Target —> User —> Run User Programs After Build/Rebuild -> Run #1 and Run #2 add:

$K\ARM\BIN\ELFDWT.EXE !L
fromelf --bin -o blink.bin !L

It will add a valid checksum to the binary.

PS. SystemInit() will fail on simulation. If you want to simulate, you should disable SystemInit()

Accepted Answer

Thank you Great it works !

Michael

posted by michael hollegha 13 Apr 2014