Updated flashed code is not getting reflected in the hardware

cancel
Showing results for 
Search instead for 
Did you mean: 

Updated flashed code is not getting reflected in the hardware

774 Views
Javad_Baig
Contributor II

Hello,

I am working on FRDMKW38 microcontroller using MCUXpresso IDE , I am facing an issue after flashing the MCU, In IDE Flashing is successful but the code changes are not reflecting in the HW.

1). When I flash and run the example code, in the UART it is printing some messages as mentioned in the code which is fine

2). When I modified the code and run, it is printing the same messages as earlier even when we change the existing messages also it is displaying the old messages only

3) Tried changing the example project to other and flashed the new code. Flashing is successful but the uart msg showing terminal is same as the previous project. 

It is observed that the board is not getting flashed with the latest code, the flashing steps in the IDE is working fine like after uploading the code into device "run"  widget will active and once we ran and see the output latest messages are not getting displayed

Kindly help me out from this as soon as possible

 

Thanks and Regards,

Javad Baig

 

0 Kudos
9 Replies

681 Views
Javad_Baig
Contributor II

Hello,

Thank you for your reply, 

<i>. I am also using debug button only to flash the code and also I tried putting a breakpoint but it is not hitting both to the line which I have modified and also to the main function 

<ii>. I have tried some 4 to 5 sdk examples, the behavior is the same

<iii>. I assume the execution starts from main function which I have mentioned below, the control is not hitting to this function

Javad_Baig_0-1638177543215.png

<iv> Sdk version is SDK_2_6_11_FRDM-KW38 and MCU xpresso version is v11.3.1_5262

 

Kindly help me out from this at the earliest, thanks in advance

0 Kudos

673 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi,

 

Is your project building without errors?

Ricardo_Zamora_1-1638212060175.png

Is there any error on the IDE console after you press the Debug button? Or an error windows appears? Is the debug session starting correctly?

Can try using the GUI Flash tool in the MCUXpresso IDE to erase your device? Are you able to achieve this?

 

Regards,

Ricardo

0 Kudos

662 Views
Javad_Baig
Contributor II

Hello,

 

Yes my project is building without error, and no error found in the console. Executable is generating without any error

 

I tried to erase using GUI console it throw below error

Javad_Baig_0-1638270580119.png

In console the below error displayed 

Javad_Baig_1-1638270665944.png

 

 

Note: - I am debugging using Segger J-Link probes, also I tried for MCUXpresso IDE Link server but it was not working

Thank you

0 Kudos

587 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi,

 

From your console screenshot, your flash is write-protected.

Could you try to restore the Flash Configuration?

Ricardo_Zamora_1-1638833617582.png

 

Regards,

Ricardo

0 Kudos

528 Views
Javad_Baig
Contributor II

Hello,

 

Sorry for the delayed response, I tried restoring the configuration by clicking on the below run button

Javad_Baig_0-1639385285902.png

 

after that I tried to Erase the Flash blank I am getting the same error i.e., Flash is write protected 

Javad_Baig_1-1639387235011.pngJavad_Baig_2-1639387305364.png

Kindly helpme out from this error, Thanks

0 Kudos

637 Views
Javad_Baig
Contributor II

Hello,

 

Any update on this?

 

0 Kudos

759 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi,

 

Hope you are doing well. Could you please describe the procedure you are following? Are you using the GUI Flash Tool?

Are you able to debug correctly a project?

Which SDK examples are you using? What modification did you do?

 

Regards,

Ricardo

0 Kudos

747 Views
Javad_Baig
Contributor II

Hello,

Thank you for your reply,

1) I used the below steps to flash the FRDMKW38,  

Javad_Baig_0-1637900938258.png

 

2) I am using wireless uart freertos example code from the sdk to flash

3) I have changed the below text just to see changes are replicating(means updated code is flashing or not) but when I observed in serial monitor it is sending the old text only.

Note: the below text will print first once we run the example code after flashing 

Javad_Baig_1-1637901266977.png

4) and also it is observed that when I start debugging, control is not coming to the main function(where I have put the breakpoint)

 

 

0 Kudos

723 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hi,

 

Thank you for your reply. Could you please try to use the debug button?

Ricardo_Zamora_1-1637945739500.png

And put a breakpoint in the line you modified. Are you able to get to that line?

 

Could you try with another SDK example?

From your 4th point, I am not sure if you modified something else in the example, could you please clarify? And which is the function you are referring?

 

Also, to try to replicate your issue, what MCUXpresso IDE and SDK versions do you have?

 

Regards,

Ricardo

0 Kudos