Jump to content

Code::Blocks + mspgcc how-to.

Recommended Posts

  • 2 months later...
  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

This how-to is primarily for Windows users. However, paths aside most of this information should be applicable for Linux users as well. Technically, this should also work with OSX. You will need Ener

Step 3: In this video I discuss invoking MSP430 command line tools from within the Code::Blocks IDE. First, by demonstrating how to create a simple tool from the tool menu, and then finally invoking t

Step 7. A quick explanation of mspdebug, and how the user defined Upload tool from within Code::Blocks mentioned in a previous video was setup.  

Posted Images



Thanks yyrkoon for your tutorial!


I've got programming up and running on Mac OS X 10.8.4 and want to add something for my fellow Mac users.


The tool config window should look like this:




Then the Code::Blocks console will read something like this:

Launching tool 'Upload': /usr/local/msp430/mspdebug/mspdebug rf2500 --force-reset "prog /Users/jacob/Engineering/CodeBlocks/msprf24-rx/bin/Debug/msprf24-rx.elf" (in /Users/jacob/Engineering/CodeBlocks/msprf24-rx/bin/Debug)
stdout> MSPDebug version 0.20 - debugging tool for MSP430 MCUs
stdout> Copyright (C) 2009-2012 Daniel Beer <dlbeer@gmail.com>
stdout> This is free software; see the source for copying conditions.  There is NO
stdout> Trying to open interface 1 on 006
stdout> Initializing FET...
stdout> FET protocol version is 30066536
stdout> Configured for Spy-Bi-Wire
stdout> Sending reset...
stdout> Set Vcc: 3000 mV
stdout> Device ID: 0x2553
stdout>   Code start address: 0xc000
stdout>   Code size         : 16384 byte = 16 kb
stdout>   RAM  start address: 0x200
stdout>   RAM  end   address: 0x3ff
stdout>   RAM  size         : 512 byte = 0 kb
stdout> Device: MSP430G2553/G2403
stdout> Code memory starts at 0xc000
stdout> Number of breakpoints: 2
stdout> Chip ID data: 25 53
stdout> Erasing...
stdout> Programming...
stdout> Writing 2038 bytes at c000 [section: .text]...
stdout> Writing   32 bytes at ffe0 [section: .vectors]...
stdout> Done, 2070 bytes total
Tool execution terminated with status 0



Which means your Launchpad MSP430 is now programmed and running :-)
Link to post
Share on other sites
  • 1 month later...

Thank you! Copy and translate to Russian: http://www.shelezyakin.ru/?p=816

I've learned about yyrkoon's "how-to" from shluzzzoid. And installed the CB and mspgcc. Thank you guys!


Being a newbee in MSP430 MCUs, I like the GRACE program which I installed as standalone tool. It helped me very much to configure MCU's periphery and obtain several init C-files.

Now I want to use GRACE-generated files in my CODE::BLOCKS project. And to do it by "late linking": any time I decide to change smth in MCU periphery, I'd like to do it in GRACE, then refresh generated files and just remake the CODE::BLOCKS project. So GRACE project is used not once as a init code source, but is kept in the CB project forever and may be changed.

Is it sensible at all?


I've organised a common folder for GRACE and CB projects, included all GRACE-generated files in CB project and tried to compile. Compiler shows errors... Seemingly I have to arrange proper paths for header and lib files. And I cannot figure it out - what libraries do GRACE use? What path have I to add in CD compiler settings to use GRACE files?


Note: the CD paths are as yyrkoon proposed - in HighTech folder.

Link to post
Share on other sites
  • 4 months later...


Compiling template I get this error message

#include int main(){ return 0;}
..\main.c|1|error: #include expects "FILENAME" or <FILENAME>|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|

CodeBlock version : 12.11


Any idea to help me ?



Link to post
Share on other sites
  • 1 month later...
  • 2 years later...
  • 1 year later...

Everything still works fine with the latest version of code::blocks, and the first version of energia on Windows 10 x64 pro. In fact, the launchpad is recognized straight out of the box, without installing drivers. That is, at least for the purpose of flashing binaries to the launchpad.


IN fact I've just flashed three TSSOP-20 parts, using the launchpad using a ZIP socket adapter + 20 pin TSSOP to DIP socket adapter.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...