m_flash_config address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

m_flash_config address

1,322 Views
davesturgess
Contributor II

Above the end of the interrupt vectors (0x01FF) there is an unused flash memory region of 0x0200 bytes after which m_flash_config is defined. Is it possible to relocate m_flash_config to 0x0200 to make use of this unused flash memory.

m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000200

m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0001FBF0
m_data (RW) : ORIGIN = 0x1FFFE000, LENGTH = 0x00008000 

I have tried but it does not seem to work.

Thanks

Dave

Labels (1)
0 Kudos
Reply
4 Replies

1,001 Views
davesturgess
Contributor II

Hi Earl

Thank you for your reply, I thought that was the case but hoped there was a work around. Yes I could force something there, is there a way to make the linker use this area automatically as an extension of the "m_text" memory? I tried the following and other options which seemed logical but the linker did not like them.

/* Specify the memory areas */

MEMORY

{

m_interrupts (RX) :       ORIGIN = 0x00000000, LENGTH = 0x00000200

m_text (RX) :                ORIGIN = 0x00000200, LENGTH = 0x00000200       <ADDED

m_flash_config (RX) :   ORIGIN = 0x00000400, LENGTH = 0x00000010

m_text2 (RX) :              ORIGIN = 0x00000410, LENGTH = 0x0001FBF0

m_data (RW) :              ORIGIN = 0x1FFFE000, LENGTH = 0x00008000

}

/* The program code and other data goes into internal flash */

.text :

{

. = ALIGN(4);

*(.text) /* .text sections (code) */

*(.text*) /* .text* sections (code) */

*(.rodata) /* .rodata sections (constants, strings, etc.) */

*(.rodata*) /* .rodata* sections (constants, strings, etc.) */

*(.glue_7) /* glue arm to thumb code */

*(.glue_7t) /* glue thumb to arm code */

*(.eh_frame)

KEEP (*(.init))

KEEP (*(.fini))

. = ALIGN(4);

} > m_text

It reads like the linker can concatenate ".text" sections.

Thanks again

Dave

0 Kudos
Reply

1,001 Views
egoodii
Senior Contributor III

Sorry, the linker is not going to be 'smart enough' to find the 'best fit' for a 'random size block' for you.  It can concatenate resources to a 'larger contiguous chunk', but will not like 'non-contiguous'.

1,001 Views
davesturgess
Contributor II

Hi Earl

Thanks for that information, you have saved me a lot of time trying.

Best regards

Dave

0 Kudos
Reply

1,001 Views
egoodii
Senior Contributor III

The short answer is 'no'.  The addresses '0' and '0x400' are interpreted by hardware at startup, and cannot be moved.  Find something 'else' to fill this little hole with!