This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SitaraWare 1.0.0.9 bootloader starts app @ ldAddress not entryPoint

Other Parts Discussed in Thread: AM1808

I found two little nitpicks with the example bootloader in SitaraWare 1.0.0.9.

1.) the following code snippet from SPIBootCopy() in bl_copy.c correctly copies the application image out of flash and stores it in ram at the load address specified in the SPIBootHeader.  However instead of setting the global entryPoint to be the entryPoint in the SPIBootHeader it sets the global entryPoint to be the ldAddress from the header.  This worked fine for u-boot, but for an application that has a start address different from the load address this falls flat.  I think the last line was intended to be entryPoint = spiHeader.entryPoint;

    /* Copies application from SPI flash to DDR RAM */

    SPIReadFlash (spiHeader.memAddress, spiHeader.appSize,

                  (unsigned char *) spiHeader.ldAddress);

 

    entryPoint = spiHeader.ldAddress;

 

2) the second nit causes no problems, it's just a readability issue.   In SPISetup() in bl_am1808.c the wrong enumeration is used for the peripheral ID.

PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_SCR0_SS, 0, PSC_MDCTL_NEXT_ENABLE);

should probably be

PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_SPI1, 0, PSC_MDCTL_NEXT_ENABLE); 

It works ok because HW_PSC_SCR0_SS and HW_PSC_SPI1 have the same value (10), they're just intended to indicate different peripherals.

  • Seth,

    In SitaraWare 1.00.00.09, the bootloader utility always branches to the application at the load address (i.e. 0xC1080000).  You can see this in the bootloader source file bl_copy.c:

    entryPoint = spiHeader.ldAddress;

    Recently, we have re-launched SitaraWare as StarterWare, and the bootloader utility has been updated to allow more flexibility with your application entrypoint.  You can find more information about the latest release (including a download link and a quick start guide) at the following location:

    Note that the new release requires you to use a stand-alone utility (out2rprc.exe) to convert your application into a bootable format.  This is explained in more detail in the quick start guide.

    Hope this helps.