KDS Flash Security Bit

cancel
Showing results for 
Search instead for 
Did you mean: 

KDS Flash Security Bit

1,012 Views
hervegarat
Contributor II

Hi All,

 

I'm trying to make a binary file and dowload it in my K64F using OpenSda MSD via a K20.

 

I'm able to create a binary file via KDS but when I paste it in then OpenSda MSD I have a "RESERVED BIT" failure.

The solution seems to be to set the FSEC bit :Binary (and S19) Files for the mbed Bootloader with Eclipse and GNU ARM Eclipse Plugins | MCU on Ecl...

 

So I'm searching how to set the Flash security(FSEC) bit in KDS with Processor Expert.

 

Thanks in advance

 

Hervé

Labels (1)
4 Replies

130 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Herve:

In that blog Erich recommends to set the FSEC byte (not bit) to 0xFE. As you can see in the same blog, you have to set this in the Flash Configuration Field value as showed with the pictures.

- For a project with PEx + KSDK: You will find this configuration in the file startup_MK64F12.S:

startup.png

- For a project with only PEx: You can disable code generation for the CPU component (right click on component -> Code Generation -> Don't Write Generated Component Modules) and changing the FSEC field in CPU_Config.h:

CPU_Config.png


Regards!,
Jorge Gonzalez

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

130 Views
hervegarat
Contributor II

Hello Jorge,

Thanks for your repply.

In my project I use PEx + KSDK. So I look the file ./MQX_KSDK_1.0.0/platform/startup/MK64F12/gcc/startup_MK64F12.S and the byte FSEC is equal to 0xFE.

Are you sure this file is used for linker? How can I verified?

Hervé

0 Kudos

130 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi Herve:

Yes, that file contains the section called ".FlashConfig" and this section should be referenced from the linker like this:

pastedImage_3.png

To verify the linker file used by your project you can go to Properties -> C/C++ Build -> Settings -> Cross ARM C++ Linker -> General:


Regards!,
Jorge Gonzalez

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

0 Kudos

130 Views
hervegarat
Contributor II

Hi Jorge,

I resume:

- My linker file is "./Project_Settings/Linker_Files/ProcessorExpert.ld", and there is  the right section .FlashConfig as you show in your post.

- I have a file "./MQX_KSDK_1.0.0/platform/startup/MK64F12/gcc/startup_MK64F12.S" in which  the byte FSEC is equal to 0xFE

So everything seems to be good,

BUT

In my binary file the adresses 0x0000400 to 0x00000410 are all equals to 0.

Can you help me please?

Thanks,

Hervé

0 Kudos