This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
We have purchased several new LaunchPad MSP-EXP430G2ET development kits to replace the older MSP-EXP430G2 kits we have been using. We are currently using Energia to program our MSP430s and are having an issue where we are unable to program the new kits.
When a new kit is first connected, the default example that is preloaded works (i.e. both LEDs blink). However, when I try to upload the default Blink sketch to the new board, it freezes up and only the green light on the programmer side of the board remains lit. Energia gives the following output:
Sketch uses 810 bytes (4%) of program storage space. Maximum is 16384 bytes. Global variables use 20 bytes (3%) of dynamic memory, leaving 492 bytes for local variables. Maximum is 512 bytes. DSLite version 8.2.0.1400 Configuring Debugger (may take a few minutes on first launch)... Initializing Register Database... Initializing: MSP430 error: MSP430: Error initializing emulator: A firmware update is required for the MSP430 Debug Interface (MSP-FET430UIF / MSP-FET / eZ-FET). Click the "Update" button to update the firmware and launch your debug session (this may require several update steps). DO NOT UNPLUG THE INTERFACE DURING THE UPDATE. Updating Firmware Initializing Bootloader... Programming New Firmware... Programming New Firmware...: 16% Programming New Firmware...: 33% Programming New Firmware...: 50% Programming New Firmware...: 100% error: MSP430: Error: MSP-FET / eZ-FET core(communication layer) update failed Failed: MSP430: Error initializing emulator: MSP-FET / eZ-FET core(communication layer) update failed the selected serial port does not exist or your board is not connected
Note that the board was connected but becomes disconnected during programming. After this, there is no available port from the Tools menu and the MSP430 cannot be programmed. Subsequent attempts at programming the MCU result in the following output:
Sketch uses 810 bytes (4%) of program storage space. Maximum is 16384 bytes. Global variables use 20 bytes (3%) of dynamic memory, leaving 492 bytes for local variables. Maximum is 512 bytes. DSLite version 8.2.0.1400 Configuring Debugger (may take a few minutes on first launch)... Initializing Register Database... Initializing: MSP430 error: MSP430: Error initializing emulator: One of the connected MSP-FETs / eZ-FETs debuggers needs recovery. Select 'Recover' to start the recovery process. Note: Only one MSP-FET / eZ-FET debugger can be connected to your system during recovery. Updating Firmware error: MSP430: Error: MSP-FET / eZ-FET recovery failed Failed: MSP430: Error initializing emulator: MSP-FET / eZ-FET recovery failed the selected serial port does not exist or your board is not connected
This has happened with multiple kits. I am using the 'dslite' programmer from the Tools menu and have the most recent board libraries installed. As far as I know, there is no way to "select Recover" from Energia. Do I have to install CCS?
My current setup is:
Thanks for your feedback, we will check in detailed and reply to u later
I have resolved the issue. This seems to be a problem for anyone that wants to develop out-of-the-box using Energia instead of CCS. If you try to upload code onto a new board with Energia the first time, you will brick the programmer. Luckily you can easily recover it using CCS. Here's the fix:
Hopefully someone finds this helpful! Here is the proper output from Energia when you upload the example Blink sketch:
Sketch uses 810 bytes (4%) of program storage space. Maximum is 16384 bytes. Global variables use 20 bytes (3%) of dynamic memory, leaving 492 bytes for local variables. Maximum is 512 bytes. DSLite version 8.2.0.1400 Configuring Debugger (may take a few minutes on first launch)... Initializing Register Database... Initializing: MSP430 Executing Startup Scripts: MSP430 Connecting... Loading Program: /tmp/arduino_build_263747/Blink.ino.elf Preparing ... .text: 0 of 778 at 0xc000 .text: 0 of 32 at 0xffe0: 93% Finished: 93% Setting PC to entry point.: 93% info: MSP430: Flash/FRAM usage is 830 bytes. RAM usage is 0 bytes. Running... Success
**Attention** This is a public forum