Special section and output file

View: New views
3 Messages — Rating Filter:   Alert me  

Special section and output file

by Paul Burke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've added a section to the linker script, a chunk of RAM separated for
my own nefarious purposes. All well and good, I can allocate objects in
it etc.

But when the hex file is created, it contains a load record for this
section, all zeroes. Bummer, it means that the JTAG load verify fails
which is a pest. Everything runs OK, but it's an annoyance as I now
can't tell if there's an error in the real bit.

So the question is, how do I suppress hex record production in the
linker script?

Paul Burke

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@...
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Re: Special section and output file

by Sergey A. Borshch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@...
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Re: Special section and output file

by Sergey A. Borshch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sergey A. Borshch wrote:

> 2) exclude your new section when msp430-objcopy creates .hex:
> $(OBJCOPY) -O ihex -j .driver_data  $< $@

Sorry, $(OBJCOPY) -O ihex -R .driver_data  $< $@

Sergey.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@...
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
LightInTheBox - Buy quality products at wholesale price