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.

Debugging Boot loader Project

Other Parts Discussed in Thread: SYSBIOS, AM4379

Hi,

We are using AM437x IDK.

Is it possible to debug Bootloader example project(located at C:\ti\am437x_sysbios_ind_sdk_2.0.0.1\sdk\starterware\bootloader) ?

We are able to copy the Bootloader images to SD card and its working fine.

But when we try to debug the project,getting the following error.

  • Jinu,

    It seems like the bootloader project uses the linker file located at \starterware-src\examples\gcc\am43xx_boot_ccs.lds.
    Could you try to change the instances of >OCMCRAM to >DDR0 in the linker, then rebuild the project, and load?

    I don't know why this wouldn't fit into the OCMCRAM as the size is less than 256kb. I think there is an incorrect definition in the linker for the OCMCRAM. I'm checking with some colleagues on this.

    Lali
  • Jinu,

    Also, which rev of the AM437x IDK are you using?

    Lali
  • Hi Lali,

    Thanks for your reply.
    We are using am437x_sysbios_ind_sdk_2.0.0.1.
    We compare the am43xx_boot_ccs.lds from sdk 2.0.0.1 with sysbios_ind_sdk_2.1.0.1, and we can see that in lds file in 2.1.0.1, it is given that
    MEMORY
    {
    DDR0 : o = 0x80000000, l = 0x10000000 /* 256MB external DDR Bank 0 */
    OCMCRAM : o = 0x402F4000, l = 0x2FC00 /* 256KB of internal RAM */
    }

    and in 2.0.0.1, it is
    MEMORY
    {
    DDR0 : o = 0x80000000, l = 0x10000000 /* 256MB external DDR Bank 0 */
    OCMCRAM : o = 0x402F0400, l = 0x2FC00 /* 256KB of internal RAM */
    }

    There is a change in OCMCRAM memory .


    Regards,
    Jinu

  • Hi Lali,

    I changed only the OCMCRAM memory region in the lds file as follows and it started working.
    MEMORY
    {
    DDR0 : o = 0x80000000, l = 0x10000000 /* 256MB external DDR Bank 0 */
    OCMCRAM : o = 0x40300000, l = 0x3FFFF /* 256KB of internal RAM */
    }


    The OCMCRAM memory values are taken from am4379 TRM .
    Also the instances of >OCMCRAM not changed.
    Please let me know whether the above mentioned changes are valid or not?


    Regards,
    Jinu
  • Hi Jinu,

    This seems to be a bug in the lds files with the memory regions, and I have reported it to the development team to fix. I believe
    am43xx.lds has the correct definitions, so you should be ok with what you have above. Thanks for your question on this and help improving our software.

    Lali
  • HI Lali,

    Can u just check the reason behind the wrong mapping of OCMCRAM memory in lds script?

    We compiled the boot loader project  from SDK and the generated binary file which loads and boots successfully on on AM437x IDK Our custom board which is based on AM4379 chip was not booting(not seeing ant messages on serial console).since the boot loader code working on IDK, We thought it as a hardware issue ends up checking all the booting peripherals on the board and we spent close to 3-4 days find out the OCMRAM memory settings in the boot loader project caused this issue,
    The wrong mapping in lds script propagated in Boot loader file binary generator script(post build).Interestingly, on
    IN AM437x IDK board, the boot loader working perfectly with the above mentioned wrong memory map. We are not able to understand this behavior since the OCMRAM mapping is wrong in the boot loader project.

    From AM4379 TRM memory map,the following memory regions are mentioned

    MPU_RAM 0x402F_0000 to 0x402F_FFFF 64KB 32-bit Ex/R/W[2] – SRAM [3]
    OCMCRAM 0x4030_0000 to 0x4033_FFFF 256KB 32-bit Ex/R/W [2] – L3 OCMC SRAM

    The wrong values in lds file is lies in MPU_RAM.
    We just want to know how the AM437x IDK handles the wrongly mapped binary file.


    Regards,
    JInu

  • Hi,

    Bootloader binary is using both IRAM and OCMC RAM to execute.

    I think it doesn't matter whether the name is IRAM or OCMC as it is using the both the memories for fitting the Bootloader sections. What matters is address.

    Jinu,

    What are the modifications that were done to the MMCSD bootloder for your custom AM437xIDK? Is MMC enabled?

    Regards,

    Murali Krishna