The settings required to configure the GCC are numerous and detailed and are not all described here. Most projects can be compiled and debugged with default factory settings.
To access the project settings for the active project, click Project → Properties.
The following project settings are common:
- Specify the target device for debug session (Project → Properties → General → Device → Variant). The corresponding Linker Command File and Runtime Support Library are selected automatically.
- To debug a C project more easily, disable
optimization (-O0) or use -Og, which enables only those optimizations that do not
interfere with debugging. The -Og option reduces code size and improves performance
compared to -O0.
- Specify the search paths for the C preprocessor (Project → Properties → Build → GNU Compiler → Directories → Include Paths (-I)).
- Specify the search paths for any libraries being used (Project → Properties → Build → GNU Linker → Libraries → Library search path (-L, --library-path)).
- Specify the debugger interface (Project → Properties → General → Device → Connection). Select TI MSP430 USBx for the USB interface.
- Enable the erasure of the Main and Information memories before object code download (Project → Properties → Debug → MSP430 Properties → Download Options → Erase Main and Information Memory).
- To ensure proper stand-alone operation, select Hardware Breakpoints (Project → Properties → Debug → MSP430 Properties). If Software Breakpoints are enabled (Project → Properties → Debug → Misc/Other Options → Allow software breakpoints to be used), ensure proper termination of each debug session while the target is connected. Otherwise, the target may not work as expected stand-alone as the application on the device still contains the software breakpoint instructions.