I am having problems developing a secondary boot-loader for the OMAP-L137 / C6747 processors.
I have written the secondary boot-loader to:
- Initialize the DSP (PLL, Pin-Mux, PSC’s, EMIFA, EMIFB, ect.)
- Initialize the UART (for debug purposes).
- Read the state of a multi-position hardware switch (that is on my board). Based on the state of this switch, the boot-loader will load one of several applications from Flash into system memory.
- It will then jump to the entry-point of that program to run it.
The applications are stored in the Flash in AIS file-format. The boot-loader knows were in flash each application should be located. It searches for the magic number then parses for section-load commands. It loads all sections into the correct memory locations, and then verifies the data by double-checking it with flash. It then gets the entry-point of the application from the Jump-Close command and starts running the application.
The secondary boot-loader runs in Shared-RAM (0x80000000). The problem that I am having is that this all works correctly if I load the application to EMIFA-SDRAM or if I load it to unused memory in Shared-RAM but, it is not reliable if I load it into DSP-RAM (0x11800000 or 0x00800000). One of the applications that I need to run is a small program that must run entirely in fast DSP-RAM.
Symptom:
Upon application of power, the secondary boot-loader will run correctly but when it makes the jump to the application (in DSP-RAM) it will either:
- Wind-up in never-land (trying to execute code where there is no memory).
- Or it will re-run the boot-loader (as if a reset was hit).
The interesting thing is that usually, after running the boot-loader the second time, it will jump to the entry-point correctly and the application will run fine. Once it is in this state, you can perform a warm-reset (hit the reset-button with power-on) and the boot-loader will make the jump to the application in DSP-RAM every time without a problem. It is as if running the boot-loader a second time sets a register that allows the system to boot correctly until it is powered down.
There is one more interesting symptom. In the secondary boot-loader, if I initialize an area of DSP_RAM (load it with zero or DEADBEEF), loading the application there will always cause the system to hang. For example, if I initialize 0x00800000 to 0x00820000, I can’t load and run my application there without it hanging every time. If I run the application in memory above this, it will work as I described before running the boot-loader twice.
