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.

CCS4 and mspgcc4

Other Parts Discussed in Thread: MSP430F5437

Hello,

 

I'm trying to port Contiki (http://www.sics.se/contiki/) for my own board which contains a MSP430f5437.

As I have a MSP430 USB-Debug-Interface (MSP-FETU430IF) which works well with CCS4 (4.1.1.00014), I'm editing the code on CCS4.

As Contiki has its makefiles, I created a "Standard Make Project". The compiler is mspgcc4 (http://mspgcc4.sourceforge.net/).

I can compile the code using mspgcc4, but when I try to make a debug session CCS4 fails to recognise the binary file that I give to it (Debug Window > Main > C/C++ Application). The error message is "Program is not a recognized executable."

Using Cygwin, I checked the file format of the binary file which gives :

-------------
$ file contiki/examples/hello-world/hello-world.wlsn4u
contiki/examples/hello-world/hello-world.wlsn4u: ELF 32-bit LSB executable, version 1, statically linked, not stripped
------------- 

but when I check the file format of the binary file generated by a "regular" project with CCS4 (File > New > CCS Project), I get :

-------------
$ file hello/Debug/hello.out
hello/Debug/hello.out: data
-------------

So as I don't have the same binary format, it's normal that CCS4 doesn't recognise my binary file. But how can I have it recognised ?

Do you know if there is an option somewhere in mspgcc4 or in CCS4 that I can use for that ?

Or simply, it is possible to use mspgcc4 to compile code that CCS4 will use for loading the processor and debugging it ? If not, is there a way to use the USB-Debug-Interface with another tool ?

 

Thanks.

Best,

Yorick

  • Hi Yorick.

    Could you provide the executable (hello-world.wlsn4u)? If it is a hello world app, hopefully there is no IP issues posting it here.

    I know that it is possible to use the mspgcc tools with CCSv4.  There is a topic for how to use it with a CCS Project if you wanted to explore that (instead of a standard make project)

    http://tiexpressdsp.com/index.php/GCC_-_Create_a_project#Using_mspgcc_for_MSP430_cross_compile

    Thanks

    ki

  • Hello,

    I read the tutorial for using mspgcc, but unfortunately Contiki organises its architecture like that :

    - cpu
    ---- msp430
    ---- another processor 

    - platform
    ---- my board
    ---- another board

    - examples
    ---- hello world
    ---- another example

    so I think I have to keep the makefile in order to be able to compile correctly.

     

    For the files :

    - executable : https://documents.epfl.ch/_xy-3-1330991_1-890176
    - hello-world.c :  https://documents.epfl.ch/_xy-3-1330992_1-890177
    - makefile for my board : https://documents.epfl.ch/_xy-3-1330994_1-890179
    - makefile for msp430 : https://documents.epfl.ch/_xy-3-1330995_1-890180
    - makefile for all Contiki : https://documents.epfl.ch/_xy-3-1330996_1-890181

     

    Thanks,
    Yorick