From: "Jan Wilmans" <janwilmans@gmail.com>
To: gdb@sourceware.org
Subject: Followup: Memory access error while loading section .text
Date: Wed, 15 Mar 2006 03:04:00 -0000 [thread overview]
Message-ID: <aef8562d0603140921r5e380be5x1c51049c8a16257e@mail.gmail.com> (raw)
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
reply other threads:[~2006-03-14 17:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aef8562d0603140921r5e380be5x1c51049c8a16257e@mail.gmail.com \
--to=janwilmans@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).