Topic : Possible inconsistency with Memory mapping btw STR91x Datasheet & .ld

Forum : ARM

Original Post
Post Information Post
March 16, 2007 - 10:36am
Guest

Hello,

In the file of /RIDE/LIB/STRX/STR91xFx44_FLASH.ld, there is a memory declaration as follows:

MEMORY
{
FLASH (rx) : ORIGIN = 0, LENGTH = 512K
FLASHB1 (rx) : ORIGIN = 0x00400000, LENGTH = 32K
EXTMEMB0 (rx) : ORIGIN = 0x30000000, LENGTH = 64M
EXTMEMB1 (rx) : ORIGIN = 0x34000000, LENGTH = 64M
EXTMEMB2 (rx) : ORIGIN = 0x38000000, LENGTH = 64M
EXTMEMB3 (rx) : ORIGIN = 0x3C000000, LENGTH = 64M
RAM (xrw) : ORIGIN = 0x50000000, LENGTH = 96K
}

Question 1) With STR91xFx44 data sheet, the FLASHB1 address should start just behind the 512K flash.
therefore, its ORIGIN = 0x00080000, LENGTH = 32K

Question 2) Can the attributes of EXTMEMB0-4 include w too? that is EXTMEMB0 (rwx) : ....

Many Thanks,

Jim

Replies
Post Information Post
+1
0
-1
March 16, 2007 - 10:55am
Raisonance Support Team

Hi,

First, please note that this file is generated at each link according to the options. (when the default linker script is used)
This particular part of the file is copied from "STR91xFx44_DEF.ld" and then modified to match the options. I suggest you have a look at "STR91xFx44_DEF.ld" and it should be clearer. You'll also find more information in the "Getting Started STRx" doc, especially section 2.4.2.

The address of the Flash Bank 1 is variable and can be entered by the user in the target options. Click "options"->"target"->["options" tab]->"High Bank Address". Then, it is your responsibility to write the code, in the main function, that will configure the Flash for the associated addresses and sizes you selected in the options. The target options only tell the linker where the code will be when it will be executed, but the Flash config has to be done dynamically by the application itself. :/

Regarding the 'w' for the external memory, you're right.
It's my mistake, I'll correct it in the next version of RIDE. :(
In the meantime, you just need to add the 'w' yourself in "STR91xFx44_DEF.ld" (NOT in "STR91xFx44_FLASH.ld") and it should do the trick!

Best Regards,

Vincent

+1
0
-1
March 16, 2007 - 11:08am
Guest

Thanks vincent again for your quick and accurate answer.

Jim