LPC1769 - Memory Map Problem

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

LPC1769 - Memory Map Problem

1,488 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sukrubahadir on Mon May 23 01:48:09 MST 2016
Hi,
I want to develop bootloader interface for LPC1769. I am using ISP command for interfacing with LPC1769 in ISP mode.
I developed code for this purpose and all function are working well. But there is one problem...

I plan to write .axf file to the ram and then copy ram to flash.
Here is memory map of the LPC1769.
[img]http://postimg.org/image/5nx9rsfkb/[/img]

So here is my question :
Which secrtor of the flash can I write ?
What is the point to be considered about writing to flash or writing to ram ?
标签 (1)
0 项奖励
回复
4 回复数

1,380 次查看
lpcware
NXP Employee
NXP Employee
bump
0 项奖励
回复

1,380 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon May 23 05:47:44 MST 2016
Your question is too vague to provide a compete answer.

The internal flash on an LPC1769 is divided up into a number of sectors.
A sector is the smallest 'unit' of flash that can be erased.
Each sector of flash is divided up into a number of pages.
A page is the smallest 'unit' of flash that can be programmed (a number of page sizes may be available).
Flash memory must be erased before it is programmed.
Flash memory will appear within the MCU memory map with sector 0 at the lowest (base) address, sector 1 at base address + size of sector 0 etc.

So the decision as to which sector to write must reflect how you wish your data to appear within the MCU memory map.

I hope this answers your question.

Yours,

LPCXpresso-support






0 项奖励
回复

1,380 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sukrubahadir on Mon May 23 05:21:13 MST 2016
I think I said same thing. I'll repeat again.
First, I will write data to the ram. And then I will copy data from ram to flash. I think this is the same as what you say.
I want to write my own binary code to flash. But I dont know which sector should be written.

Briefly, I am writing a c# code for doing same thing as flash magic.
0 项奖励
回复

1,380 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Mon May 23 02:11:15 MST 2016
You can write to any sector. BUT when writing from flash, you CANNOT be running code from Flash - the code to write to flash must be running from RAM (if you are using LPCXPresso IDE, there are FAQ on how to do this).

Note that you probably do not want to write the AXF file - that contains lots of additional information used by debuggers and program loaders. You will most likely want to use a binary file which contains just the data to be written.

Suggest you search these forums for information bootloaders. There are also several examples for a bootloader in the samples.
0 项奖励
回复