public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Followup: Memory access error while loading section .text
@ 2006-03-15  3:04 Jan Wilmans
  0 siblings, 0 replies; only message in thread
From: Jan Wilmans @ 2006-03-15  3:04 UTC (permalink / raw)
  To: gdb

Hi,

I while ago (dec 2005) I saw some messages passing through here about
this problem:

When using gdb for remote debugging using a BDI2000, in my case to
debug an application on a Philips LPC2xxx. When I try to "load" the
program into memory I got:

Loading section .text, size 0x30b3 lma 0x0
Memory access error while loading section .text

This was said to be a bug in GDB version before 6.4 but it should be
noted that this also happens when gdb tries to write to an undefined
memory region or flash-memory. This happened to me using a LPC2xxx cpu
when I had an incorrect linker-script. (note the address "0x0" which
is the start of the flash-memory, internal RAM in this case started at
0x4000000)

To reiterate: you must configure your linker-script to load the
program into RAM instead of the normal flash-region if you want to
load it from gdb!
The same goes for any initialized data-sections you might have.

Other unrelated cave-eats:
If you want to _flash_ (not load) you program using the bdi2000, you
might have to enable writing to flash on the cpu, before the BDI2000
can access it. You can do this by adding a WM32 to the init-section of
the bdi2000 configuration file.

[INIT]
WM32    0xE01FC040  0x00000001  ;MEMMAP: User flash mode

Finally note that the init section is not executed by a "reset run"
command, only a "reset halt" will trigger this execution.

Greetings,

Jan Wilmans
Myquest

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-14 17:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-15  3:04 Followup: Memory access error while loading section .text Jan Wilmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).