Topic : Code size memory (.ms7 info)

Forum : ST7/STM8

Original Post
Post Information Post
January 11, 2007 - 12:16pm
Guest

Hi to all.

I have a question.

I'm using st72f324bj4 (16k flash 512 ram).

Looking at .ms7 I see the following:

TYPE BASE LENGTH RELOCATION SEGMENT NAME
---- ---- ------ ---------- ------------

* * * * * * * * D A T A M E M O R Y * * * * * * * *
DATA 0080H 0080H AT ram0
DATA 0205H 0061H AT ram1

* * * * * * * * C O D E M E M O R Y * * * * * * * *
CODE C000H 0002H AT crc
CODE C002H 3D04H AT flash

***WARNING 4: CODE SPACE MEMORY OVERLAP
CODE FD00H 0065H AT tab
FD65H 025BH *** GAP ***
CODE FFC0H 0020H AT string
CODE FFE0H 0020H AT vectit

EXECUTABLE SUMMARY:
-------------------
Total EEPROM storage requirement: 0000H (0)
Total DATA storage requirement: 00E1H (225)
Total CODE storage requirement: 3DA5H (15781)

Why I see the overlap warning if I have more space on the micro ?

Thanks to all.

Enrico Passoni

Replies
Post Information Post
+1
0
-1
January 11, 2007 - 1:45pm
Guest

look at the 'flash' segment : it begins at 0xC002 and ends at 0xC002+0x3D04=0xFD06
and the 'tab' segment begins at 0xFD00.

So the bytes between 0xFD00 and 0xFD06 are mapped in both segment. Maybe the 'tab' segment is declared as an absolute segment, and explicitly positioned at 0xFD00 ?

regards
Lionel

+1
0
-1
January 11, 2007 - 2:07pm
Guest

Yes, you are right.

the 'tab' segment is declared in an absolute segment explicitly positioned at fd00.

I will try shift the table and other segments.

I tried to fill the code memory and I get 'memory code overlap' from ride exacly at 16384= 16k (16k micro).

Thank you very much.

Enrico Passoni

+1
0
-1
January 11, 2007 - 3:30pm
Guest

Woudn't it be simpler to use relative segments instead of absolute ones ? The latter should only be used when absolutely necessary. If you use relatively positioned segments, the linker will take care of filling the memory correctly.

Just my 2 cents...

regards
Lionel

+1
0
-1
January 12, 2007 - 9:20am
Guest

Hi Lionel,thanks for the support.

I have 2 question for you,if you have time.

1)

To use relative segment istead absolute i need only to do the following

now is

tab segment code at 0FD00h ;
aseg tab ;temperature table.

t001:
t002:
etc...

With relative table:

tab segment code
rseg tab

Is it correct ?

2) I'm using ride for st7 with asm only (I need to learn c!,I'm tired to game with bits).

I'm using st7 324 series 32 pin 44 pin 16k 32k with BN743.

I see that there are new release of the ride.
I remember that I tryed bn744 but it have some little bugs like inverted option bytes for some st7.

Do you think that I need to change to the last bn or do you think that is more reliable the bn743 for the st7324 series ? for now I use mast7 assembler only.

Thank you again.

Enrico Passoni

+1
0
-1
January 12, 2007 - 10:13am
Guest

Hi Enrico :

1. Yes this syntax is correct. You have plenty of examples and further explanations in the documentation! Don't forget to read it (MAST7.PDF and RLST7.PDF in DOC)

2. The option bytes have been corrected. You can upgrade to the latest version without problem.

regards
Lionel