LCF file, locate default .text code into multiple sections

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

LCF file, locate default .text code into multiple sections

1,570 Views
leccy
Contributor III

I have a project which requires a routine to be located at a particular address in internal flash, to be accessed from a legacy boot-loader program.

 

This address lies in the middle of the memory range.

 

I would like to be able to create a section either side of this address.

 

The default LCF entry for .text is:

.text :

  {

    * (.text)

    . = ALIGN(0x4);

    * (.rodata)

 

 

    . = ALIGN(0x4);

    ___ROM_AT = .;

    ___DATA_ROM = .;

  } > m_text

 

I have had to define the m_text section as:

m_text     (RX) : ORIGIN = 0x0000C410, LENGTH = 0x00053BF0

to accommodate the boot-loader routine section which appears directly after this section.

 

I would like to define another section, say m_text_2, above this section to leave my boot-loader routine section intact.

 

Is it possible to have the linker place .text into 2 sections automatically?

 

I would prefer to not have to change the address of the boot-loader routine to maintain units in the field.

 

Many thanks

Alex

Labels (1)
0 Kudos
Reply
3 Replies

1,436 Views
leccy
Contributor III

It is Kinetis, on CW10.3, FSL ARM compiler.

0 Kudos
Reply

1,436 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Alex

I think an4489 should include the information you need. can you please check it
http://cache.freescale.com/files/soft_dev_tools/doc/app_note/AN4498.pdf

can this help you?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,436 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Alex,

the answer depends on what chip and CW version you work with?

if kinetis,  you use CW FSL ARM compiler, right?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply