Topic : Relocatable Segments begin and end

Forum : 8051

Original Post
Post Information Post
September 19, 2008 - 10:36am
Guest

Hi,

I wonder if there is a simple way to get the beginning and end of a Relocatable Segment?

This would help me very much with the startup file for the project!

Mikael

Replies
Post Information Post
+1
0
-1
September 24, 2008 - 1:38pm
Guest

Hi

Here is a suggestion:

"SFE (DATA)" has to be a symbol located at the end of the segment. A segment can be split in so-called 'partial segments' declared in different modules. The partial segments will be grouped by the linker when the name is the same.
When reading the modules (ordered in the command lines), the linker concatenates the partial segments in the same order
The solution consists in creating an extra partial segment with a single byte. You have to define your symbol at the address of this single byte.
Then, to be sure that this partial will be the last partial segment in the list, you have to place this module at the very last position in the list of the modules. If you have a RIDE project, the order of the modules will be the order of the nodes in the project window. You can easily move a node (shift down/up) after selecting it.

matloub