Code::Blocks Guide

Installation

Begin by setting up msp-gcc as described above.

CodeBlocks can be downloaded either as a binary release, which is easier, or as source code to compile yourself. If downloading the binary release you don't need the MinGW version as we are using the mspgcc compiler. However if you wish to compile standard C, you may prefer to have it as it adds the extra compilers and debuggers required to do so. Download the binary release for your platform here:

http://www.codeblocks.org/downloads/5

Run the installer, for our purposes the 'standard' features are fine but choose any extras you may wish to use.

Use

Run CodeBlocks, go to 'Settings/Compiler and debugger'. Under the 'Selected compiler' drop down box choose 'GNU GCC Compiler for MSP430' and set as default.

Under the tab 'Compiler Flags' in 'Compiler settings', tick the box next to 'MSP430 1612'.

Under the tab 'Toolchain executables' change the 'Compiler's installation directory' to wherever you installed mspgcc (the main folder, not a sub folder such as msp430).

Press ok to close the settings and you're ready to compile. Open your code and click the build button (shaped like a cog) to test if it has worked.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.