nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

Adding uart to Project

Trying to add UART capability (sample project from console) to a a ESB transmit sample project. Could not get a build assert to work.

BUILD_ASSERT(DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart),
	     "Console device is not ACM CDC UART device");

1) Tried to add all of the selections from Kconfig using Visual Studio Code. This seems very prone to missing a setting for the config. Is this even the correct approach? 

2) Added the includes that were missing when comparing to console sample. 

3) looked at the device tree and there are differences there. Should I be editing this directly or is there another file to edit? 

4) Any other place to edit the config? There is logging on the ESB sample and I wonder if that is causing issues.  

I found some samples on merging but they were a few years old and not sure if the process is the same now. 

  • Hi,

    Could you give me a few more details about what you are planning to use the UART for? Are you specifically looking to add a acm cdc uart device, or just a generic uart device?

  • Looking to add a: acm cdc uart device

    But also looking for steps to take when I want to add functionality using a sample project as a guide. The idea for this project is to use ESB (enhanced shock burst) as a transceiver and use acm cdc uart to have a com port presented to a computer which can get data from the device and send commands to the device. 

    So I see the kconfig and that is where a lot of the drivers options are but does the device tree just need manual configuration or is there a config for that too with a GUI? Also there is just the includes that are part of your main.c in this case. Is that all of the steps or are there other configs that need to be modified to enable acm cdc uart on your projects? 

    acm cdc uart device
Related