Beaglebone bare metal code

Skip to first unread message


Aug 3, 2014, 12:20:56 AM8/3/14
I have an small code just to blink user leds loaded at address 0x80000000. When I use the bootloader from StarterWare it works perfectly but when I try to load using JTAG in the same address, I get an error that I suppose it's something related with memory protection.

In the past I had the same problem using uBoot when I try to execute Linux in single step. The work around was enable ICACHE using an uBoot function and the kernel loaded with no problem.

At this time I have no loader, just the JTAG interface and I have the same problem. Enabling ICACHE doesn't fix the problem and I still have no chance to execute at 0x80000000. I can succeed loading the program at 0x40300000 where the MMU has no access (I guess!).

background polling: on
TAP: am335x.dap (enabled)
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0xa0000193 pc: 0x00026e1c
MMU: disabled, D-Cache: disabled, I-Cache: enabled
MEM_AP_CSW 0x2800062, MEM_AP_TAR 0x80000000
Failed to write memory at 0x80000000
MEM_AP_CSW 0x2800062, MEM_AP_TAR 0x800000b4
Failed to write memory at 0x800000b4

Anybody knows how should be the initial configuration to use the address 0x80000000-0xA0000000 ???

I am sure that there is something that I do not understand about memory/cache initialization.


John Syn

Aug 3, 2014, 12:59:08 AM8/3/14

From: Ventura <>
Reply-To: "" <>
Date: Saturday, August 2, 2014 at 9:20 PM
To: "" <>
Subject: [beagleboard] Beaglebone bare metal code
Code Composer Studio will have GEL files that setup and initialize memory/cache so you can download code and debug. GEL files are easy to read so I suggest you download CCSV6 eval and look for the GEL files for AM335x. Everything you need will be in these GEL files. My guess is you need to initialize DDR3 (memory map, timing, etc) before you are able to download code. Normally, u-boot does this for you. 



For more options, visit
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Jorge Ventura

Aug 3, 2014, 10:43:16 AM8/3/14
Thank you for your reply. I was checking the gel files also at StarterWare (I don't have CCSV6 installed) and you were right. Your email made me understand that the reason for not be working was not related to I-CACHE but the timing to work with the DDR3. To test, I loaded and execute the MLO file from StarterWare (this is the bootloader) and after that, halt using gdb+JTAG, doing that, MMU and D-CACHE and I-CACHE are all disabled and I still could load correctly the code at 0x80000000 correctly.


You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to


Aug 30, 2016, 4:08:49 AM8/30/16
to BeagleBoard
Hi Ventura.  I am debugging a bare metal MMU and I am having much trouble with
mapping the memory sections (DDR, OCMC, Dev) and cache.
Actually I don't know where the problem is.  It just hangs when I enable IRQ.
Can you tell me exactly how you solved your DDR3 timing problem?

Reply all
Reply to author
0 new messages