Hi, Based on the Phytec example code for external nor flash bootloader, i see that they are copying code from the external nor flash to the external SDRAM and starting it by pointing a function pointer to the external sdram.
My first doubt is: Since the target options specifies the off chip ROM1 at address 0xE0000000, and EMC has been enabled in the startup file,does this secondary bootloader code go directly to the external nor flash at address 0xe0000000 when loaded from keil uvision?
Second doubt: Does this secondary bootloader(if present in ext nor flash), cause a copy of the application code from user program offset to the ext sdram and pass function pointer to execute it from sdram when powered up?
Third doubt: In target options>>Debug, what is the purpose of Debug_Boot.ini?
Guys please be patient with me..I am very new to this and have a lot of doubts about this topic
Thanks :)
So were my doubts right or wrong??? Please do clarify.
I already did. Regardless of what Phytec are doing, the LPC3250 user manual states what happens.
The .INI files typically program chip register to get the part in a desired configuration to run the code. Often this replicates startup code configuring external buses, and memories. Review the content of the .INI, and review the Reference Manuals for your part and board. Reading documentation and understanding it tends to alleviate doubt.
If you want to see what the code is doing, suggest you unclick "Run to Main" and step through it, and open memory windows so you can see what's where.
In systems with NAND memory you can't run the code in-place, you have to initialize memory buses for hardware unique to your board, and then copy the data into a memory which will permit in-place execution. The compiler/linker need to built that code for the location it will ultimately run at, and the loader may store it somewhere else can copy it into place before transferring control to it.
Just a wierd idea:
If i convert my application code to an equivalent binary in a header file(using bin2h.exe) and then directly load my nor flash boot loader code along with my header file containing the binary values of my application code at start address 0xe0000000 under target options for off chip rom,my code directly goes into the not flash along with my boot loader code. Then i can set PC=0xe0000004(boot loader program offset) in debug.ini file so tht my code executes boot loader in nor flash on power u(which contains my application code)
Sorry, but have you now read what I suggested? It is not a particularly long chapter and it has all the necessary information you should require. It's what I used successfully for booting from both NOR and NAND.