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.

How include binary file in C project for IAR and CCE?

Hello Collegues,

I often use binary data in projects (calibrations, image, picture and etc). Often, i convert binary file to hex-text format by handmake programm and I add it in source code by simple unsigned char array[]. It is not sutiable for large datas. Can i include simple binary file in my project when i linking or compile project? How i can get data after?

Thanks, Mike

  • I'm not aware of any mechanism in CCE to include just binary files.  The process you mentioned regarding converting to a Hex file format for inclusion in an unsigned char array[] is the main mechanism I have seen.

    I don't believe IAR has this capability either, simply because I found mention of Extending the tool chain in IAR to "convert binary files, for example bitmap files or audio data, to a table of data in an assembler or C file format."
    This was found in the EW430_UserGuide.pdf of the IAR documentation.

  • Hello!

    When you say that it's not suitable for large data, you mean that your data does not

    fit into the internal flash?

    If you need extra space, you may consider an external memory like I did in this

    experiment : http://passworld.co.jp/ForumMSP430/viewtopic.php?f=2&t=147

    The japanese character take about 200 ~ 250 kBytes. I have used an external

    4MBytes Atmel SPI flash. And I use a micro SD card to load data into this flash.

     

    Pascal

    Promelectronics said:

    Hello Collegues,

    I often use binary data in projects (calibrations, image, picture and etc). Often, i convert binary file to hex-text format by handmake programm and I add it in source code by simple unsigned char array[]. It is not sutiable for large datas. Can i include simple binary file in my project when i linking or compile project? How i can get data after?

    Thanks, Mike

     

**Attention** This is a public forum