linker file attribute section problem

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

linker file attribute section problem

1,121 Views
arthshah
Contributor II

hello kerryzhou

i am working with kinetis KL26Z.

i want to define some section in flash memory like bootloader, for that i am just changing linker file.

it all works fine,it create partition and show this partition in MAP file and LIST file also but when i use debug session and watch memory window there are no partiotion in actual flash memory.

why this happen?

my program also stuck and goes into default ISR.

here i attached some screren shot of my problem,

reply with your ideas.

thanks.

Arth Shah

Labels (1)
0 Kudos
6 Replies

861 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arth,

   You can refer to this post:

Relocating Code and Data Using the KDS GCC Linker File for Kinetis 

 You can relocate the function in your .c file, then check the according flash address again.

Have a great day,
Kerry

 

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

861 Views
arthshah
Contributor II

hello kerry,

thanks for the reply.

i don't want to add my function to other section of flash.

i want to add whole file to other section of flash.

0 Kudos

861 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arth,

  Now, I still don't have the according material for KDS.

But, you can send me your project, I would like to help you to check it.

Have a great day,
Kerry

 

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

861 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arth Shah,

   Yes, you define the m_flash region, but how you put your own data in that region?

   Your map file actually already give the detail address:

pastedImage_1.png

.flash and .txt.ErrorTrap  end address still 0x32800,  Your real .boot_start is from 0x32820, but the end address still seems have problem.

I think your ld file still have problem, please give me more details about how your put your data in the m_flash region.

Have a great day,
Kerry

 

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

0 Kudos

861 Views
arthshah
Contributor II

hello kerryzhou

thanks for the reply.

i have flash.h and flash.c files.

i just simply devide flash.o file into my flash section in linker file.

I didn't change in my program or main file.

whatever changes made is only in linker file.

writing m_flash and create section of it in linker file automatically it puts flash.o file into that particular section.

Thanks

0 Kudos

861 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arth Shah,

   Please give more details about: devide flash.o file into my flash section in linker file.

How did you realize it?

You can give me your linker file. I need to check it.

Have a great day,
Kerry

 

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos