crp

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

crp

876件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mcu_programmer on Thu Sep 09 08:17:19 MST 2010
I have studied the crp example in lpc11xx examples. It seems that implementation wastes 0x0300 bytes.

Is there a way to write a linker script to program position 0x02FC with a specific value without wasting code space?
0 件の賞賛
返信
2 返答(返信)

867件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mcu_programmer on Thu Sep 09 13:47:44 MST 2010
Thanks.

Got it to work.
0 件の賞賛
返信

867件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jesse.Rosenberg on Thu Sep 09 10:46:33 MST 2010
You can use the map file, or other tools like nm to determine which functions and constants will fit, and then manually place them in your linker script. The downside is that this strategy depends on manual configuration.

An alternative is to place small library routines and/or CMSIS routines prior to the CRP section. This may not optimally fill the space between the exception vector and the CRP location, but it is better than leaving the space unfilled.

E.g. A linker script that will include common routines might look like this    
.text :
    {
        [U]FILL(0xFF);[/U]
        KEEP(*(.isr_vector))
        [U]*(.text.Reset_Handler .text.SystemInit .text.SystemCoreClockUpdate)[/U]
        [U]. = 0x000002FC;[/U]
        [U]KEEP(*(.crp))[/U]
        *(.text*)
        *(.rodata*)

    } > MFlash32

You may also find this application note useful in terms of analyzing your program image: http://ics.nxp.com/support/documents/microcontrollers/zip/an10963.zip

I think you've probably got an idea as to how CRP works, but just in case anyone else find's this thread useful here is another recent application note: http://ics.nxp.com/support/documents/microcontrollers/pdf/an10968.pdf
0 件の賞賛
返信