EmbeddedRelated.com
Forums

Cosmic Mystery: segment placement

Started by Longworth, Kevin February 6, 2004
Board:

I have a very strange thing going on using Cosmic Compiler and linker. I
made a pragma to declare a section called secur in order to place Flash
security and protection bytes in cost memory at location $FF00, 16 bytes
of constant data total: #pragma section const {fsecur} .

In the link file I tried to place it:

+seg .fsecur -b0xFFF00 -o0xFF00 -m0x16 -nFLASH_SECURITY
FlashSecurity.o

but I got this in the mapfile:

start 000fff00 end 000fff10 length 0 segment FLASH_SECURITY - No
memory was allocated.

To make a long story short, I ended up just changing the name of the
segment to fsecur, and got the 16 bytes allocated in the mapfile. But
when I went back to the name "secur", I get a "no default placement for
section secur" error. Going back to the name "fsecur" works fine. Does
anyone have any insight into this apparent mystery?

- kevin




Sorry I meant I tried to name the segment secur which didn't allocate
any memory as if the segment weren't found at all, but when I named it
fsecur, it did the allocation and placement of the const data.

- kevin

-----Original Message-----
From: Longworth, Kevin
Sent: Friday, February 06, 2004 11:36 AM
To:
Subject: [68HC12] Cosmic Mystery: segment placement Board:

I have a very strange thing going on using Cosmic Compiler and linker. I
made a pragma to declare a section called secur in order to place Flash
security and protection bytes in cost memory at location $FF00, 16 bytes
of constant data total: #pragma section const {fsecur} .

In the link file I tried to place it:

+seg .fsecur -b0xFFF00 -o0xFF00 -m0x16 -nFLASH_SECURITY
FlashSecurity.o

but I got this in the mapfile:

start 000fff00 end 000fff10 length 0 segment FLASH_SECURITY - No
memory was allocated.

To make a long story short, I ended up just changing the name of the
segment to fsecur, and got the 16 bytes allocated in the mapfile. But
when I went back to the name "secur", I get a "no default placement for
section secur" error. Going back to the name "fsecur" works fine. Does
anyone have any insight into this apparent mystery?

- kevin

--------------------To learn more
about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu
o learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu

_____

> .