lpcware

crp constant doesnt get linked in

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by pmorrell@1stdetect.com on Tue Mar 24 11:24:48 MST 2015
I cant seem to get the crp constant to be placed in the linked output. If nothing else I want to at least have 0xFFFFFFFF placed at 0x1FC so I can debug the project.

At first the project wizard included the crp.c and crp.h files, so I moved the source code into main to try and force the issue but after building all I get is...

the source code in main (after moving it to main from crp.c and crp.h)...

#define __CRP __attribute__ ((used,section(".crp")))

#define CRP_NO_CRP          0xFFFFFFFF

__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

disassembly listing...

int main(void) {

000001fc <__main>:
     1fc:e92d4008 push{r3, lr}
     200:e3a00000 movr0, #0

I am using LPCXpresso v7.6.0 [Build 321] [2015-01-26] on a win 7 machine.
The target device is a lpc2468

Thanks.
Phil

Outcomes