Topic : absolute address does not match the memory space

Forum : ST7/STM8

Original Post
Post Information Post
June 25, 2010 - 12:10pm
Guest

Hi,

I am using the rasonance compiler sith STM8L15x device.
In my application I am using a large amount of data and I want to force the address of my buffer.
I have declared my buffer as following: at 0x300 uint8_t Text[112];
I got the following warning message and I want that It disappears.
In STM8 C compiler manual I have found "at 0xBE char mychar;" which is a single byte declaraton but in my code I am using a whole buffer. Is it related to the fact that I am using an array ?

My code is working fine but having such warning message disturbs me :(((((

Could you help me how to remove it ?
Thanks in advance.

Cordialement,

Replies
Post Information Post
+1
0
-1
June 25, 2010 - 2:37pm
Raisonance Support Team

Hi Bada,

The problem comes from your default global memory space, which is set to "page0". So your "Text" buffer should have an address in the [0x00-0xFF] range; as you force it to address 0x300, which is out of the range, the compiler complains.

The solution is to override the "page0" default attribute to "data", which makes your buffer in the [0x0000-0xFFFF] range.

So use this instead:
at 0x300 data uint8_t Text[112];

Regards,
Bruno

+1
0
-1
June 25, 2010 - 3:02pm
Guest

Hi Bruno,

Thanks for this fast support.
I have tried it and it is working fine now. I get rid of the warning message.
I am very thankful.

Cordialement,
Bada380