Linking Prebuilt Binaries


Casey Shea
 

Hello,

I am looking for a method to link prebuilt binaries so that they are included in my zephyr application binary file.  These are not code libraries, they are actually just images of logos that get written to a display at runtime.  In a previous version of this project, using IAR, I was able to do the following:


--image_input logo1.obj,__logo1Start__,EXTERNAL_CONST_FILE,4
--image_input logo2.obj,__logo2Start__,EXTERNAL_CONST_FILE,4

where EXTERNAL_CONST_FILE was defined in the linker definition via the following method:

define block Internal_Code with fixed order 
  ro section .text,
  ro section CODE,
  ro section LOCAL_CODE,
  ro data section EXTERNAL_CONST,
  ro data section EXTERNAL_CONST_FILE,
  ro data section LOCAL_CONST,
  ro data section INTERNAL_CONST,
  ro data section __DLIB_PERTHREAD_init,
  ro data section .iar.init_table,
  ro data section .rodata,
  ro data section .data_init,
  ro code section .xip_section_init,
  block ENDALIGN, 
  block END 
};

This method also allowed me to reference the symbols "__logo1Start__" and "__logo2Start__" from within my C source code.

I'm hoping to find a method for doing something similar in the Zephyr application.  I'm sure I could define a specified memory location and link it into that memory location but I'd rather they just be appended to the the application as an ro data section.

Any ideas?

Thanks!

Join users@lists.zephyrproject.org to automatically receive all group messages.