RobLewis 7 Posted November 14, 2013 Share Posted November 14, 2013 Once I have a working sketch, how can I make a ROM image file of it for distribution to others? How do other people upload it to their LaunchPads? I'm using the MSP430F5529. Quote Link to post Share on other sites
Rickta59 589 Posted November 14, 2013 Share Posted November 14, 2013 Why not zip up your source files so we can all learn something. -rick elpaso 1 Quote Link to post Share on other sites
roadrunner84 466 Posted November 14, 2013 Share Posted November 14, 2013 The MSP430 flashing command line tools are used in the background by Energia. You could either write a batch file/shell script to upload the thus acquired binary to the MPS430, or you could "disassemble" the binary into a large string of characters or assembler statements and pack them into a C file. If you're concerned about people figuring out your code, consider using an obfuscator. Quote Link to post Share on other sites
RobLewis 7 Posted November 14, 2013 Author Share Posted November 14, 2013 Why not zip up your source files so we can all learn something. -rick Happy to do that (not that I have anything particularly wonderful to pass along). But I suspect some of the folks in my Home Automation group might like to build the project without having to delve into Energia. Quote Link to post Share on other sites
Rickta59 589 Posted November 14, 2013 Share Posted November 14, 2013 They way I view the world is this. The whole reason to use something like Energia is to share your code so other people can learn from it and probably make it better. Energia and all the libraries people have contributed are free. However, someone had to do that work. If you want to use Energia then you probably should be giving back to the community of people who did work for free so you didn't have to. -rick Quote Link to post Share on other sites
RobLewis 7 Posted November 14, 2013 Author Share Posted November 14, 2013 The MSP430 flashing command line tools are used in the background by Energia. You could either write a batch file/shell script to upload the thus acquired binary to the MPS430, or you could "disassemble" the binary into a large string of characters or assembler statements and pack them into a C file. If you're concerned about people figuring out your code, consider using an obfuscator. Not concerned at all about protecting the code. Just want to make it easy for people who'd like to replicate the project. Your suggestion sounds too complicated for me to tackle. Where can I find info about the command line tools? Quote Link to post Share on other sites
roadrunner84 466 Posted November 14, 2013 Share Posted November 14, 2013 So you actually want to ease it for people to flash chips? Energia is about as simple as it gets. If you want to make it even more easy, pack tiusb and your compiled firmware into a installer wizard. Quote Link to post Share on other sites
Rickta59 589 Posted November 14, 2013 Share Posted November 14, 2013 Happy to do that (not that I have anything particularly wonderful to pass along). But I suspect some of the folks in my Home Automation group might like to build the project without having to delve into Energia. If you give the source, when there are issues, other people can fix them. If you only provide a binary, then you become the critical path. The common way to share embedded binaries is with an Intel HEX file. Enable the verbose compile preference in Energia that will show the path of your .elf file in the temp build directory. Also in that directory is a project.cpp.hex file. All flash loader apps (Elprotronic lite-430, the TI msp430 flash app) will accept an Intel HEX and load it on the msp430f5529. -rick Quote Link to post Share on other sites
RobLewis 7 Posted November 14, 2013 Author Share Posted November 14, 2013 They way I view the world is this. The whole reason to use something like Energia is to share your code so other people can learn from it and probably make it better. Energia and all the libraries people have contributed are free. However, someone had to do that work. If you want to use Energia then you probably should be giving back to the community of people who did work for free so you didn't have to. -rick Agreed. See previous response. But as someone with no previous experience with Arduino, I found getting started with Energia to be a nontrivial undertaking, and there are still big gaps in my knowledge (and I don't even know where to go to fill them). I was hoping to spare some folks the pain I went through. Quote Link to post Share on other sites
roadrunner84 466 Posted November 14, 2013 Share Posted November 14, 2013 Agreed. See previous response. But as someone with no previous experience with Arduino, I found getting started with Energia to be a nontrivial undertaking, and there are still big gaps in my knowledge (and I don't even know where to go to fill them). I was hoping to spare some folks the pain I went through. Really? 1) Install Energia from http://www.energia.nu, follow the on-screen instructions 2) Unpack the source .zip file 3) Open the created folder 3) Double-click on "my-awesome-project.ino" 4) Connect the Launchpad MSP430G2, make sure the jumpers are all installed as when it was shipped 5) Click the "Upload" icon (the circle with the arrow to the right) 6) You're done! Quote Link to post Share on other sites
adrianF 43 Posted November 14, 2013 Share Posted November 14, 2013 In the "Sketch" menu/drop-down inside of Energia, there are a few simple ways to get to the generated hex file of your compiled sketch. - "Copy Hex file as path" will add the directory path to your hex file to your clipboard - "Show compilation folder" will open up your windows explorer to show where all of the compiled files are, including the .hex file Now that you have the .hex file, users can flash this to a LaunchPad with several tools: - For MSP users, there is MSP430Flasher @ www.ti.com/msp430flasher // this tool is lightweight, has the ability to create batch files for simple one-click flashing, etc. - For Tiva C users, there is LMFlasher @ http://www.ti.com/tool/lmflashprogrammer - There is also the catch-all TI CCS UniFlash @ http://www.ti.com/tool/uniflash - And also third party tools such as the one flasher from Elprotronic Hope this helps! chicken, Automate and RobLewis 3 Quote Link to post Share on other sites
RobLewis 7 Posted November 14, 2013 Author Share Posted November 14, 2013 Really? Um, it's not quite that easy. Since my project is targeted at the F5529 LaunchPad, which seems to have only spotty support in Energia and its libraries, I had to make a few edits in the library sources (this alone was a bit of a project for a n00b like me). Trying to communicate this to someone with zero knowledge of, well, anything Quote Link to post Share on other sites
Rickta59 589 Posted November 14, 2013 Share Posted November 14, 2013 Um, it's not quite that easy. Since my project is targeted at the F5529 LaunchPad, which seems to have only spotty support in Energia and its libraries, I had to make a few edits in the library sources (this alone was a bit of a project for a n00b like me). Trying to communicate this to someone with zero knowledge of, well, anything Quote Link to post Share on other sites
abecedarian 330 Posted November 14, 2013 Share Posted November 14, 2013 @@RobLewis Energia supports 'core' libraries, which are supplied with it as well as 'user' libraries. Perhaps if you packaged your modified libraries, renamed so they do not conflict with core's, and saved those in your user libraries, you could distribute those modified libraries with your source code. Instruct the user to copy your libraries to their user library directory, load your sketch and off they go. Quote Link to post Share on other sites
chicken 630 Posted November 14, 2013 Share Posted November 14, 2013 Thanks to @@adrianF for providing the answer to what OP actually asked about. Yes, changing the oil on my car is easy, but I still prefer to pay a mechanic to do it for me. And I won't try to teach someone how to do it if he/she asks me for a shop's address. RobLewis 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.