NOTICE: This website will be shut down in the near future. Product content has moved to nxp.com. Forum content and FAQs have been moved to community.nxp.com. We encourage you to create a user account on nxp.com to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.

 

No initialize flash array

2 replies [Last post]
blasiis
Offline
Joined: 2010-03-17
Posts: 162

Dear all, i have LPC1758 abd a structure fixed in rom like this:

__attribute__ ((section(".myText"))) const uint8_t arText[200];

Tastiera_Lcd_Debug_memory.ld:
..........
MyText (rx) : ORIGIN = 0x00068000, LENGTH = 0x8000 /* 32K */

Tastiera_Lcd_Debug.ld:
..........
.myText : ALIGN(4)
{ *(.myText)
} > MyText

When I program the flash entering in debug, the text array is initializated to 0x00, how can I not initialize the rom array ?

Thanks

0
Your rating: None

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vtw.433e
Offline
Joined: 2015-08-13
Posts: 226

Assuming that you want to leave whatever values are already stored at that location, you should give the section the NOLOAD attribute in the linker script.

blasiis
Offline
Joined: 2010-03-17
Posts: 162

OK Thanks Solved the problem with:

.myText (NOLOAD) : ALIGN(4)
{ *(.myText)
} > MyText

feedback