We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi
I have trying to see if I could find any linker switch or code macro, to "import" a file from my PC into my resulting HEX/BIN/AXF file when building my application.
Is this possible.?
Perfered would be to have a variable(a pointer) to point to the imported data after the build.
/Thomas
As far as I know, the best you can do is either hard code the code, or use IAP.
Mmhh.. ok
If I use IAP, I then has to, under production, first load my application. Then the application must load the needed binary data from some source(seriel, USB etc) and use IAP to store it.
I guess, it would be possible to first flash my program and then flash the binary data in a diffrent area of the MCU (or in a sperate sector)??
if you want to update the program itself, you will then have to either use a bootloader or run the flash procedure from a RAM based function. reset, collect the binary data and flash.
Use a pre-build rule to run a helper program that converts your external file into a C code array like:
const char my_file[] = { 0x15,0x17,0xfe,... };