This section describes the step-by-step
instructions to create an assembly or C project from scratch and to download and run an
application on the MSP430 MCU using the MSP430 GCC toolchain. Also, the CCS Help presents a
more detailed information of the process.
- Start CCS (Start → All Programs → Texas Instruments → Code Composer Studio → Code Composer Studio).
- Create a new project (File → New → CCS Project). Select the appropriate MSP430 device variant in the Target field and enter the name for the project.
- Select GNU v7.3.0.9 (Mitto Systems Limited) for Compiler version (or any newer version).
- In the Project template and examples section, select Empty Project (with main.c). For assembly-only projects, select Empty Project.
- If you are using a USB Flash Emulation Tool such as the MSP-FET, MSP-FET430UIF, eZ-FET, or the eZ430 Development Tool, they should be already configured by default.
- For C projects, the setup is complete now.
- Click Finish to create a new project that is then visible in the Project Explorer view.
Notice that the project contains a .ld file (appropriate for the target selected). This is the linker script that contains the memory layout and section allocation. This file is the equivalent of the TI linker command file (.cmd) used by TI MSP430 Compiler and Linker.
- Enter the program code into the main.c file.
To use an existing source file for the project, click Project → Add Files... and browse to the file of interest. Single click on the file and click Open or double-click on the file name to complete the addition of it into the project folder.
Now add the necessary source files to the project and build. Similar to TI tools, additional compiler and linker options can be set from Project Properties.
- Build the project (Project
→ Build Project).
- Debug the application (Run → Debug (F11)). This starts the debugger, which gains control of the target, erases the target memory, programs the target memory with the application, and resets the target.
- Click Run → Resume (F8) to start the application.
- Click Run → Terminate to stop the application and to exit the debugger. CCS automatically returns to the C/C++ view (code editor).