-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix of unknown Ringbuffer and not found USB-Serial Device #125
Conversation
Could you provide details on how to trigger this build error? Also, the CI seems to have errors |
The CI for Zephyr 2.7.2 complains about: I considered the error could be based on an api/syntax change between the versions 2.7.2 and 3.1 but as i searched the documentation for Zephyr 2.7.2 i found, that the added overlay code is the same as proposed in So i compared the device-tree overlays disco_l475_iot1.dts for the board and got (just the important detail):
So error is caused by a change in the devicetree-overlay. |
Can you update the PR? |
I'm sorry, but i dont understand you. Could you explain it? |
Sure, I wonder if you can update the PR with the required changes in order to make the CI pass. |
Steps to trigger this error:
results in the error message:
|
#126 merged, could you rebase? |
…icroros_transports/serial-usb/microros_transports.c" can find the device
A fix for backwards compability
I hope i did it right. |
The problem that I ran (originally) into has been, that my code did compile, but when i flashed it, it didn't work. It took me while to understand, that the problem was caused by this line
This function call itself it not dependent on any correct hardware configuration. A string is a string. But at runtime it tried to get the device, by a label/name not known to the zephyr OS, due to lacking configuration. So the surrounding RCCHECK of the function, which calls this code line indirect, did throw an error:
So i dont think that any CI, which only compiles the code (as far as i unterstand the log), would actually detect my problem, because it only shows up at runtime. So i can currently confirm my solution for my setup only |
I> Is it possible to embedded this dependency of the USB CDC transport at KConfig level. Something like the following in It is possible, also all warnings to the use of "select" in Kconfig apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last changes and we can merge
Co-authored-by: Pablo Garrido <[email protected]>
Co-authored-by: Pablo Garrido <[email protected]>
@mergify backport humble rolling |
✅ Backports have been created
|
* Added Ringbuffer-config in prj.conf for eliminating error * Added Label CDC_ACM_0 label with an overlay so "modules/libmicroros/microros_transports/serial-usb/microros_transports.c" can find the device * Update app.overlay * Update app.overlay A fix for backwards compability * Update app.overlay * Update app.overlay * Update prj.conf * Better comments * Changed settings to conditional from transport choice * Update prj.conf Co-authored-by: Pablo Garrido <[email protected]> * Update modules/libmicroros/Kconfig Co-authored-by: Pablo Garrido <[email protected]> --------- Co-authored-by: scrapforge <[email protected]> Co-authored-by: Pablo Garrido <[email protected]> (cherry picked from commit 7c5edcd) # Conflicts: # prj.conf
* Added Ringbuffer-config in prj.conf for eliminating error * Added Label CDC_ACM_0 label with an overlay so "modules/libmicroros/microros_transports/serial-usb/microros_transports.c" can find the device * Update app.overlay * Update app.overlay A fix for backwards compability * Update app.overlay * Update app.overlay * Update prj.conf * Better comments * Changed settings to conditional from transport choice * Update prj.conf Co-authored-by: Pablo Garrido <[email protected]> * Update modules/libmicroros/Kconfig Co-authored-by: Pablo Garrido <[email protected]> --------- Co-authored-by: scrapforge <[email protected]> Co-authored-by: Pablo Garrido <[email protected]> (cherry picked from commit 7c5edcd)
) (#129) * Fix of unknown Ringbuffer and not found USB-Serial Device (#125) * Added Ringbuffer-config in prj.conf for eliminating error * Added Label CDC_ACM_0 label with an overlay so "modules/libmicroros/microros_transports/serial-usb/microros_transports.c" can find the device * Update app.overlay * Update app.overlay A fix for backwards compability * Update app.overlay * Update app.overlay * Update prj.conf * Better comments * Changed settings to conditional from transport choice * Update prj.conf Co-authored-by: Pablo Garrido <[email protected]> * Update modules/libmicroros/Kconfig Co-authored-by: Pablo Garrido <[email protected]> --------- Co-authored-by: scrapforge <[email protected]> Co-authored-by: Pablo Garrido <[email protected]> (cherry picked from commit 7c5edcd) # Conflicts: # prj.conf * Update prj.conf --------- Co-authored-by: scrapforge <[email protected]> Co-authored-by: Pablo Garrido <[email protected]>
* Added Ringbuffer-config in prj.conf for eliminating error * Added Label CDC_ACM_0 label with an overlay so "modules/libmicroros/microros_transports/serial-usb/microros_transports.c" can find the device * Update app.overlay * Update app.overlay A fix for backwards compability * Update app.overlay * Update app.overlay * Update prj.conf * Better comments * Changed settings to conditional from transport choice * Update prj.conf Co-authored-by: Pablo Garrido <[email protected]> * Update modules/libmicroros/Kconfig Co-authored-by: Pablo Garrido <[email protected]> --------- Co-authored-by: scrapforge <[email protected]> Co-authored-by: Pablo Garrido <[email protected]> (cherry picked from commit 7c5edcd) Co-authored-by: scrapforge <[email protected]>
I added in prj.conf a CONFIG_RING_BUFFER=y line, due to an error while building, which stated an undefined reference occured, similar to this on zephyrproject-rtos/zephyr#30183.
Also i could not reliably reproduce the error. This line fixed any appearance of it.
Also if usb-serial configured as transport layer for microros, the code hang up. After a lot of debugging i found that in the file mymicromodule/modules/libmicroros/microros_transports/serial-usb/microros_transports.c the device is searched by its label CDC_ACM_0. Therefore an app.overlay file is needed, which i added.
I have used
zephyr 3.5.0-rc3
and
zephyr-sdk 0.16.3