External Controller Bootloading

Hi,

We are trying to have the image of the DA14580 part of the external microcontroller.
In your projects you are saving the image in form of an array - "static const char program_t[IMAGE_SIZE] __attribute__((aligned(***))) = {"
Is there a tool to convert a .bin file to such an array?
How can I produce the array to store in my microcontroller

  • sir

    你能不用中文描述下你的用法呢?

  • Hi,

    I am looking for a tool to convert the Intel Hex file into a array, as the array can be used for serial bootloading. As shown in the SDK 5.0.4 example code

    SDK 5.0.4\DA1458x_SDK_5.0.4\DA1458x_SDK\5.0.4\projects\host_apps\da1458x\proximity\reporter\include\prox_reporter_ext.h file.

  • Hi Sir

    it's easy to find a Hex2bin, actually our utlitiy: utilities\mkimage, this tool convert a Hex file to bin and then add some header and more info and eventually create a image file, I think you can take use of this project and get what you want

  • Hi,

    This file gives me an image file.
    I am looking for formatting the output hex file into a file shown in
    prox_reporter_ext.h
    as given in
    \SDK 5.0.4\DA1458x_SDK_5.0.4\DA1458x_SDK\5.0.4\projects\host_apps\da1458x\proximity\reporter\include

    which will be used by the external processor to serially bootload the Dialog chip.

    Excerpt of prox_reporter_ext.h file as follows -

    #define IMAGE_SIZE 16268 // Image size in bytes

    // Image data - MUST BE ALIGNED(***)
    static const char program_t[IMAGE_SIZE] __attribute__((aligned(***))) = {
    0x00,0x98,0x00,0x20,0xa1,0x04,0x00,0x20,0xa9,0x04,0x00,0x20,0xc1,0x04,0x00,
    0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd9,
    0x04,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0x04,0x00,0x20,
    0xf3,0x04,0x00,0x20,0xab,0x28,0x00,0x20,0x9f,0x29,0x00,0x20,0x0d,0x31,0x03,
    0x00,0x8d,0x29,0x00,0x20,0x13,0x29,0x00,0x20,0x8d,0x31,0x03,0x00,0xb1,0x29,
    0x00,0x20,0xb9,0x29,0x00,0x20,0xf5,0x04,0x00,0x20,0x4b,0x23,0x00,0x20,0xd1,
    0x29,0x00,0x20,0xad,0x31,0x03,0x00,0x57,0x81,0x02,0x00,0xf5,0x04,0x00,0x20,
    0xf5,0x04,0x00,0x20,0x93,0x22,0x00,0x20,0xf5,0x04,0x00,0x20,0xf5,0x04,0x00,
    0x20,0xf5,0x04,0x00,0x20,0x95,0x20,0x00,0x20,0x99,0x20,0x00,0x20,0x9d,0x20,
    0x00,0x20,0xa1,0x20,0x00,0x20,0xa5,0x20,0x00,0x20,0xff,0xff,0xff,0xff,0xff,
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

  • Hi, Vivek,

    The tool you need can be easily found online. Check this post for example:

    http://www.keil.com/support/docs/2218.htm

    Also, please post in the English forum if you're native English speaker :)