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.

AISgen and external mDDR RAM

Other Parts Discussed in Thread: AM1808, OMAP-L138

Instead of using the UBL or U-Boot I want to write my program into the SPI Flash and execute it from the external mDDR.

Using AISgen for this task works as long as the program is executed from the internal RAM. As soon as I change the linker settings to use the external RAM the program does not boot.

The Bootloader documentation states that the entry-point and the memory addresses are extracted from the ELF/COFF file. It also states that the mDDR has to be configured manually with AISgen if the linker uses mDDR locations.

So I configured the mDDR and PLL1 settings in AISgen and those settings seem to work as with the internal RAM version I am able to write/read to the mDDR addresses (if I disable the "Configure DDR" checkbox in AISgen the memory is not accessable by the program).

Maybe the code of the SPI Flash is not copied correctly to the mDDR locations? I am using the "AISgen for D800K006 Bootloader v 1.7c". The board is a LogicPD Zoom eXperimenter kit with an AM1808 (device type: d800k004).

The device AISgen config is here:
0361.ARM-mDDR132MHz.zip

The DDR part is (mDDR, 132 MHz):

DRPYC1R: 0x000000C4
SDCR:    0x0A034622
SDCR2:   0x00000000
SDTIMR1: 0x184929C8
SDTIMR2: 0x380FC700
SDRCR:
   0x00000407

The PLL0 und PSC configurations do not seem to be necessary as the internal RAM version of my program is able to access the mDDR without these sections too.

The AIS output file is flashed with "sfh_OMAP-L138.exe -flash_noubl ...". The version of the tool is 1.67.

Thanks for your help.

  • Can you also check the "Enable CRC" checkbox in the AISgen tool? This will make sure all the data got copied to DDR correctly. Otherwise the bootloader will halt, and you can view any error messages with the debug GEL file.

    Also are you able to execute your code within CCS if you are using mDDR locations and a GEL file? If so make sure your GEL mDDR configuration matches what you are using in the AISgen tool.

    Jeff

  • I enabled the CRC checksum and flashed the AIS binary on the device with sfh_OMAP-L138.exe. After booting the board I clicked on "Target -> Launch TI Debugger". In the debug view I right clicked on "Texas Instruments XDS100v2 USB Emulator_0/ARM9_0 [Non-Project Debug Session]" and selected "Connect Target". This started the debug GEL file with the output:

    ARM9_0: Output:  ---------------------------------------------
    ARM9_0: Output: |             Device Information            |
    ARM9_0: Output: ---------------------------------------------
    ARM9_0: Output: DEV_INFO_00 = 0x0B7D102F
    ARM9_0: Output: DEV_INFO_01 = 0x00000000
    ARM9_0: Output: DEV_INFO_02 = 0x0000000C
    ARM9_0: Output: DEV_INFO_03 = 0x00000011
    ARM9_0: Output: DEV_INFO_04 = 0x00000000
    ARM9_0: Output: DEV_INFO_05 = 0x000003E0
    ARM9_0: Output: DEV_INFO_06 = 0x00000000
    ARM9_0: Output: DEV_INFO_07-DEV_INFO_08-DEV_INFO_09-DEV_INFO_10-DEV_INFO_11-DEV_INFO_12 = 0-0-6415775-4-18-30
    ARM9_0: Output: DEV_INFO_13,DEV_INFO_14,DEV_INFO_15,DEV_INFO_16 = 1,0,0,16072
    ARM9_0: Output: -----
    ARM9_0: Output: DEV_INFO_17 = 0x00030003
    ARM9_0: Output: DEV_INFO_18 = 0x00000000
    ARM9_0: Output: DEV_INFO_19 =
    ARM9_0: Output: 0
    ARM9_0: Output: 0
    ARM9_0: Output: 0
    ARM9_0: Output: 0
    ARM9_0: Output: 0
    ARM9_0: Output: 
    ARM9_0: Output: -----
    ARM9_0: Output: DEV_INFO_20 = 0x00000000
    ARM9_0: Output: DEV_INFO_21 = 0x00000000
    ARM9_0: Output: DEV_INFO_22 = 0x30303864
    ARM9_0: Output: DEV_INFO_23 = 0x3430306B
    ARM9_0: Output: -----
    ARM9_0: Output: DEV_INFO_24 = 0x0401E012
    ARM9_0: Output: DEV_INFO_25 = 0x0061E59F
    ARM9_0: Output: DEV_INFO_06 = 0x00000000
    ARM9_0: Output: DEV_INFO_26 = 0x7D900001
    ARM9_0: Output:  
    ARM9_0: Output: ---------------------------------------------
    ARM9_0: Output: |               BOOTROM Info                |
    ARM9_0: Output: ---------------------------------------------
    ARM9_0: Output: ROM ID: d800k004 
    ARM9_0: Output: Silicon Revision 1.1
    ARM9_0: Output: Boot Mode: SPI1 Flash
    ARM9_0: Output:  ROM Status Code: 0x00000000  Description:
    ARM9_0: Output: No error
    ARM9_0: Output:  Program Counter (PC) = 0x019BAD94

    Is this the correct procedure to connect to the device if the bootloader and not JTAG is used to start the program? There is also a device "Texas Instruments XDS100v2 USB Emulator_0/ETB11_0 [Non-Project Debug Session]" which is disconnected. Should this be connected too?

    The PC seems to be corrupt. At the end of the main() routine there is an endless loop so the PC should get stuck in that (somewhere > 0xC0000000).

    I tried to cross-check the debug GEL output by running the internal RAM version with the bootloader and then connecting to the device.
    Whenever I try to connect to the device I get the error message "Error connecting to the target: Error 0x80002240/-150. Fatal Error during: Initialization, OCS, Control"

    CCS with JTAG and GEL file using mDDR works. I use the AM1808.gel and call Set_mDDR_132MHz() in OnTargetConnect() to initialize the mDDR.That's where the DDR register values for AISgen are taken from. I started the device (until the entry-point) with the GEL file and copied the register contents displayed by the debugger to AISgen.

  • Now I can connect to the target when the internal RAM version is executed. I simply had to restart CCS before reconnecting (the error even occurrs when I try to connect to the external RAM version twice).

    The internal RAM version looks good in the debugger. Valid assembler code at the expected places and the PC at the endless loop.
    The debug GEL looks the same as for the external RAM version only with the PC at 0x80006500 (= while(1);)

    I will check the external RAM version memory with the debugger now.
    It seems the main()-method is not at the position it should be according to the .map file.