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

Parents
  • 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,

Reply
  • 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,

Children
No Data