DDR3 Initialisation (BeagleBone Black)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • DDR3 Initialisation (BeagleBone Black)

    Hi all,

    This is my first post on this forum. I have some basic knowledge about ARM programming (Atmel SAM4s Expained Pro board). I'm now upgrading to a more performant system (Cortex A8 on Beaglebone black). I can compile & link my bare metal C/C++ code (GNU arm-none-eabi toolchain). I can run/debug programs in the SoC's ram. The board has an 512MB external RAM memory. The problem is that this RAM must be enabled by the Cortex before it can be used. This means that any code linked into that memory area wil not load by JTAG because the memory isn't configured after the J-Link resets the system. How can I work around this, is it possible to let the J-Link upload the initialisation code, execute this code so that the DDR3 memory becomes usable, and then continu to upload the code to the DDR3 area before transferring control to the DDR3-code ?

    Thanks for any suggestions.

    Paul
  • On an earlier post on this forum I read
    ... you need an init script which initialises the SDRAM/DDRAM, before you can access it.

    Unfortunately, I do not have such an init script ready...

    As an alternative, you may load & execute a second level boot loader ELF file that performs all initialization

    prior to downloading the main application. This becomes more and more
    popular for complex target systems that require a lot of initialization.



    The process would look like this:

    file btl.elf

    load

    break <EndOfBTL>

    c

    file Application.elf

    load

    break main

    c
    I *think* that's the way to solve my question. However, where do I write this code (in which file) and how to instruct Eclipse to use this code each time I start a debug session?

    Can I use a (C-)label or is a RAM location (address) mandatory for <EndOfBTL> or is it possible to use a BKPT statement in the boorloader code?

    Where can I find more information regarding the scripting of the debugger?

    Thanks in advance.

    Paul
  • Hi,

    Those commands have to be passed to GDB, this can most commonly be done in the Debug Configuration of Eclipse.

    The break can be set on a function, address or source location, depending on whether the bootloader file contains debug symbols or not.
    A BKPT would be possible instead, too.

    for more information regarding Eclipse and GDB, please refer to their respective documentations.

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.