8.3.6 Fill Option
--fill=option
option fills unused program memory. It is currently available for only PIC32M devices. The general form of this option is:--fill=[wn:]expression[@address[:end_address] | unused]
where address
and end_address
specify the range of program memory addresses to fill. If end_address
is not provided, then the expression will be written to the specific memory location at address address
. The optional literal value unused
may be specified to indicate that all unused memory will be filled. If none of the location parameters are provided, all unused memory will be filled. The expression
will describe how to fill the specified memory. The following options are available:
xc32-ld --fill=0x12345678@unused
xc32-ld --fill=1,2,3,4,097@0x9d000650:0x9d000750
xc32-ld --fill=7+=711@unused
By default, the linker will fill using data that is instruction-word length. For 32-bit devices, the default fill width is 32 bits. However, you may specify the value width using [wn:]
, where n
is the fill value's width and n
belongs to [1, 2, 4, 8]. Multiple fill options may be specified on the command line; the linker will always process fill options at specific locations first.