GDB: Cannot access memory at address 0x40048000

Asked by ilovefpv

I've got gdb up and running nicely with an LPCLINK to a LPC1114. You GDB works great with debugging the software, but I'm having a bit of a problem accessing the peripheral registers..

For example, my code executes:

LPC_SYSCON->MAINCLKSEL = 0x00000003;

in this case LPC_SYSCON-> MAINCLKSEL is mapped to 0x40048000, but when I run:

x 0x40048000

I get:

0x40048000: Cannot access memory at address 0x40048000

How can I make these registers accessible with the debugger?

Thanks,

Steve

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Terry Guo
Solved:
Last query:
Last reply:
Revision history for this message
Best Terry Guo (terry.guo) said :
#1

I assume you are using gdbserver from CodeRed LPCXpresso and working in gdb command line mode. Then you need to run gdb command "set mem inaccessible-by-default off​" after you connect to board. You will be able to access memory now.

Revision history for this message
ilovefpv (ilovefpv) said :
#2

That works perfect - thanks!

Revision history for this message
ilovefpv (ilovefpv) said :
#3

Thanks Terry Guo, that solved my question.