Hey Community
I'm getting started with crazyflie and am doing some work on the NRF firmware. Is it possible to debug the NRF without a JTAG? I don't necessarily need to step if I can get the NRF's printf/system logging output plumbed through the same way the STM's debug statements are viewable in the python client app.
Any tips? I've done my best to scour the wiki and forum for previous answers to this and haven't found anything.
Thanks
Sean
Logging from the NRF module
-
- Expert
- Posts: 153
- Joined: Mon Dec 28, 2015 3:23 pm
- Contact:
Logging from the NRF module
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
-
- Expert
- Posts: 153
- Joined: Mon Dec 28, 2015 3:23 pm
- Contact:
Re: Logging from the NRF module
Continuing to dig through this. Here's what I've learned:
- no, printf from the NRF isn't plumbed through to the client in any way.
- "printf" on the NRF51822 is implemented via UART. It's unclear to me whether this is even exposed via the debug breakout board.
- Seems like it would be pretty straightforward to define a new SysLink packet type for the NRF to send debug strings to the STM, where the STM would then printf them. I'm going to go ahead and do this.
Edit: Herp, derp. ConsolePrintf is just a CRTP packet and it makes no sense to send text to the STM just to have the STM turn around and send it right back to the NRF. The NRF could issue this CRTP packet directly for console based printf logging. Derp.
Edit 2: Actually on more thought, there's merit to plumbing a debug mechanism over SysLink instead of directly OTA:
1) Buffer management is much more robust on the STM32 firmware
2) The NRF doesn't actually know abotu CRTP packet formats, so creating a CRTP packet there would break some encapsulation
3) The crazyflie can be hooked up over USB, which talks directly to the STM32, so if I want NRF logging to get plumbed through to the console from a USB connected crazyflie, then I need to ship the log info over SysLink anyway.
- no, printf from the NRF isn't plumbed through to the client in any way.
- "printf" on the NRF51822 is implemented via UART. It's unclear to me whether this is even exposed via the debug breakout board.
- Seems like it would be pretty straightforward to define a new SysLink packet type for the NRF to send debug strings to the STM, where the STM would then printf them. I'm going to go ahead and do this.
Edit: Herp, derp. ConsolePrintf is just a CRTP packet and it makes no sense to send text to the STM just to have the STM turn around and send it right back to the NRF. The NRF could issue this CRTP packet directly for console based printf logging. Derp.
Edit 2: Actually on more thought, there's merit to plumbing a debug mechanism over SysLink instead of directly OTA:
1) Buffer management is much more robust on the STM32 firmware
2) The NRF doesn't actually know abotu CRTP packet formats, so creating a CRTP packet there would break some encapsulation
3) The crazyflie can be hooked up over USB, which talks directly to the STM32, so if I want NRF logging to get plumbed through to the console from a USB connected crazyflie, then I need to ship the log info over SysLink anyway.
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
Tips, tutorials, and science about DIY electronics, drones, and embedded software.