EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

can anyone explain about #pragma dataseg

Started by Bobby October 12, 2012
I want to save my default constant in flash. can #pragma dataseg will help and how? can share a code for saving 01, 02, 03 ,04 in flash 0x1080 (info A).

Beginning Microcontrollers with the MSP430

I'm using the following code (but I'm using the crosstudio compiler)

u8 InfoRegData[256] __at "SETPOINTDATA" = { 0xFE };

or

const config DefaultConfig __at "INFO2" {
6, // Config version
240 // Config length
}

INFO2 and SETPOINT data are defined memory spaces in FLASH. You can use
INFO A.



The 2024 Embedded Online Conference