Springe direkt zu Inhalt

Flash-Bin on Devices

Flash-Bin on Devices

If you wish to flash your bin file to the device then you have to obtain a JTAG programmer like this one.

There is no other way (of my knowledge) how to get the binary hex file to the microcontroller.

If you have this JTAG programmer and have sucessfully build your aplication the you have produced a bin or hex file that is runnable on a msp microcontroller.

Flash on a Windows OS

As in the picture below, just type:
make flash msp430-jtag -w -D -ep --ramsize=2048 --size=2048 -r out/out.hex
You have to adjust the ramsize and size approriate to your processor. And the out/out.hex file has to be renamed to whatever your outfile's name is.

Then wait for the flashing process to finish.

Linux OS

use gdb to flash the hex file to the controller. To enable gdb to talk to the JTAG programmer, run gdbproxy:

  • msp430-gdbproxy --port=2000 msp430
gdbproxy connects to the microcontroller through the JTAG parallel port interface, and opens a socket at localhost:2000 for gdb to talk to.
  • Add this to ~/.gdbinit (or you'll have to type it at the gdb prompt every time you flash the mcu):

    set remoteaddresssize 64
    set remotetimeout 999999
    set remote memory-write-packet-size fixed
    target remote localhost:2000

And finally, run GDB:

  • msp430-gdb firmware.hex

    which makes gdb display a prompt. To flash your program (i.e. load you program into the nonvolatile flash memory of the mcu), type:

     
    mon erase erase flash memory (needs to be done before you can write new data)
    load store firmware in flash
    mon reset reset mcu (loading f*cks with the clock, this fixes it)
    c 'continue', start code execution