7 years, 10 months ago.

load bin over wire to memory and execute 1768

Im trying to work on a bootloader to fetch code over serial/eth/spi/sd directly to memory and exec but having some difficulty. All the examples and questions about bootloaders apears to imply loading to flash but flash will quickly be degrade so basically i need some working examples of correctly compiling and possibly relocating position independent code and data in memory i DO NOT want to flash the device every time i load some functionality and then swap it out for some other wich could happen hundreds or even thousands of times per day or even minute. basically i need an exec() and preferably dlopen/dlsym like shared object functionality. i need to have multiple binary running at the same time loaded over the wire and be able to swap them in and out as needed.

I have been playing with elf loading and dynamic relocation but so far loaded apps crash. some examples of a barebones loader and apps with proper ld scripts proper make instructions would be good. I envision things should be simpler and i should be able to strip the elf out load into desired memory locations and call the memory address however things are more complicated then that and that is where my problem is especially when it comes to dependency's.

Be the first to answer this question.