Re: Debugging userspace with Nuttx protected build

2023-04-25 Thread Gregory Nutt
When I was originally developing the kernel mode, I wrote this: https://cwiki.apache.org/confluence/display/NUTTX/Memory+Configurations That was mostly my notes of what I had worked on and my roadmap that was guiding me through the kernel mode development.  I burned out on that before finishin

Re: Debugging userspace with Nuttx protected build

2023-04-25 Thread Tiago Medicci Serrano
Hi! I had no problems debugging NuttX with protected mode on ESP32-S3 (esp32s3-devkit:knsh). After launching OpenOCD (https://github.com/espressif/openocd-esp32) with `-c 'set ESP_RTOS none' -c "set ESP_FLASH_SIZE 0"`, just load the userspace's symbols with `add-symbol-file` (with the address of

Re: Debugging userspace with Nuttx protected build

2023-04-25 Thread Gregory Nutt
>>> I was actually quite surprised that Nuttx applications are still partially >>> linked with a protected build and that all sections overlap (start at 0)in >>> the elf file. I had expected the application would be fully linked to >>> virtual addresses as per linux and another RTOS I used pre

Re: Debugging userspace with Nuttx protected build

2023-04-25 Thread Andrew Dennison
On Tue, Apr 25, 2023, 3:10 PM Gregory Nutt wrote: > > On 4/24/2023 7:27 PM, Andrew Dennison wrote: > > Are there any examples of a gdb setup to debug a userspace process? One > key > > issue is to setup the section offsets to match the final application > > location once it has been loaded. > > Y

Re: Debugging userspace with Nuttx protected build

2023-04-25 Thread Brennan Ashton
On Tue, Apr 25, 2023, 6:10 AM Gregory Nutt wrote: > > On 4/24/2023 7:27 PM, Andrew Dennison wrote: > > Are there any examples of a gdb setup to debug a userspace process? One > key > > issue is to setup the section offsets to match the final application > > location once it has been loaded. > Th

Re: Debugging userspace with Nuttx protected build

2023-04-24 Thread Gregory Nutt
On 4/24/2023 7:27 PM, Andrew Dennison wrote: Are there any examples of a gdb setup to debug a userspace process? One key issue is to setup the section offsets to match the final application location once it has been loaded. You don't describe your build, so I only give you a general answer.

Debugging userspace with Nuttx protected build

2023-04-24 Thread Andrew Dennison
Are there any examples of a gdb setup to debug a userspace process? One key issue is to setup the section offsets to match the final application location once it has been loaded. I was actually quite surprised that Nuttx applications are still partially linked with a protected build and that all s