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.

Reprogramming Tux Racer demo on RF2560 board ...

Hi all -

PREAMBLE:

I'm really happy to have finally gotten my EZMSP430-RF2560 evaluation kit. It's wicked cool.

Unfortunately, the Tux Racer demo app did not immediately steal my attention -- it took me a few days to realize it uses the onboard accelerometers, which DOES get my attention.

In the mean time, one of my evaluation boards appears to have become deprogrammed from the demo and I'm having trouble seeing how to reprogram it for the demo. (Currently, my two board behave differently on battery AND on USB power. One tries the make the BT connection -- blue light flashing. The other just sits dumbly with a green LED lit.)

QUESTION: 

Can someone go over how to reprogram the demo on the RF2560 board?

Either by rebuilding it -OR- simply where to find and  how to load the binary (.d43 file) onto the board? (Right now, I'd prefer just to load the .d43 file to the board.)

FURTHER BLAH BLAH BLAH:

I've tried opening the sample projects in the SDK, but they don't build in IAR because none of the scattered header files are found -- it only finds the headers that are in the same dir with the corresponding .c file. I know, I know, it should search the C_INCLUDE path as a last resort ... but that environmental variable didn't exist until I created it and that didn't help. :(

I should mention I'm on Windows XP.

I've tried following the instructions for simply loading the .d43 file to the board, but they don't work. (Tried creating a new IAR project and adding the accl(?).d43 file to the project ... IAR doesn't allow that. :(  )

Well, any tips would be appreciated. THANKS.

     - Dave F.

  • Dave,

    If the boards behave differently under USB and battery power, you might need to replace the batteries. Deprogramming is not something that happens because the memory used in the MSP430 is FLASH based. Note that in that case, reflashing it might not solve the underlying issue (if the batteries are low, their voltage might not be enough for some of the devices).

     

    Rebuilding the code is probably easiest and you should know how to do it if you want to modify the code later. There are a few tools which can download the binary, but I'm not sure about their Spy-bi-wire support. Simply open the workspace file for the project, which is usually at:

    C:\Texas Instruments\EZ430-RF2560 SDK\Beta_1_0\EZ430-RF2560_Applications\Source\bluetooth\build\msp430\spp\workspace\iar\SPP.eww

    Once you have it open, you simply click Control+D to download and debug. It might compile it from scratch (and if it gives you an error about too much code, you need to download the 30 day evaluation version of IAR instead of using Kickstart). Once it is downloaded, it will stop at main(). Press F5 to let it run. Ensure that the "Leave target running" option is turned on. Then just press terminate/disconnect(It's a big red X on the toolbar). The board will continue running and you can close IAR if you wish.

     

    If you open the workspace all the header files should be there. No need to create environmental variables or anything like that. Just delete the EZ430-RF2560 SDK folder if necessary and reinstall the software. This will give you a  fresh copy on your machine.

     

    Gustavo

     

  • Thanks Gustavo -

    One quick note: I realized, after posting, that my comments could have been more clear:  The two boards from my RF2560 kit BEHAVE DIFFERENTLY FROM EACH OTHER. Their behavior is consistent both on USB and battery. (They both behave the same way on USB and battery, but they differ from each other.)

    Somehow one of my boards seems to have been reprogrammed or deprogrammed -- possibly by being plugged in to USB while was diddling with Code Composer sample code for several days.

    In any case, I'd really like to understand (in general) how to send a .d43 file to the board. I don't intend to create any large projects and it would be great if I didn't have to rely on a 30-day trial license for IAR.

    Oh ... does the code limit apply to the .d43 file? :( 

    Thanks for your quick response. :D

  • I didn't realize you had changed some things with CCS, although CCS doesn't currently support the bluetooth stack.

    As for flashing, TI has the following software:

     

    http://processors.wiki.ti.com/index.php?title=MSP430_Flasher_-_Command_Line_Programmer

     

    It's command line but it will work nicely. Note that the d43 file is a file with debug information generated in debug mode. The type of build should be changed to "Release" so it generates the TI TXT file that is compatible with MSP430 Flasher, but currently there is no release profile in that drop down box. I'm trying to find a way to generate it. I'll let you know when I get the TI TXT output and how to generate it.

     

    Gustavo

  • Dave,

     

    The solution for no Release profile is to go to the Project options->Linker-> Output tab and override the default. Select other and in output format choose msp430-txt. Also

    change the name of the file from accl.d43 to accl.txt  so the files aren't mixed up. Then you can get the TXT file. It it will be in the Exe folder, somewhere around the following path:

     

    bluetooth\build\msp430\spp\accl\iar\release\Debug\Exe

     

    Hope this helps.

    Gustavo

  • Hey Gustavo -

    Thanks for your responses and the info.

    So I tried deleting and reinstalling the EZ430-RF2560 SDK (about 5 times) to get the original project back. But when I open the project in IAR, I get errors on loading that indicate the project won't load properly:

    LOAD: Configuration 'Debug' in the project 'accl' contains broken options for tool 'General':
      The format of this file is not supported by this version of the workbench. It appears to have been written by a newer version of the workbench.

    Ok, so I was running IAR 4.11a ... so I upgraded it to 5.30 (?):  Same result -- project doesn't load and when I try to build it, it fails to find any header files that aren't adjacent to their corresponding .c files.

    Meanwhile, I tried using that MSP430 flashing exe you pointed me to. I changed the accl.d43 to Firmware.txt and tried the exe ... no luck. I got an error that it couldn't detect the file type. I tried other names like "accl.bin" with no luck. (I've attached the logs.)

    Again, I'm just trying to get back to the original state of the entire kit.  :(

    Thanks.

    Wed Mar 02 19:42:58 2011:	Evaluating additional triggers...done
    Wed Mar 02 19:42:58 2011:	Initializing interface on USB port...done
    Wed Mar 02 19:42:58 2011:	Checking firmware compatibility...done
    Wed Mar 02 19:42:58 2011:	Reading FW version...done
    Wed Mar 02 19:42:58 2011:	Reading HW version...done
    Wed Mar 02 19:42:58 2011:	Powering up...done
    Wed Mar 02 19:42:58 2011:	Configuring...done
    Wed Mar 02 19:42:58 2011:	Accessing device...done
    Wed Mar 02 19:42:58 2011:	Reading device information...done
    Wed Mar 02 19:42:58 2011:	Loading file into device...
    Wed Mar 02 19:42:58 2011:	 * ERROR : Could not determine file type
    Wed Mar 02 19:42:58 2011:	Unable to load file.
    Wed Mar 02 19:42:58 2011:	Resetting device...done
    Wed Mar 02 19:42:59 2011:	Refreshing registers...
    Wed Mar 02 19:42:59 2011:	/* ----------------------------------------------------------------------------
    Wed Mar 02 19:42:59 2011:	 * UseCase     : MSP430Flasher.exe
    Wed Mar 02 19:42:59 2011:	 * Arguments   : -n MSP430BT5190 -w Firmware.txt -v -z [VCC] -m SBW2 -i USB 
    Wed Mar 02 19:42:59 2011:	 * ----------------------------------------------------------------------------
    Wed Mar 02 19:42:59 2011:	 0,0,0,0,0,0,0,-1,0
    Wed Mar 02 19:42:59 2011:	 * ERROR : No error
    Wed Mar 02 19:42:59 2011:	 # Exit: 11
    Wed Mar 02 19:42:59 2011:	 # ERROR 1014: No error
    Wed Mar 02 19:42:59 2011:	 * Disconnecting from device...
    Wed Mar 02 19:42:59 2011:	 * ----------------------------------------------------------------------------
    Wed Mar 02 19:42:59 2011:	 * Driver        : closed (No error)
    Wed Mar 02 19:42:59 2011:	 * ----------------------------------------------------------------------------
    Wed Mar 02 19:42:59 2011:	*/
    Wed Mar 02 19:44:07 2011:	
    : file extension unknown -- w
    
    Wed Mar 02 19:44:07 2011:	
    Wed Mar 02 19:44:07 2011:	*******************************************************************************
    Wed Mar 02 19:44:07 2011:	UseCase for MSP430.dll                                                         
    Wed Mar 02 19:44:07 2011:	Demo application for identifying an MSP430 device and compare the read         
    Wed Mar 02 19:44:07 2011:	parameters of the device properties structure against the parameters given by  
    Wed Mar 02 19:44:07 2011:	the DeviceID number through MSP430_Device().                                   
    Wed Mar 02 19:44:07 2011:	                                                                               
    Wed Mar 02 19:44:07 2011:	Usage: MSP430Flasher.exe [OPTIONS]                                                  
    Wed Mar 02 19:44:07 2011:	                                                                               
    Wed Mar 02 19:44:07 2011:	 -n DEVICE NAME              specifies the name of the targeted device.        
    Wed Mar 02 19:44:07 2011:	                             (required)                                        
    Wed Mar 02 19:44:07 2011:	 -o L | C                    specifies the desired mode (only for L092 device).
    Wed Mar 02 19:44:07 2011:	                             (use L for L092 and C for C092-emulator mode)     
    Wed Mar 02 19:44:07 2011:	 -l PASSWORD LENGTH          specifies the length of the JTAG password.        
    Wed Mar 02 19:44:07 2011:	                             (in words, if any, default: 0)                    
    Wed Mar 02 19:44:07 2011:	 -p JTAG PASSWORD            specifies the JTAG password (form: 0x...).        
    Wed Mar 02 19:44:07 2011:	                             (if any, default: no password)                    
    Wed Mar 02 19:44:07 2011:	 -i (TI)USB | LPTn | COMn    specifies the connection interface.               
    Wed Mar 02 19:44:07 2011:	                             (default: TIUSB (=USB))                           
    Wed Mar 02 19:44:07 2011:	 -m JTAG | SBW2 | SBW4 |     specifies the communication mode                  
    Wed Mar 02 19:44:07 2011:	    AUTO                     (JTAG or Spy-Bi-Wire. default: AUTO)              
    Wed Mar 02 19:44:07 2011:	                                                                               
    Wed Mar 02 19:44:07 2011:	 -r [filenname,mem_sect]     specifies a memory section to read from and a file
    Wed Mar 02 19:44:07 2011:	                             (txt/hex) to write to. mem_sect: RAM, INFO, MAIN, 
    Wed Mar 02 19:44:07 2011:	                             BSL                                               
    Wed Mar 02 19:44:07 2011:	 -w filenname                specifies a file (txt/hex) for device programming.
    Wed Mar 02 19:44:07 2011:	                                                                               
    Wed Mar 02 19:44:07 2011:	 -b                          unlocks BSL memory for writing                    
    Wed Mar 02 19:44:07 2011:	                             (use only with -w switch)                         
    Wed Mar 02 19:44:07 2011:	 -u                          unlocks InfoA memory for writing                  
    Wed Mar 02 19:44:07 2011:	                             (use only with -w switch)                         
    Wed Mar 02 19:44:07 2011:	 -e ERASE_ALL | ERASE_MAIN | specifies erase mode before programming.          
    Wed Mar 02 19:44:07 2011:	    ERASE_SEGMENT            (use only with -w switch, default: ERASE_ALL but  
    Wed Mar 02 19:44:07 2011:	                              ERASE_MAIN for the L092 devices)                 
    Wed Mar 02 19:44:07 2011:	 -v                          triggers verification after programming           
    Wed Mar 02 19:44:07 2011:	                             (use only with -w switch)                         
    Wed Mar 02 19:44:07 2011:	 -z [exit_spec,...]          specifies state of device on exit                 
    Wed Mar 02 19:44:07 2011:	                             (view available 'exit_spec's using -x switch)     
    Wed Mar 02 19:44:07 2011:	 -g                          switches log OFF (default: ON)                    
    Wed Mar 02 19:44:07 2011:	                                                                               
    Wed Mar 02 19:44:07 2011:	 -q                          triggers QUIET MODE (no system messages displayed)
    Wed Mar 02 19:44:07 2011:	                                                                               
    Wed Mar 02 19:44:07 2011:	 -d [breakpoint addresses]	specifies addresses for hardware breakpoints and  
    Wed Mar 02 19:44:07 2011:	                             triggers RUN_TO_BREAKPOINT mode after initialization
    Wed Mar 02 19:44:07 2011:	If not all options are initialized the demo will use default options and return
    Wed Mar 02 19:44:07 2011:	a warning!                                                                     
    Wed Mar 02 19:44:07 2011:	*******************************************************************************
    Wed Mar 02 19:44:42 2011:	
    : file extension unknown -- w
    
    Wed Mar 02 19:44:42 2011:	
    Wed Mar 02 19:44:42 2011:	*******************************************************************************
    Wed Mar 02 19:44:42 2011:	UseCase for MSP430.dll                                                         
    Wed Mar 02 19:44:42 2011:	Demo application for identifying an MSP430 device and compare the read         
    Wed Mar 02 19:44:42 2011:	parameters of the device properties structure against the parameters given by  
    Wed Mar 02 19:44:42 2011:	the DeviceID number through MSP430_Device().                                   
    Wed Mar 02 19:44:42 2011:	                                                                               
    Wed Mar 02 19:44:42 2011:	Usage: MSP430Flasher.exe [OPTIONS]                                                  
    Wed Mar 02 19:44:42 2011:	                                                                               
    Wed Mar 02 19:44:42 2011:	 -n DEVICE NAME              specifies the name of the targeted device.        
    Wed Mar 02 19:44:42 2011:	                             (required)                                        
    Wed Mar 02 19:44:42 2011:	 -o L | C                    specifies the desired mode (only for L092 device).
    Wed Mar 02 19:44:42 2011:	                             (use L for L092 and C for C092-emulator mode)     
    Wed Mar 02 19:44:42 2011:	 -l PASSWORD LENGTH          specifies the length of the JTAG password.        
    Wed Mar 02 19:44:42 2011:	                             (in words, if any, default: 0)                    
    Wed Mar 02 19:44:42 2011:	 -p JTAG PASSWORD            specifies the JTAG password (form: 0x...).        
    Wed Mar 02 19:44:42 2011:	                             (if any, default: no password)                    
    Wed Mar 02 19:44:42 2011:	 -i (TI)USB | LPTn | COMn    specifies the connection interface.               
    Wed Mar 02 19:44:42 2011:	                             (default: TIUSB (=USB))                           
    Wed Mar 02 19:44:42 2011:	 -m JTAG | SBW2 | SBW4 |     specifies the communication mode                  
    Wed Mar 02 19:44:42 2011:	    AUTO                     (JTAG or Spy-Bi-Wire. default: AUTO)              
    Wed Mar 02 19:44:42 2011:	                                                                               
    Wed Mar 02 19:44:42 2011:	 -r [filenname,mem_sect]     specifies a memory section to read from and a file
    Wed Mar 02 19:44:42 2011:	                             (txt/hex) to write to. mem_sect: RAM, INFO, MAIN, 
    Wed Mar 02 19:44:42 2011:	                             BSL                                               
    Wed Mar 02 19:44:42 2011:	 -w filenname                specifies a file (txt/hex) for device programming.
    Wed Mar 02 19:44:42 2011:	                                                                               
    Wed Mar 02 19:44:42 2011:	 -b                          unlocks BSL memory for writing                    
    Wed Mar 02 19:44:42 2011:	                             (use only with -w switch)                         
    Wed Mar 02 19:44:42 2011:	 -u                          unlocks InfoA memory for writing                  
    Wed Mar 02 19:44:42 2011:	                             (use only with -w switch)                         
    Wed Mar 02 19:44:42 2011:	 -e ERASE_ALL | ERASE_MAIN | specifies erase mode before programming.          
    Wed Mar 02 19:44:42 2011:	    ERASE_SEGMENT            (use only with -w switch, default: ERASE_ALL but  
    Wed Mar 02 19:44:42 2011:	                              ERASE_MAIN for the L092 devices)                 
    Wed Mar 02 19:44:42 2011:	 -v                          triggers verification after programming           
    Wed Mar 02 19:44:42 2011:	                             (use only with -w switch)                         
    Wed Mar 02 19:44:42 2011:	 -z [exit_spec,...]          specifies state of device on exit                 
    Wed Mar 02 19:44:42 2011:	                             (view available 'exit_spec's using -x switch)     
    Wed Mar 02 19:44:42 2011:	 -g                          switches log OFF (default: ON)                    
    Wed Mar 02 19:44:42 2011:	                                                                               
    Wed Mar 02 19:44:42 2011:	 -q                          triggers QUIET MODE (no system messages displayed)
    Wed Mar 02 19:44:42 2011:	                                                                               
    Wed Mar 02 19:44:42 2011:	 -d [breakpoint addresses]	specifies addresses for hardware breakpoints and  
    Wed Mar 02 19:44:42 2011:	                             triggers RUN_TO_BREAKPOINT mode after initialization
    Wed Mar 02 19:44:42 2011:	If not all options are initialized the demo will use default options and return
    Wed Mar 02 19:44:42 2011:	a warning!                                                                     
    Wed Mar 02 19:44:42 2011:	*******************************************************************************
    

  • Quick update:  I came very close to solving the problem by using your MSP430Flasher.exe to suck the firmware off of one of my boards and then load the same firmware onto the other board.

    Now they both APPEAR to behave the same with the red LED then the blue blinking ... but they don't shake hands and the game doesn't seem to recognize them. (Yes, I checked that the correct COM port was specified in the text file.)

    Oh, one other detail, they both register on my cell phone as Bluetooth devices with different names, so that's a good sign, right? :D

  • Ok, that last problem was clearly my own fault ... I had forgotten that clicking some buttons is necessary for them to link up and connect with the demo.

    So, I was able to get them to shake hands and steer the penguin down the course (with disastrous results).

    I was able to show my wife the penguin happiness, yay!

    However, the boards both seem to drop their Bluetooth service before the penguin reaches the end of the course AND I cannot boot them up to repro my success. Go figure.

    Now I can move on to other experiments. THANKS.