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.

Compiler/CCSTUDIO: how to generate .bin file

Part Number: CCSTUDIO
Other Parts Discussed in Thread: MSP430AFE253

Tool/software: TI C/C++ Compiler

Hello everybody,

Situation is I have prepared a custom bootlader for the MSP430AFE253 device, there will be hundreds of them and another device which we call controller should perform the firmware upgrade when necessery. The thing is I want to reduce the firmware upgrade time as much as possible and for that I dont want to use the "MSP430HexUtility" which provides txt files that are nearly 3 times bigger in size than the .text in flash.

Thus, I was thinking about using Binary Files but I couldn't find it out how to make compiler produce them. (I did some searching.)

I don't think padding of zeroes is gonna be a problem for me since my APP resides in flash area 0xC000-0xFA00(Including Proxy Vectors & Reset Vector) and its more than %95 filled.

I tried  http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/65174/826785.aspx#826785 , it didn't work.

I have also read the Assembly Language Tools- Section 12: Hex Conversion Utility Descripton, when I tried to make my .cmd file according to the one I saw in documentation I get "Can't Find file ROMS" Error

I must point that I am quite a newby on concepts such as Linkers, Compilers, Makefiles etc. I only have a partial knowledge on them. Ifthe solution is related to them I would appreciate a nice and clear explanation.

I am using CCS v8.1.0,

  • If you have access to the Linux utility objcopy, use that.  A command similar to this will work ...

    % objcopy -I elf32-little -O binary input_file.out output_file.bin

    The file input_file.out is created by the MSP430 linker.  The file output_file.bin is created by objcopy.  

    If you don't have access to a Linux objcopy, then you can use objcopy that comes with the GCC MSP430 compiler inside CCS.  The full path to the command is similar to ...

    C:\ti\ccsv8\tools\compiler\msp430-gcc-6.4.0.32_win32\bin\msp430-elf-objcopy

    Thanks and regards,

    -George

  • Hello George, sorry that I couldn't check the forum for a while. I was busy doing some other works.

    I will try this, and post a feedback soon.

    Meanwhile, ı got confused how to use the objocpy utility, is that a command to enter on cmd for Windows, or am I supposed to type this in linker command file ?(I am not using Linux, I have Windows 10. I found the executable msp430-elf-objcopy). And how should I choose the name for the output file, is the executable supposed to create it whatever I name it ? And where does it place the .bin file? Inside the debug folder of the project ?

    I saerch the keyword "objcopy" in SLAU646C(MSP430 GCC User Guide), There are diagrams showing sections in the Project Properties under build such as "GNU Linker" "GNU Object Utility" "GNU Compiler" When I check mine, I dont see anything related to GCC.

    Thanks in advance, Have a nice day
  • Thanks,George, I copied the msp430-elf-objcopy executable to debug folder, and add this line;

    "C:\Users\TOVURA\workspace_v8\AFE253_API_1\Debug\msp430-elf-objcopy.exe -I elf32-little -O binary AFE253_API_1.out output_file.bin
    "
    to post build

    It generates the binary file named output_file.bin, Thanks a lot ^^