Hi Guys, I am checking in the attached patch to add support for persistent data to the MSP430 port. Persistent data retains its current value across processor resets (because it is held in flash), so its value must be set once - when the program is loaded - and then never changed by the runtime support code again.
The patch also includes some documentation for this new feature and a new testcase to make sure that it works. An associated libgloss patch is needed in order to update the linker scripts involved, and I will be applying that patch shortly. Tested with no regressions on an msp430-elf toolchain. Cheers Nick gcc/ChangeLog 2015-10-06 Nick Clifton <ni...@redhat.com> * config/msp430/msp430.c (ATTR_NOINIT): New constant. (ATTR_PERSIST): New constant. (msp430_data_attr): New function - verifies an attribute that only applies to variables. (msp430_attributes): Add noinit and persistent attributes. (noinit_section): New variable. (presis_section): New variable. (TARGET_ASM_INIT_SECTIONS): Define. (msp430_init_sections): New function - initialises the noinit and persist section variables. (msp430_select_section): Add support for noinit and persist attributes. (msp430_section_type_flags): Likewise. * doc/extend.texi: Document the reent, critical, wakeup, noinit and persistent attributes. gcc/testsuite/ChangeLog 2015-10-06 Nick Clifton <ni...@redhat.com> * gcc.target/msp430: New directory. * gcc.target/msp430/msp430.exp: New file. Runs MSP430 specific tests. * gcc.target/msp430/data-attributes.c: New file. Checks the noinit and persistent data attributes.
msp430.persistent.patch.2
Description: Unix manual page