Hi Fotis, There are two (at least) options to debug NuttX with Thread awareness:
1) Using OpenOCD + GDB: some years ago Mr. Masayuki-san submitted support to OpenOCD get thread awareness; 2) Using Segger JLink + GDB: this is the option you are trying. I think we don't have a documentation to it yet. I never tried it, but Mr. Xiang used and he included the support on NuttX. (N.B.: there is also ORBTrace tool that people can use with NuttX to get thread awareness, our friend Dave Marples said it is available, see: https://discord.com/channels/716091708336504884/716091708819111959 , last NuttX Online Workshop he also presented about it, the video is available at NuttX Channel on YouTube) I only used option 1 until now, you can find some old thread about it: https://lists.apache.org/thread/hzx8wfh178j6hzfnb1qfpxmv5c8qb2xm BR, Alan On 6/22/22, Fotis Panagiotopoulos <f.j.pa...@gmail.com> wrote: > Hello, > > I am in need of debugging NuttX in a thread-aware fashion, as I still hit a > dead-lock in networking that I haven't managed to track down yet. > > I am using a custom target, based on the STM32F427VI and JLink as the > debugger. > > I see that there is a plug-in for JLink GDB that was added in #4810. > Unfortunately, I never got this working. I commented on the PR, but I got > ignored. > > So: > > 1. I cannot build the plug-in. > Running: > > make -C tools -f Makefile.host all > > I get: > > /usr/bin/ld: /tmp/cclxEqhk.o: relocation R_X86_64_32 against > `.rodata.str1.8' can not be used when making a shared object; recompile > with -fPIC > collect2: error: ld returned 1 exit status > make: *** [Makefile.host:231: jlink-nuttx.so] Error 1 > > I added the -fPIC option, and it was built successfully. > If this is actually the correct option, then I guess the makefile has to be > fixed? > > > 2. After building the plug-in with -fPIC, it crashes during start with a > segmentation fault. > > Here is an example output: > https://pastebin.com/U1tqtMND > > > Has anyone managed to use this? > Any idea what the fault may be? >