I am developing firmware on MSP430F2619. I need to store configuration information having 5 sections of 200 bytes. In order to read and write them independently I am trying to allocate 5 sections of 512 bytes each.

SEC_CALIB_1 : origin = 0xF200, length = 0x0200 SEC_CALIB_2 : origin = 0xF400, length = 0x0200 SEC_CALIB_3 : origin = 0xF600, length = 0x0200 SEC_CALIB_4 : origin = 0xF800, length = 0x0200 SEC_CALIB_5 : origin = 0xFA00, length = 0x0200

section_calib_1 : {} > SEC_CALIB_1 Section_calib_2 : {} > SEC_CALIB_2 Section_calib_3 : {} > SEC_CALIB_3 Section_calib_4 : {} > SEC_CALIB_4 Section_calib_5 : {} > SEC_CALIB_5

Then I am trying to place information structure using DATA_SECTOIN pragma

#pragma DATA_SECTION(Calib_Slot_1,"section_calib_1")
const Cal_Slot2_t Calib_Slot_1 = { 0x0011 };

#pragma DATA_SECTION(Calib_Slot_3,"section_cal_3")
const Cal_Slot3_t Calib_Slot_3 = { 0x0012 };

But only variable Calib_Slot_1 is allocated memory but not Calib_Slot_3

Program compiles successfully but during debugging it dose not variable Calib_Slot_3 in watch window. Plus it dose not appear in map file also.

  • \$\begingroup\$ You did actually ask a question, we can't help people that don't ask questions. Please read the rules. Looks like you could have found a complier error? This is probably a better question posed for a TI forum or tech support \$\endgroup\$
    – Voltage Spike
    Commented Feb 17, 2016 at 2:41
  • \$\begingroup\$ Try turning off optimization \$\endgroup\$ Commented Feb 17, 2016 at 4:54
  • \$\begingroup\$ Thanks Swaries . It actually works once we turn off optimization to zero. But Still it should have work with volatile keyword in case optimization is ON. \$\endgroup\$
    – prasad
    Commented Feb 17, 2016 at 20:36

1 Answer 1


Turning off Optimization will solve this issue.

  • \$\begingroup\$ Can you explain this answer a little bit, please? I'm not questioning its correctness here, just that it would be nice to have some explanation of why this happens. \$\endgroup\$ Commented Feb 18, 2016 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.