I have three binaries for specific memory addresses that I want to combine with srec_cat filling the holes with 0xFF.
- bootloader.bin —> 0x1000
- conf.bin —> 0x8000
- app.bin —> 0x10000
Memory map
|- pad w/ 0xFF -|- *bootloader* ~~~ pad w/ 0xFF -|- *conf* ~~~ pad w/ 0xFF -| - *app* ~~~|
0 0x1000 0x8000 0x10000
~~~ signifies a "fluid" boundary i.e. the binary to the left of it doesn't have a fixed size.
CLI arguments
I am a bit lost between the −fill, -binary and -offset options that I read about on http://srecord.sourceforge.net/man/man1/srec_examples.html#BINARY%20FILES. Is there a way to tell srec_cat to fill anything between 0x1000 and 0x8000 that is not occupied by bootloader.bin (regardless of what size the .bin actually has)?
I tried this myself and I believe this will do what you want.