Flash protection with IAR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Flash protection with IAR

跳至解决方案
2,374 次查看
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.

标记 (2)
1 解答
2,153 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

3 回复数
2,153 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

2,153 次查看
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 项奖励
回复
2,154 次查看
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!
-----------------------------------------------------------------------------------------------------------------------