Paul Burke wrote:
But when the hex file is created, it contains a load record for this
section, all zeroes.
I know three methods:
1) Add NOLOAD flag to your section in linker script:
.driver_data (NOLOAD) :
{
*(rf_tx_buffer) ; /* reserved for TxBuffer */
KEEP (*(rf_tx_buffer))
} > data
But some ld builds (at least in some WinAVR versions) ignore this flag.
Fortunely, second method works always:
2) exclude your new section when msp430-objcopy creates .hex:
$(OBJCOPY) -O ihex -j .driver_data $< $@
3) Add your new section to .bss output section
Sergey.