Jump to content
Sign in to follow this  
nickey

Loading final (non-debug) code to chip

Recommended Posts

OK, I have debugged my code on the Launchpad and I like it and am ready to move the MSP430 to my own breadboard for further testing and final development. Question I have is "Is there anything different I should be doing when downloading my program to the chip?"

 

When I download in debug mode I just hit the debug button and it compiles and then downloads. Is there extra and unnecessary code loaded while doing this? Is there a different method for downloading non-debug code for final use? I scanned through the help documents but couldn't find a reference to something like this.

 

thanks in advance for comments.

Share this post


Link to post
Share on other sites

Yes, there are debugging symbols inside the code. They don't take up much space.

 

You remove them by changing the build type to release instead of debug.

 

If you're using CCS then look in the top left window - "C/C++ Projects". See your Active Project? Hove your mouse over it and right click to bring up a menu.

 

See the sixth option down from the top "Active Build Configuration". Make it change to "2- Release".

 

Hit "Control B" to recompile and then you have your release build.

 

The release file will be located in a new directory called Release in your active project. The filename will end with the extension ".out".

 

If you convert this file to a ".hex" then you can use an external program to load it into the MSP.

Share this post


Link to post
Share on other sites
ready to move the MSP430 to my own breadboard for further testing and final development

Don't forget to tie the Reset pin high when you move to a breadboard. (common, yet aggravating mistake) :D

Share this post


Link to post
Share on other sites

wouldn't that bring my reset pin to ground?

 

would a voltage divider with a small resistor and VCC and a large one on the ground work?

Share this post


Link to post
Share on other sites

Pull-up, not pull-down. Tie the RST pin to Vcc through a 100k resistor. During programming, RST will be pulled to GND. Also, you may want to add a small cap, like 47nF, between RST and GND.

Share this post


Link to post
Share on other sites

Thanks!

I don't know why, for some reason I had drawn VCC -> resistor -> reset pin -> ground. I am not sure why I did that lol.

 

the cap would be to start from gnd and slowly bring it to vcc?

Share this post


Link to post
Share on other sites
Yes, there are debugging symbols inside the code. They don't take up much space.

 

You remove them by changing the build type to release instead of debug.

 

If you're using CCS then look in the top left window - "C/C++ Projects". See your Active Project? Hove your mouse over it and right click to bring up a menu.

 

See the sixth option down from the top "Active Build Configuration". Make it change to "2- Release".

 

Hit "Control B" to recompile and then you have your release build.

 

The release file will be located in a new directory called Release in your active project. The filename will end with the extension ".out".

 

If you convert this file to a ".hex" then you can use an external program to load it into the MSP.

 

 

If you are using CCS, why convert it to hex? You launch the debugger, you connect to target, you load program, just select the Release .out instead of the Debug .out

 

That's all.

Share this post


Link to post
Share on other sites

Let me rephrase myself...

 

If you want to use an external program like Elpotronics FET-Pro430 Lite to program the MSP then you must convert this file to ".hex" format.

 

Luckily, FET-Pro430 Lite will do this for you once you tell it where TI put the hex conversion program.

 

Why would you want to do this?

 

You designed a product for your customer and now they want to build 1000 of you shiney new products that have an MSP430 inside of them. Are you going to setup CCS for them on the factory floor? (You better not!) No, you're going to give them a free LaunchPad (Customers love freebies - just don't tell them the price of the LP) and a copy of FET-Pro430 Lite so they can get the job done.

 

The only reasons why someone would want to generate a release version of their code would be to save a few bytes of code space or because they're going to deploy their code to the factory for mass production.

 

Release Code Build - It's taking the training wheels off of your code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×