Automatically Initializing Data Segment Values in MAX-IDE

Abstract: This application note discusses the code and data segment facility provided by MAX-IDE for applications programming on MAXQ® microcontrollers. The code and data segment mechanism provides a way to automatically declare variable locations in data memory and to initialize those variables with starting values. Application code can then be used to cache those variable values in flash memory and restore them as needed. This approach allows an assembly-based application to take advantage of the data segment autoloading provided by MAX-IDE, while still operating consistently whether or not the microcontroller is connected to a JTAG debugger. The MAXQ2000 microcontroller EV kit is used to demonstrate the method and code examples are provided in the text.