Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-28 Thread Alan Carvalho de Assis
Hi Matias, Yes, it could be a nice idea. I need to re-test and write the documentation! BR, Alan On 8/27/20, Matias N. wrote: > It would be cool to add a guide for this in the documentation (could be > under "guides" in principle). > > Best, > Matias > > On Thu, Aug 27, 2020, at 18:29, Alan C

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-28 Thread Alan Carvalho de Assis
Hi John, You are welcome! Nice to know that everything is working. BR, Alan On 8/28/20, John Rippetoe wrote: > It turns out I had already modified the offsets in nuttx_header when I > took a quick stab at this a few months back. I guess it has been so long > that I forgot. Thank you very much

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-28 Thread John Rippetoe
It turns out I had already modified the offsets in nuttx_header when I took a quick stab at this a few months back. I guess it has been so long that I forgot. Thank you very much for pointing me in the right direction on this Alan. I will definitely be giving your new gdb script a try Masayuki

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-27 Thread Masayuki Ishikawa
Hi Alan and all, Alan's comment is right. Because openocd-nuttx needs to know about tcb_s members in NuttX to access them. and both values must be the same. Otherwise, openocd-nuttx does not work correctly. However, this procedure is sometimes annoying (even for me) if we are debugging multiple

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-27 Thread Alan Carvalho de Assis
Hi John, If the tcb_s values returned are the same from openocd header, then you don't need to do anything. If they are different you need to update, otherwise it will not work reliably. BR, Alan On 8/27/20, John Rippetoe wrote: > Alan, > > Thanks for sending this! Gustavo's suggestion of addi

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-27 Thread John Rippetoe
Alan, Thanks for sending this! Gustavo's suggestion of adding the '-rtos nuttx' flag to my config did the trick, so maybe this process isn't needed anymore? - John On 8/27/20 5:29 PM, Alan Carvalho de Assis wrote: Hi John, On 8/27/20, John Rippetoe wrote: Hi everyone, I recently jumped

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-27 Thread John Rippetoe
Gustavo, Adding that line to my config appears to have done the trick! The info for the work queue threads still appear a little garbled, but maybe that is normal? Here is the output (gdb) info threads   Id   Target Id Frame * 2    Thread 603982356 "" (Name: Idle Task, pid:0, RUNNING)

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-27 Thread Matias N.
It would be cool to add a guide for this in the documentation (could be under "guides" in principle). Best, Matias On Thu, Aug 27, 2020, at 18:29, Alan Carvalho de Assis wrote: > Hi John, > > On 8/27/20, John Rippetoe wrote: > > Hi everyone, > > > > I recently jumped back into working on the F

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-27 Thread Alan Carvalho de Assis
Hi John, On 8/27/20, John Rippetoe wrote: > Hi everyone, > > I recently jumped back into working on the FDCAN driver for the STM32H7 > and have something working which I would like to test further. In doing > so, I was hoping to easily debug with GDB through OpenOCD, but am having > some issues w

Re: Thread-aware debugging for STM32H7 with OpenOCD

2020-08-27 Thread Gustavo Henrique Nihei
Hi John, you can follow the guide from Sony's wiki page and use OpenOCD master branch from upstream repository. Then you just need to configure OpenOCD to enable thread awareness by adding the following line to you config file: "stm32h7x.cpu0 configure -rtos nuttx" Please, find attached an examp