This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to create the image file of an application code?

Hey guys , I'm using the dual-core NXP chip , I do not know exactly how to generate the image file for the slave core to be used by the master core.
I want the image to be a .c or .h file which contains an array of the application code and I read the examples for the NXP and could not understand how it generates the .c image file .
Any ideas ?!!
Thx in advance.

  • Could you cite the web pages or documentation you don't understand?

    Generating .C or .H arrays of hex bytes using simple fopen, fseek, fread, fclose, and printf from an binary image isn't exactly a complicated task, someone with basic C competence should be able to code an app to do that.

    Converting to .BIN, or .HEX you might want to look at Keil's FROMELF utility

    Does the linker need to place the array into a specific load region?

  • Surely, this must be a fundamental requirement for working with this chip - so NXP must have documentation and examples for this ... ?

  • Thx for ur reply , the problem is to create the binary image itself , not reading it .
    The example is the NXP dual-core MCU provided by KEIL
    www.lpcware.com/.../lpc43xx-dual-core-examples
    The example outputs an image file from the Cortex-M0 project in the form of a C file that includes constant array which holds the app.
    The file is then included in the second project (the Cortex-M4).
    The array is like that
    unsigned char LR0[] = { 0x18,0x84,0x00,0x00,0xD5,0x00,0x00,0x00,0xD9,0x00,0x00,0x00,0xDB,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,0x00,0x00,0x00,0xDF,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE3,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xEB,0x00,0x00,0x00,0x15,0x01,0x00,0x00,0xEB,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xEB,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xEB,0x00,0x00,0x00, 0xEB,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xD1,0x01,0x00,0x00, 0xEB,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xEB,0x00};
    Im sure there is some command in the user menu in the target options that generates the image file , but i do not understand it .
    Any ideas?