Debugging neonkey board


How can I debug neonkey firmware ? I have connected it to the LS expansion connector of Hikey960 and getting linux logs from 10 pin connector provided on neonkey board (Pin1 and 2).
How can I get logs of the SW running on Nenonkey controller?


Judging from the schematic any logs will be sent to the baseboard
(LS-UART0) although, in truth, I’ve no idea what logging is enabled by


Those ones looks like input to the controller. 96UART0_TX is input to STM which means the output is coming from AP core. I think this is the interface used for flashing in command

adb shell stm32_flash -u -d /dev/ttyAMA2 -e 0xffff -w /data/local/tmp/full.bin


The command you highlight can only be executed when the STM32 is boot mode (with BOOT0 pulled up). When BOOT0 is pulled up the STM32 will execute a bootloader from ROM that can be used to write to FLASH (getting data from UART)… Using the UART for this purpose it has no impact on what the actual firmware chooses to use the UART for (if anything).

As I say, I haven’t got a neonkey but, having taken a glance at the firmware sources I could see that there is some internal logging in the firmware. I didn’t go far enough to find out where the logs actually go. It is possible they go to the UART (I’m not clear whether UART or I2C is used to send/receive command and control data from the Neonkey). If they are not on the UART they might also be switched off or accessible only through a hardware debugger (via semi-hosting). I’m afraid you might have to dig through the sources to find out.


@Tushar As @danielt mentioned debugging takes place through UART0 most of the times for Neonkey.

Also, the log you are seeing via 10pin connector is actually the log coming from the base board. Neonkey only exposes UART0 (96UART0 according to schematic) interface. So, eventually if you want to debug the firmware running on Neonkey using serial, then you have to see the log using the base board (Hikey 960 in your case) by running a serial monitor on /dev/ttyAMA3.

As far as the software support for this board is concerned, we have just added the Zephyr [1] board support recently (not merged yet).

Hope this helps!




Thanks @Mani for the post.
I am able to get the logs from my hikey using microcom serial logger withb/dev/ttyAMA3.
Is Zephyr supported with Context hub interface ? What are steps to use it ?


Hi @Tushar,

Zephyr is not anyway linked to context hub in aosp. It is a standalone RTOS and you can find the instructions for building and flashing in doc [1].