When I compile my code, I end up getting Motorola S records ( a.mot ) with spaces (the entire range of addresses does not apply to code and data).
I want to fill in these spaces with a template 0x01 0x80. However, it is important that all pairs of two bytes begin with even addresses. 0x0180is the operation code from my micro, which I want to execute if the PC reaches the address of the unused area of the flash memory.
Before you start answering, I would like to tell you that -repeat-data strong> in srec_cat has a problem:
- Given two sections, for example. C and D are placed one after the other ( D after C ) in the address space.
- Given that the last byte of section C ends at the address
0x76, and the first byte of section D is at the address 0x78. In other words, between them there is 1 byte gap at the address 0x77.
Under such conditions, if I use the -repeat-data0x01 0x80 parameter , srec cat will fill this one byte with 0x01and start filling in the next space from 0x80.
I do not know the size of these sections, because the linker processes it.