Friday, April 20th 2018, 12:37pm UTC+2

You are not logged in.

  • Login
  • Register

PaulVdBergh

Beginner

Date of registration: Jun 12th 2015

Posts: 2

Location: Brasschaat, Belgium

1

Friday, June 12th 2015, 9:15am

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

PaulVdBergh

Beginner

Date of registration: Jun 12th 2015

Posts: 2

Location: Brasschaat, Belgium

2

Monday, June 15th 2015, 8:57am

On an earlier post on this forum I read

Quoted

... 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

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 377

3

Tuesday, June 16th 2015, 4:49pm

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