My Tool Versions:
EVM OMAP-L137 Rev-H
CCS 3.3.82.13
DSP/BIOS 5.41.10.36
Code Gen Tools 6.1.19
EDMA 3 LLD 1.11.02.05
ERTFS 1.10.02.32
PSP Drivers 1.30.00.06
BIOSUSB 1.10.03
I want to write a boot-loader program that can boot one of two DSP applications depending on the state of a General-Purpose I/O. For development purposes, I will use the DIP switches on the EVM board to determine if Application #1 boots or if Application #2 boots.
To get started, I want to run and understand the operation of the UBL program however; I can’t find any documentation on the UBL. Actually, the only thing I know is that UBL stands for User Boot Loader, I am assuming the rest.
Assumptions:
- When I run SPIWriter_OMAP-L137.out, it asks if I “will be writing a UBL” then it asks for an application file-name, load address and “app image entry point”. From this I assume the UBL is going to load my application from SPI-Flash into memory and begin to run it.
- If I learn how SPIWriter and UBL programs work, I can modify them so I can write two different applications in SPI-Flash and boot either one based on the position of a dip-switch.
Here are the steps that I have taken and where I get stuck.
- Open the UBL_SPI_MEM project and compile it.
- Generate AIS image from output file.
- Load SPIWriter_OMAP-L137.out and run it.
- I specify that I want to write a UBL and enter the path and name of the UBL Image.
- I enter the path and name of an application image that flashed some LED’s.
- I enter the load address (I am assuming this is the address that the application will run) 0xC0000000.
- From the map-file I get the entry point 0xC000A658.
- I disconnect.
- I start a HyperTerminal session.
- Hit the reset button.
- I added some debug code to see that the UBL starts to run then gets stuck in the (spi.c file) SPI_xferBytes() function waiting for the transmit ready.
while (!(SPI->SPIFLG & SPI_SPIFLG_TXINTFLAG));
This is the Hyper-Link screen output. Some of these lines are my debug code.
--- ...Start... ---
C6747 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: SPI
.
Starting SPI Memory Copy...
Done with DEVICE_SPIInit(DEVICE_SPIBOOT_PERIPHNUM)...
Done with SPI_MEM_open()...
About to start SPI_MEM_readBytes() Loop... Search for Magic Number...
currMemAddr = 0x00000000...
memorySize = 0x00080000...
blockSize = 0x00010000...
Loop >>> currMemAddr = 0x00010000...
>>> Entered SPI_MEM_readBytes()
>>> Making call to LOCAL_xferCmdAddrBytes()
>>> addr = 0x00010000...
>>> Made it into LOCAL_xferCmdAddrBytes()
>>> for (i=0; i<(hSPIMemInfo->hMemParams->addrWidth>>3); i++)
>>> addrWidth = 0x00000018...
>>> for (i=0; i<(hSPIMemInfo->hMemParams->addrWidth>>3); i++)
>>> addrWidth = 0x00000018...
>>> for (i=0; i<(hSPIMemInfo->hMemParams->addrWidth>>3); i++)
>>> addrWidth = 0x00000018...
>>> Done with for-loop
>>> Made it into SPI_xferBytes()
>>> About to Write output data
>>> numBytes = 0x00000004...
>>> Write output data --> Wait for transmit ready
>>> while condition = 0x00000000...
>>> while condition = 0x00000000...
>>> while condition = 0x00000000...
Stuck in this loop.