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.

AM1808 NOR direct boot?

Other Parts Discussed in Thread: AM1808

I have some problems booting the AM1808 from NOR flash. I want to excute our code directly NOR flash.

The code is written to flash at address 0x60000004 (no ais image) and NOR boot configuration word is 0x00000011 at 0x60000000.

Initialized sections are allocated in flash and uninitialized sections are allocated in ram.

Linker command file allocate initalized sections in FLASH and uninitialized sections in RAM. 

And then I compiled and converted .out file to .bin file using hex470.exe.

Application run in debugger mode, but it don't run in standalone mode.

Please let me know how to allocate sections. I want documents related NOR direct boot.

AM18x bootloader (SPRABA5A) is not enough about how to use NOR direct boot.

Is Running the application from flash possible?

  • Remony,

       Please review this wiki article.

  • I've already seen wiki article that you mentioned.

    It isn't article I want.

    I don't use ubl and uboot. My application is non-OS program.

    I want  that AM1808 works like MCU such as C2000 or  MSP430.

    Using the AM18xx bootloader (SPRABA5A) mentions below sentence.

    For Direct NOR boot, the bootloader transfers control directly to the secondary bootloader present in NOR Flash by branching to address
    0x60000004. The secondary bootloader is directly executed from there.

    I want program starts at 0x60000004 in flash. 

  • 1) Can you send the .map generated for your code? All sections should be in NOR, and the entry point should be at 0x60000004

    2) Connect in CCS and make sure you can read correctly from the 0x60000000 in the memory window. Do the config word and data look correct? Sending a snapshot of that would be helpful.

    Jeff

  • Hi, jeff

    I used the bootloader that is included in SitaraWare for direct boot test.

    1. I modified linker command file.  Initialized sections are allocated in Flash and uninitialized sections are allocated in On-chip Ram.

    MEMORY
    {
         NOR_CONFIG : org = 0x60000000 len = 0x00000004 fill = 0x00000011  /* NOR Configuration Word - Direct boot */
         NOR  :              org = 0x60000004 len = 0x01FFFFFC   /* FLASH */
         ONCHIP_RAM : org = 0x80000000 len = 0x00020000        /* RAM */
    }

    SECTIONS
    {
        .init    : {
                           bl_init.obj (.text)
                     } load > 0x60000004

        .text    : load > NOR                                              /* CODE                              */
        .data   : load > NOR
        .bss     : load > ONCHIP_RAM                               /* GLOBAL & STATIC VARS              */
                                            RUN_START(bss_start),
                                            RUN_END(bss_end)
        .const   : load > NOR                                          /* SOFTWARE SYSTEM STACK             */
        .cinit     : load > NOR                                            /* SOFTWARE SYSTEM STACK             */
        .stack   : load > 0x8001E000                            /* SOFTWARE SYSTEM STACK             */
    }

    2.  Compile and convert from .out to .bin file using hex470.exe

         I made a command file (Make.cmd). It similar to ubl2bin.cmd of bootstrap loader in AM1808 SDK.

         And then enter below command in Dos winodws. (run cmd.exe)

         >> hex470 Make.cmd -o output.bin

    boot.out
    -b
    -image
    -zero
    -map output.map

    ROMS
    {
         FLASH:  org = 0x60000000, len = 0x00005000    /* FLASH */
    }

    3.  Writing image (*.bin) and booting.

    Finally, I burned binary image to NOR flash and boot. But board doesn't work.

    I checked boot mode switch and NOR flash data. They are right. NOR configuration word is 0x00000011 at 0x60000000.

    What is wrong?

  • The best way to debug would be to connect in CCS, put a breakpoint at 0x60000000, reset the board, and step through your code with the symbols loaded. Have you tried that yet?

    Jeff

  • Hi,

    I tested your debugging method.

    After connecting in CCS, put a breakpoint at 0x60000000, reset CPU (HW) on the board.

    Then arrow in disassembly window points at 0xFFFF0000.

    And then step through disassembly code using F5 (Step Into), so jump at 0xFFFD0000.

    And then enter infinite loop (address is 0xFFFD397C)

  • Interesting. Can you use this debug GEL file and paste the results of the Print_ROM_Info function? That will give some more clues as to the issue.

    Jeff

  • Below message is the information when Print_ROM_Info function is run.

    ARM9_0: GEL Output: ---------------------------------------------
    ARM9_0: GEL Output: |               BOOTROM Info                |
    ARM9_0: GEL Output: ---------------------------------------------
    ARM9_0: GEL Output: ROM ID: d800k006
    ARM9_0: GEL Output: Silicon Revision 2.0
    ARM9_0: GEL Output: Boot Mode: Emulation Debug
    ARM9_0: GEL Output:
    ROM Status Code: 0x00000000
    Description:ARM9_0: GEL Output: No error
    ARM9_0: GEL Output:
    Program Counter (PC) = 0x80005B98

    AM1808 doesn't support NOR direct mode according to Silicon revision?

  • Sorry, can boot in NOR direct mode and then connect and run the debug GEL file? You do not need to be in Emulation boot mode in order to connect to the device. Thanks

    Jeff

  • Does AM1808 really support NOR direct boot mode?

    If AM1808 supports it, I want to get some examples or documents.

    Please let me know how to use NOR direct boot mode. 

  • See section 3.1.2 of the AM1808 bootloader user guide. The ROM will branch to 0x60000004 and execute directly out of NOR.

    Jeff

  • Hello Jeff,

    I have similar problems when booting from NOR flash as mentioned http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/47/p/134033/481255.aspx#481255.I try to use AIS Nor Boot. I try to debug as you suggest above and put a breakpoint at 0x80000000, when a reset (HW) microprocessor, the PC goes to 0xFFFF0000, then jumps to 0xFFFD0000. When i step over lines, the debugger circles on local ROM and can't jump to local RAM region. My diagnostic output is like;

    ARM9_0: GEL Output: ---------------------------------------------
    ARM9_0: GEL Output: |               BOOTROM Info                |
    ARM9_0: GEL Output: ---------------------------------------------
    ARM9_0: GEL Output: ROM ID: d800k006
    ARM9_0: GEL Output: Silicon Revision 2.0
    ARM9_0: GEL Output: Boot Mode: NOR
    ARM9_0: GEL Output:
    ROM Status Code: 0x00000000
    Description:ARM9_0: GEL Output: No error
    ARM9_0: GEL Output:
    Program Counter (PC) = 0xFFFD6984

    So, what can be the problem? Thanks,

    Zafer.

     

  • Based on the PC, it looks like you are in NOR Direct boot. Is that what you intended? If so then it will try to execute out of 0x60000000 address range (NOR flash) directly.

    Jeff

  • Hi Remony,

    Did you get this NOR direct boot mode working?

    Thx,

    --Prabhakar Lad

  • Hi,

    I gave up this issue.

    thanks

  • Hi Remony,

    I have achieved this direct NOR boot mode working,

    I have attached the binary you can rename it to u-boot.bin and flash it with -flash_noubl option and use it.

    Soon posting the patches for same.

    Thx,

    --Prabhakar Lad

    http://in.linkedin.com/pub/prabhakar-lad/19/92b/955

    6505.u-boot.txt