Re: Basic question about booting & memory mapping

Hi,

> > I have a very basic question about booting in embedded device. > I have a device, which starts the execution of code from boot ROM on > the SoC when the device is switched on or is reset. > > I know that during the reset or power on, the program counter is set > to 0 (apart from many other things). > > I want to know, How the processor knows that it has to start execution > from particular address in the memory?

Your processor is designed like that. (Reset Vector) Some processors have different address (other than 0).

And in my case, how the boot > ROM start is mapped to address 0?

If you use your own compiled Boot ROM. Linker files make the necessary mapping . If your linker command file is not configured properly, it can lead to lots of other problems.

If you use the 3rd-party bootrom, then it is done by their linker file while making that bootrom.

> Or sometimes the code execution directly starts from NOR flash, which > has XIP facility. > > My question is general for all devices in the memory map. How are the > addresses of different peripherals decided? Is it decided at the time > of designing the hardware?

It depends on the scenario. If it is going to meet some specification(Inter-operability / universal standard), then it would be decided at the time of making. If the peripherals are of our own interest w.r.t our own project, then it has to be done by using proper latches & glue logics (Hardware design w.r.t your own specific requirement ).

Karthik Balaguru

Reply to
karthikbalaguru
Loading thread data ...

[]

You can find the answer to all of these questions in the programmers reference manual for your processor. You do have one don't you?

Ed

Reply to
Ed Prochak

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.