Flash protection with IAR

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

Flash protection with IAR

Jump to solution
1,791 Views
enriquelopez
Contributor I

Hi, I'm using KL26; Someone tried to use flash protection with IAR?, I tried to do this by modifying the FSEC register from the .Hex file but I did not get it.

I use the j-link programmer.

Thanks.

Tags (2)
1 Solution
1,570 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Enrique Lopez,

    Thank you for your more details.

    IAR is special to modify the flash configuration field, you need to do some configuration in the options.

  After you modify the FOPT FSEC filed, do the IAR option configuraiton like this:

 Project->options, click the below edit button.

pastedImage_1.png

pastedImage_2.png

Enter :” --enable_config_write “ in Flash loader configuration windows.

Save the .board file as another .board, and choose that.board.

Then try again.

Wish it helps you!


Have a great day,
Kerry

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

View solution in original post

3 Replies
1,570 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Enrique Lopez,

   If you modified the FSEC, you need to do the reset, then the debug interface will be secured.

   Actually, you can modify the code lash address 0x40c, then download it to the flash, do the reset.

  When you use the JLINK programmer, you need to select the MKL26 allow security, otherwise, the flash configuration field won't be modified.

pastedImage_1.png

Please try again.

If you still have question about it, please let me know!


Have a great day,
Kerry

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

1,570 Views
enriquelopez
Contributor I

It has not worked for me.

I am trying to modify the FSEC register from the .hex file but it has not worked.

I want to enable read and write protection flash loading the FSEC register with 0xCC.

How can I change the FSEC record from IAR software?.

.Untitled.png

Thanks for your help Kerry.

0 Kudos
Reply
1,571 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Enrique Lopez,

    Thank you for your more details.

    IAR is special to modify the flash configuration field, you need to do some configuration in the options.

  After you modify the FOPT FSEC filed, do the IAR option configuraiton like this:

 Project->options, click the below edit button.

pastedImage_1.png

pastedImage_2.png

Enter :” --enable_config_write “ in Flash loader configuration windows.

Save the .board file as another .board, and choose that.board.

Then try again.

Wish it helps you!


Have a great day,
Kerry

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