Debugger write to flash more than the bin size

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debugger write to flash more than the bin size

767件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pgr on Tue Jan 19 06:29:20 MST 2016
Dear all,

When launching the debug session the bin is writed to flash. It seems that LPCXpresso write more data than only the bin file. The written flash area is rounded to the upper multiple of 4096.
In my case the bin size is 189848bytes but the debugger write 192512bytes to flash including some garbage byte at the end. I would like to avoid writing these additional bytes when debugging, or at least writing FF only.

Any idea how to do that ?

Thanks in advance

0 件の賞賛
返信
3 返答(返信)

753件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jan 19 08:29:28 MST 2016

Quote: pgr
I am using LPCXpresso 7.5 with PC Link2 on LPC1763.


So test using the latest version - currently LPCXpresso IDE v8.0.

If you check the release notes you will see that there have been rather a lot of flash related updates over the last year:

https://www.lpcware.com/content/forum/lpcxpresso-latest-release

Regards,
LPCXpresso Support
0 件の賞賛
返信

753件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pgr on Tue Jan 19 08:18:22 MST 2016
I am using LPCXpresso 7.5 with PC Link2 on LPC1763.

I can guarentee you that it's not padded correctly and data is duplicated from previous 4096 bytes block.
So it seems that there is somewhere a buffer of 4096 bytes. Data are read fro mthe file to this buffer and the writed to the Flash. When at the end of the file remainig dat are read from the file into the buffer but data previously at the end of the buffer are still there and all 4096 bytes are written.

PGR
0 件の賞賛
返信

753件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jan 19 07:09:38 MST 2016
The LPCXpresso IDE flash drivers effectively program in chunks of a sector (basically by erasing the sector, and then programming the pages within it).

I wouldn't expect to see any garbage programmed though - the buffers passed to the flash driver code should be padded to an appropriate size with the flash erase value (i.e. 0xFF) if the remaining portion of the image to be programmed doesn't fill the complete buffer. So what exactly are you seeing with regards to "garbage"?

And what version of LPCXpresso IDE are you using, and with which debug probe, and to which target MCU?

Regards,
LPCXpresso Support
0 件の賞賛
返信