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.

msp430-gcc support in CCS

Other Parts Discussed in Thread: CC430F6137

I used the msp430-gcc tools (in Windows) to compile a very small program (for now) externally from CCS, also using my own Editor. I tried to download this elf file to the ez430-Chronos watch. I am getting a "MSP430: Trouble Writing Memory Block at 0x7f8c on Page 0 of Length 0x202: Could not write device memory. Cannot write to target" error. When I try to load the hex file I get a "Invalid file format" error.

All seems fine when I load the factory image received from TI. So I don't know how to solve this issue.

 

Please help me

  • Hi Reuel,

    could you please clarify a little exactly what it is you are doing.

    - what tool do you generate the file with?  In what format?

    - what tool do you use to try and program with? In what format?

    Ie if it is a hex file you are trying to load onto another chip.  How was it generated?  What flash programmer are you using?  Elprotronics?  With what settings? CCS can not load a hex file onto an MSP430/CC430 device.  You need something like the free tool from elprotronic (www.elprotronic.com) to do this.  You can also use it to read a program into a hex file.

    Please keep us informed.  I do hope this helps.

    Best Regard,
    Lisa

     

  • Hi Reuel,

    I also wanted to point you to this wiki in case it will help in your case and/or you had not seen it.  It has some instructions and resources for gcc projects.  There is an MSP430 specific topic right near the bottom.

     

    http://processors.wiki.ti.com/index.php/GCC_-_Create_a_project

     

    Once again, please keep us informed.

    Best Regards,
    Lisa

  • Hi

    1) I write the app in C.

    2) Compile the app with mspgcc toolchain from SourceForge using msp430-gcc.exe -mmcu=cc430f6137 -Wall -Werror -O2 -g %PROJPATH%\uart.o %PROJPATH%\main.c -o %PROJPATH%\%VERSION%.elf which gives me an .elf file output

    3) Use the same toolchain to generate the hex file, as follows msp430-objcopy.exe -O ihex %PROJPATH%\%VERSION%.elf %PROJPATH%\%VERSION%.hex

    4) Setup CCS4.1.1 project with a USB programmer/emulator included in the eZ430-Chronos kit, plug the Chronos watch into the programmer.

    5) Program the watch with factory image found in the installation folders of TI (ez430_chronos_868MHz.out) witch works fine.

    6) Program the watch with the elf file generated in step (2) and I get the errors as mentioned earlier in the post. Even if I generate a hex file from the elf with the mspgcc toolchain I get errors as mentioned...

     

    Regards

    Reuel

  • Hi Reuel,

    have you tried loading the hex file from your elf version with a flash programmer (eg the one I mentioned from elprotronic - www.elprotronic.com)?

    This will be the easiest.  CCS does not load hex files.  

    As far as loading the elf file .... do you create a project in CCS?  But I think a hex and flash programmer is a better option.

    Please keep us informed.

    Best Regards,
    Lisa

  • Hi Reuel,

    I just thought I would ask whether my post/tips were helpful or whether there is any update to your enquiry?

    Best Regards,
    Lisa

  • Hi Lisa

    I could not solve the problem. What I am doing now is using FETPro430 lite program to program the elf file to the device and that works fine.

     

    Thanks

  • Hi Reuel,

    ok, thanks for the update and I am glad you found a way to manage things.

    Best regards,
    Lisa