Arduino 1.5: CC430 upload code using TI MSP-FET. Is it possible? how to do it?

I have a board with a TI msp430. I want to use Arduino with it. I have seen that this is possible with the new Arduino 1.5. By know my board appears in the Arduino IDE board, and I can verify code without errors. My problem is defining platform.txt, defining the uploading process. I want to use TI MSP-FET debugger for uploading, as there is no bootloader preinstalled in my board. In Energia was it possible to use it, as Energia is Arduinos fork, I supposed that it should be possible to do it also in Arduino 1.5 But I don’t know how to do it. I have looked carefully at https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification, but I didn’t find info that helps me configuring the uploading process…

I have to include some uploading tools in an specific folder, how to defined then the platform.txt… Any help will be appreciated, I’m completely stuck at this point. more precisely, I think this part of platform.txt should be filled in. any help ?

# msp430 Uploader/Programmers tools * *# ------------------------------ tools.tilib.cmd.path={runtime.ide.path}\hardware\tools\msp430\bin###### tools.tilib.config.path={runtime.ide.path}\hardware\tools\msp430\bin######.conf #Upload tools.tilib.upload.params.verbose= tools.tilib.upload.params.quiet= tools.tilib.upload.pattern= #Program tools.tilib.program.params.verbose= tools.tilib.program.params.quiet= tools.tilib.program.pattern= #Erase tools.tilib.erase.params.verbose= tools.tilib.erase.params.quiet= tools.tilib.erase.pattern= #Bootloader tools.tilib.bootloader.params.verbose= tools.tilib.bootloader.params.quiet= tools.tilib.bootloader.pattern=

I have a board with a TI msp430. I want to use Arduino with it. I have seen that this is possible with the new Arduino 1.5.

What makes you think that this is "possible"? The way I see 1.5.x, it is THEORETICALLY possible to add additional 3rd hardware, but I don't think that this has been done for MSP430, and it is SUBSTANTIAL WORK to make it happen. As downloaded, 1.5.7 supports AVR-based Arduinos (Uno/etc), and ARM-based arduinos (Due.) There is no MSP430 compiler, and there are no other tools for MSP430 either. You would have to add all the tools as well as modifying boards.txt and platforms.txt.

Why not just use Energia? http://energia.nu/

First of all, thanks for your answer.

The truth is that panstamp (www.panstamp.com), they have developped the core and libraries to work with their board wich has a CC430 working at 868MHz, using Arduino 1.5.7. So this work I think it is done. But I would like to reuse it in a board with the same micro but working at 433MHz.

Panstamp board has allready the bootloader, and the update the code using gdb.

My problem is updating the code. I thought that modifying platform.txt it might be possible.
But I don’t know how to modify it… I also thought that maybe some of the energia tilib programmer code could be use in Arduino 1.5. But I don’t h know how to do it… sorry I have a poor background on this subjects.

Any clue will be appreciated

Thanks!

westfw:

I have a board with a TI msp430. I want to use Arduino with it. I have seen that this is possible with the new Arduino 1.5.

Why not just use Energia? http://energia.nu/

The panstamp has two hardware platforms, an AVR based one and an msp430 based one. The Energia IDE is never going to integrate the avr tools into their product. Energia uses the 1.x Arduino IDE and all the toolchain modifications are baked into the Java IDE. Using the 1.5 Arduino IDE makes it pretty simple to change toolchains without having to recompile the Java IDE.

svia: Any clue will be appreciated

You want to use mspdebug to program the board instead of avrdude or the bootloader used by panstamp.

First install the existing panstamp code, which will define platforms and install the tools for the 868MHz version. Then modify the resulting boards.txt and (maybe) platforms.txt to make the 433MHz version VERY MUCH LIKE the existing 868MHz version. I would think that the changes between the two would be very small; you're talking about changing the radio used to implement the wireless link, and that shouldn't change the compiler or upload tools at all.

westfw: ... and that shouldn't change the compiler or upload tools at all.

The panstamp comes with a custom pre-installed bootloader. You aren't going to find that on the other board. The normal way to load msp430 code on a chip uses SBW (Spy Bi Wire) the programming and debug protocol that works hand-in-hand with the mspdebug program. The upload tools and configuration will have to change a lot. First off you will need a hardware programmer such as an FET-UIF430. an MSP430-FET or another recent launchpad. The programming pins of the LP or FET will have to be jumpered to the Test / Reset / GND pins of your radio board. Then you will have to configure the 1.5 IDE to use the mspdebug to program it using SBW. Or you could port the panstamp bootloader firmware to your board. and then use the same app as panstamp.

Thank you all. Panstamp did a great work, and in fact modifying the code for using it at 433MHz is shouldn’t be a problem, it’s enough to initialice panstamp.init(CFREQ_433). So it’s not a problem of tuning the code to my desired frequency, as Rick Kimball said, the problem is that I don’t have the bootloader preloaded. I have the MSP-FET and the board is prepared to use it. The truth is I have been considering this two options you mention: - Uploading the bootloader - Or configuring the Arduino IDE The problem is that I didn’t arrive to a solution with any of them yet. Lack of knowledge and experience, my fault. Thanks for the mspdebug and SBW info, I'll try to make it work:)

If you have a programming tool (perhaps MSP-FET) that can be called as a command line program then calling it from the Arduino IDE is relatively easy. I had a quick look at some MSP-FET documents but am none the wiser. If you can find such a command line tool, then I can advise how to add to the Arduino IDE.

Custom bootloaders are great if you buy the pre-programmed boards, but unless you have the source code and a build system setup they are somewhat useless when it comes to rolling your own hardware.

ETA: quick search came up with this http://processors.wiki.ti.com/index.php/MSP430_Flasher_-_Command_Line_Programmer?DCMP=MSP430&HQS=Other+OT+msp430flasher - looks like it might work.

Thanks to help, finally it is possible to upload the code using a MSP-FET430UIF from Texas instruments.
Looking at the Energia output (verbose) when compiling and uploading was quite usefull.
I include here board.txt,platform.txt, and programmer.txt, in case it could be useful to somebody else.
Mention that the board I’m using is a Wizzimote.
I’m able to turn off or turn down LED’s, no blinking them, as delay() doesn’t seem to work properly , but this is another issue .

platform.txt (4.74 KB)

boards.txt (635 Bytes)

programmers.txt (129 Bytes)

I include here board.txt,platform.txt, and programmer.txt, in case it could be useful to somebody else.

beginners should note that this assumes that "something" has already installed the correct MSP430 toolchain (compiler, libraries, etc.)

Downloading panstamp (www.panstamp.con) library will be the first step, and then modify it to appear your board in arduino, and the board, platform, programmer.txt.