You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Roberto Bucher <ro...@supsi.ch> on 2022/11/30 05:40:11 UTC
Debugging a specific application
Hi
I'm working on my nucleo-144 board, trying to get a microROS working
again under NuttX.
Thanks to a unique change in a microROS file, I've reached to recompile
all the files again and I can obtain the microros application as
described here:
https://github.com/micro-ROS/micro_ros_nuttx_app apps/microros
The application doesn't correctly work yet, and I'm looking for the
problem. I'd like to debug the microros application, but the debugger
shows (as expected) the nsh task. It is possible to start the specific
"microros" generated program or I have to set it as entry point?
Otherwise, how can I attach this task to the debugger? I'm able to debug
the nsh application with the methods described on the NuttX
documentation about debugger. Thanks in advance Roberto
Re: Debugging a specific application
Posted by Sebastien Lorquet <se...@lorquet.fr>.
Dont think about nuttx like you do with linux with isolated processes
and apps loaded from disk files :)
it's more like a *very* advanced set of arduino libs in most usual cases.
(others dont hit me, I know this is extreme simplification.)
if the microros app is compiled in your os image, then you can probably
put a breakpoint on the microros_main() function, then launch microros
with nsh, and your breakpoint will just trip.
For that you need to connect to your nucleo stlink using openocd and
gdb. There are tutorials around there, this is just about generic
embedded debugging techniques.
Sebastien
Le 01/12/2022 à 07:41, Roberto Bucher a écrit :
> Danke Sebastien
>
> The application (microros) is configured and compiled by the nuttx
> generation. But if the routine is in the shell, how can I start it
> from the debugger?
>
> Thanks in advance
>
> Roberto
>
> On 11/30/22 22:17, Sebastien Lorquet wrote:
>> Hi,
>>
>> If your OS is built in monolithic mode (no protected mode) then
>> applications are just routines, so you can put a breakpoint in any
>> app routine and let it run until there.
>>
>> To replace nsh by your app, do make menuconfig, menu RTOS features,
>> menu Tasks and scheduling, text config "Application entry point".
>>
>> But it is not necessary to replace the default app, you can launch it
>> with nsh and still hit a breakpoint in your launched app.
>>
>> Sebastien
>>
>> On 11/30/22 06:40, Roberto Bucher wrote:
>>> Hi
>>>
>>> I'm working on my nucleo-144 board, trying to get a microROS working
>>> again under NuttX.
>>>
>>> Thanks to a unique change in a microROS file, I've reached to
>>> recompile all the files again and I can obtain the microros
>>> application as described here:
>>>
>>> https://github.com/micro-ROS/micro_ros_nuttx_app apps/microros
>>>
>>> The application doesn't correctly work yet, and I'm looking for the
>>> problem. I'd like to debug the microros application, but the
>>> debugger shows (as expected) the nsh task. It is possible to start
>>> the specific "microros" generated program or I have to set it as
>>> entry point? Otherwise, how can I attach this task to the debugger?
>>> I'm able to debug the nsh application with the methods described on
>>> the NuttX documentation about debugger. Thanks in advance Roberto
>>>
>
RE: Debugging a specific application
Posted by Bucher Roberto <ro...@supsi.ch>.
Thanks to all!
I've put the entry point to my application and I can now debug it using the methods described in the NuttX documentation!
This is probably the simplest way to debug a specific app.
Best regards
Roberto
Inviato dal mio Galaxy
-------- Messaggio originale --------
Da: Marc Rosen <ma...@zeitcontrol.de>
Data: 01/12/22 13:36 (GMT+01:00)
A: dev@nuttx.apache.org
Oggetto: Re: Debugging a specific application
Hi,
mind to check if in menu Library Routines the option "Support Builtin
Applications" is set?
And if in menu Application Configuration -> NSH Libraray "Enable
built-in applications" is set?
regards
Marc Rosen
ZeitControl Cardsystems GmbH
Siedlerweg 39
D-32429 Minden
Tel. ++49 (0)571 50 52 222
Fax. ++49 (0)571 50 52 299
E-Mail marcr@zeitcontrol.de
Am 01.12.2022 um 07:41 schrieb Roberto Bucher:
> Danke Sebastien
>
> The application (microros) is configured and compiled by the nuttx
> generation. But if the routine is in the shell, how can I start it
> from the debugger?
>
> Thanks in advance
>
> Roberto
>
> On 11/30/22 22:17, Sebastien Lorquet wrote:
>> Hi,
>>
>> If your OS is built in monolithic mode (no protected mode) then
>> applications are just routines, so you can put a breakpoint in any
>> app routine and let it run until there.
>>
>> To replace nsh by your app, do make menuconfig, menu RTOS features,
>> menu Tasks and scheduling, text config "Application entry point".
>>
>> But it is not necessary to replace the default app, you can launch it
>> with nsh and still hit a breakpoint in your launched app.
>>
>> Sebastien
>>
>> On 11/30/22 06:40, Roberto Bucher wrote:
>>> Hi
>>>
>>> I'm working on my nucleo-144 board, trying to get a microROS working
>>> again under NuttX.
>>>
>>> Thanks to a unique change in a microROS file, I've reached to
>>> recompile all the files again and I can obtain the microros
>>> application as described here:
>>>
>>> https://github.com/micro-ROS/micro_ros_nuttx_app apps/microros
>>>
>>> The application doesn't correctly work yet, and I'm looking for the
>>> problem. I'd like to debug the microros application, but the
>>> debugger shows (as expected) the nsh task. It is possible to start
>>> the specific "microros" generated program or I have to set it as
>>> entry point? Otherwise, how can I attach this task to the debugger?
>>> I'm able to debug the nsh application with the methods described on
>>> the NuttX documentation about debugger. Thanks in advance Roberto
>>>
>
Re: Debugging a specific application
Posted by Marc Rosen <ma...@zeitcontrol.de>.
Hi,
mind to check if in menu Library Routines the option "Support Builtin
Applications" is set?
And if in menu Application Configuration -> NSH Libraray "Enable
built-in applications" is set?
regards
Marc Rosen
ZeitControl Cardsystems GmbH
Siedlerweg 39
D-32429 Minden
Tel. ++49 (0)571 50 52 222
Fax. ++49 (0)571 50 52 299
E-Mail marcr@zeitcontrol.de
Am 01.12.2022 um 07:41 schrieb Roberto Bucher:
> Danke Sebastien
>
> The application (microros) is configured and compiled by the nuttx
> generation. But if the routine is in the shell, how can I start it
> from the debugger?
>
> Thanks in advance
>
> Roberto
>
> On 11/30/22 22:17, Sebastien Lorquet wrote:
>> Hi,
>>
>> If your OS is built in monolithic mode (no protected mode) then
>> applications are just routines, so you can put a breakpoint in any
>> app routine and let it run until there.
>>
>> To replace nsh by your app, do make menuconfig, menu RTOS features,
>> menu Tasks and scheduling, text config "Application entry point".
>>
>> But it is not necessary to replace the default app, you can launch it
>> with nsh and still hit a breakpoint in your launched app.
>>
>> Sebastien
>>
>> On 11/30/22 06:40, Roberto Bucher wrote:
>>> Hi
>>>
>>> I'm working on my nucleo-144 board, trying to get a microROS working
>>> again under NuttX.
>>>
>>> Thanks to a unique change in a microROS file, I've reached to
>>> recompile all the files again and I can obtain the microros
>>> application as described here:
>>>
>>> https://github.com/micro-ROS/micro_ros_nuttx_app apps/microros
>>>
>>> The application doesn't correctly work yet, and I'm looking for the
>>> problem. I'd like to debug the microros application, but the
>>> debugger shows (as expected) the nsh task. It is possible to start
>>> the specific "microros" generated program or I have to set it as
>>> entry point? Otherwise, how can I attach this task to the debugger?
>>> I'm able to debug the nsh application with the methods described on
>>> the NuttX documentation about debugger. Thanks in advance Roberto
>>>
>
Re: Debugging a specific application
Posted by Roberto Bucher <ro...@supsi.ch>.
Danke Sebastien
The application (microros) is configured and compiled by the nuttx
generation. But if the routine is in the shell, how can I start it from
the debugger?
Thanks in advance
Roberto
On 11/30/22 22:17, Sebastien Lorquet wrote:
> Hi,
>
> If your OS is built in monolithic mode (no protected mode) then
> applications are just routines, so you can put a breakpoint in any app
> routine and let it run until there.
>
> To replace nsh by your app, do make menuconfig, menu RTOS features,
> menu Tasks and scheduling, text config "Application entry point".
>
> But it is not necessary to replace the default app, you can launch it
> with nsh and still hit a breakpoint in your launched app.
>
> Sebastien
>
> On 11/30/22 06:40, Roberto Bucher wrote:
>> Hi
>>
>> I'm working on my nucleo-144 board, trying to get a microROS working
>> again under NuttX.
>>
>> Thanks to a unique change in a microROS file, I've reached to
>> recompile all the files again and I can obtain the microros
>> application as described here:
>>
>> https://github.com/micro-ROS/micro_ros_nuttx_app apps/microros
>>
>> The application doesn't correctly work yet, and I'm looking for the
>> problem. I'd like to debug the microros application, but the debugger
>> shows (as expected) the nsh task. It is possible to start the
>> specific "microros" generated program or I have to set it as entry
>> point? Otherwise, how can I attach this task to the debugger? I'm
>> able to debug the nsh application with the methods described on the
>> NuttX documentation about debugger. Thanks in advance Roberto
>>
Re: Debugging a specific application
Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hi,
If your OS is built in monolithic mode (no protected mode) then
applications are just routines, so you can put a breakpoint in any app
routine and let it run until there.
To replace nsh by your app, do make menuconfig, menu RTOS features, menu
Tasks and scheduling, text config "Application entry point".
But it is not necessary to replace the default app, you can launch it
with nsh and still hit a breakpoint in your launched app.
Sebastien
On 11/30/22 06:40, Roberto Bucher wrote:
> Hi
>
> I'm working on my nucleo-144 board, trying to get a microROS working
> again under NuttX.
>
> Thanks to a unique change in a microROS file, I've reached to
> recompile all the files again and I can obtain the microros
> application as described here:
>
> https://github.com/micro-ROS/micro_ros_nuttx_app apps/microros
>
> The application doesn't correctly work yet, and I'm looking for the
> problem. I'd like to debug the microros application, but the debugger
> shows (as expected) the nsh task. It is possible to start the specific
> "microros" generated program or I have to set it as entry point?
> Otherwise, how can I attach this task to the debugger? I'm able to
> debug the nsh application with the methods described on the NuttX
> documentation about debugger. Thanks in advance Roberto
>
Re: Debugging a specific application
Posted by Tim Hardisty <ti...@jti.uk.com.INVALID>.
Not sure if it helps, but the built-in apps can be easily debugged, so could you perhaps include your application as a custom app, selected via the NuttX Kconfig so it gets built in, then start it from the nsh?
A workaround maybe, but might help?
On 30/11/2022, 05:40, "Roberto Bucher" <ro...@supsi.ch> wrote:
Hi
I'm working on my nucleo-144 board, trying to get a microROS working
again under NuttX.
Thanks to a unique change in a microROS file, I've reached to recompile
all the files again and I can obtain the microros application as
described here:
https://github.com/micro-ROS/micro_ros_nuttx_app apps/microros
The application doesn't correctly work yet, and I'm looking for the
problem. I'd like to debug the microros application, but the debugger
shows (as expected) the nsh task. It is possible to start the specific
"microros" generated program or I have to set it as entry point?
Otherwise, how can I attach this task to the debugger? I'm able to debug
the nsh application with the methods described on the NuttX
documentation about debugger. Thanks in advance Roberto