KW38-Not able to flash SDK bootloader code-Verification error at 0x40d: mem = 0xFF, file = 0xFB -IAR

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

KW38-Not able to flash SDK bootloader code-Verification error at 0x40d: mem = 0xFF, file = 0xFB -IAR

Jump to solution
1,874 Views
Vishva
Contributor II

Hi,

1) I have tried to flash Bootloader sample code from SDK in both IAR and MCUXpresso IDE - unsuccessful in both.

Got the following error: Verification error at 0x40d: mem = 0xFF, file = 0xFB
Download completed but verification failed.

2) Tried "Mass Erase" using GNU Flash tool available in MCUXpresso IDE.

After Mass erase,

3) Using MCUXpresso IDE - I'm able to flash all SDK examples except Bootloader.

4) Using IAR- I'm not able to flash Bluetooth Wireless RTOS examples and Bootloader code.

For Wireless RTOS examples I'm getting - Fatal Error[Pe1696]: cannot open source file "nxp_xcvr_gfsk_bt_0p5_h_0p5_config.h" 

For Bootloader same error as point 1.

Please let me know how to resolve this issue and flash the bootloader code.

I'm trying to flash Bootloader code for testing OTAP.

Thanks in advance.

0 Kudos
Reply
1 Solution
1,824 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @Vishva 

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

There is a section in Kinetis devices that is protected by IAR or some other IDEs. The main reason is to avoid customers accidentally blocking the part. By default, IAR identifies such section and avoid any writing to those flash sections. 

If you want to write those flash "protected" sections, you need to enable writing in IAR settings. You could look at the next community post for this protected area.

https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-protection-with-IAR/m-p/673320#M41370

Our bootloader has the option to write flash protected space. You could configure some #defines in the project to disable NMI by default or to protect some section of flash if desired. In this case, we try to disable NMI by default, however, the IAR IDE is protecting the flash protection for safety about human errors when writing software.

Anyway, you can follow the above post to avoid the verification error message. Have in mind that you need to be careful about what you write in the FSEC flash address, you might block the part if a wrong value is set. 

Regards,

Mario

View solution in original post

0 Kudos
Reply
4 Replies
1,838 Views
Vishva
Contributor II

Hi Mario,

Thank you for your response.

I used MCUXpresso and flashed the Bootloader OTAP code(From SDK example). No errors, please check the attachment.

On top of it i have flashed otap_client_att_freertos code. Functionality is working as expected (I was trying this Procedure for OTA implementation)

 

When i used IAR and Flashed Bootloader OTAP code (from SDK example) i got the following error,

Verification error at 0x40d: mem = 0xFF, file = 0xFB. Download completed but verification failed.

After this if i flash any code, bm or RTOS i was getting the following error,

Fatal Error[Pe1696]: cannot open source file "nxp_xcvr_gfsk_bt_0p5_h_0p5_config.h" 

 

Please check and let me know your comments on this.

Thanks

 

1,825 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @Vishva 

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

There is a section in Kinetis devices that is protected by IAR or some other IDEs. The main reason is to avoid customers accidentally blocking the part. By default, IAR identifies such section and avoid any writing to those flash sections. 

If you want to write those flash "protected" sections, you need to enable writing in IAR settings. You could look at the next community post for this protected area.

https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-protection-with-IAR/m-p/673320#M41370

Our bootloader has the option to write flash protected space. You could configure some #defines in the project to disable NMI by default or to protect some section of flash if desired. In this case, we try to disable NMI by default, however, the IAR IDE is protecting the flash protection for safety about human errors when writing software.

Anyway, you can follow the above post to avoid the verification error message. Have in mind that you need to be careful about what you write in the FSEC flash address, you might block the part if a wrong value is set. 

Regards,

Mario

0 Kudos
Reply
1,811 Views
Vishva
Contributor II

Hi Mario,

Thank you for the response.

Understood your points.

 

Tags (1)
0 Kudos
Reply
1,848 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @Vishva,

I hope you are doing great.

I am working on your issue. I replicated the issue that you are facing working on IAR.

I will get back to you as soon as possible.

In the meantime, could you please try with the MCUXpresso examples?

Regards,

Mario

0 Kudos
Reply