How to make Mcuxpresso erase and program only necessary "Pages" and not "Sectors"?

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

How to make Mcuxpresso erase and program only necessary "Pages" and not "Sectors"?

跳至解决方案
1,790 次查看
AKdy
Contributor I

I have written a custom bootloader and app that share a sector. Thus I don't want the programmer to erase the whole sector while programming either of them.

If I align my bootloader and app based on sector size, it works fine. 

I understand erasing page reduces the life of the flash but I'm tight on memory.

My device is LPCxpresso55S36 and I'm using MCUXpresso 11.7.

I guess I need to do something like what mentioned here but I can't find the setting.
Link: Solved: Preventing stored variables in flash from being er... - NXP Community

Thank you

标记 (1)
0 项奖励
回复
1 解答
1,725 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AKdy 

Sorry MCU-link debug configuration on MCUXpresso IDE doesn't support page erase.

 

BR

Alice

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,750 次查看
frank_m
Senior Contributor III

> I have written a custom bootloader and app that share a sector. 

 I think this is not a good idea.

Flash can only be erased sector-wise, and I believe the LPC55S is not different.
I suppose you have only tried your bootloader so far with an otherwise empty sector (except for the BL code). Programming works down to minimal cell size usually 16 or 32 bit. Easing does not.

Check if the bootloader can erase an existing application without killing itself.

0 项奖励
回复
1,754 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AKdy 

Which debug probe do you use? The configuration you mentioned is based on PEmicro debugger,

Alice_Yang_0-1684130815621.png

 

 

BR

Alice

0 项奖励
回复
1,748 次查看
AKdy
Contributor I

Hi Alice,

Thanks for the reply.

I'm using the on-board debugger on the LPCXpresso55S36. I have flashed the debugger with MCU Link firmware version 3 and my MCUXpresso IDE is version 11.7

Thanks

0 项奖励
回复
1,726 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @AKdy 

Sorry MCU-link debug configuration on MCUXpresso IDE doesn't support page erase.

 

BR

Alice

0 项奖励
回复
1,683 次查看
AKdy
Contributor I
Thank you.
0 项奖励
回复