Topics

embed data files


adpauly@...
 

Dear Experts,

I am new to zephyr and working with nRF9160dk related development.

For testing some functionalities, I thought to include some 'raw resource binary data file' in the code as in the linux's "/etc/<some_config_file>". I am using segger studio. Is it possible to embed some data files in the code and to build an application ? I did a search in the samples, but did not find anything similar. 

Thanks,


Jukka Rissanen
 

Hi,

there are multiple networking samples that do this. Search generate_inc_file_for_target() to see some examples.

Cheers,
Jukka


On Thu, 2020-07-23 at 01:17 -0700, adpauly@... wrote:
Dear Experts,

I am new to zephyr and working with nRF9160dk related development.

For testing some functionalities, I thought to include some 'raw resource binary data file' in the code as in the linux's "/etc/<some_config_file>". I am using segger studio. Is it possible to embed some data files in the code and to build an application ? I did a search in the samples, but did not find anything similar. 

Thanks,


artur.lipowski@...
 

Hi,

I usually use srec_cat utility for that purpose.
You can see quite good description here: http://www.keil.com/support/docs/2218.htm

Sometimes also classic xxd tool can be handy: https://linux.die.net/man/1/xxd

Regards,
Artur