Skip to content
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

Merged
merged 11 commits into from
Oct 26, 2023
16 changes: 16 additions & 0 deletions app.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*Added these lines for compability with Zephyr v2.7*/
zephyr_udc0: &usbotg_fs {
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12
&usb_otg_fs_id_pa10>;
pinctrl-names = "default";
status = "okay";
};
pablogs9 marked this conversation as resolved.
Show resolved Hide resolved
/* End of compability part */


&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
pablogs9 marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 16 additions & 4 deletions modules/libmicroros/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ if MICROROS

config MICROROS_TRANSPORT_SERIAL
bool "micro-ROS serial transport"

select RING_BUFFER
config MICROROS_TRANSPORT_SERIAL_USB
bool "micro-ROS USB serial transport"

select RING_BUFFER
select USB_DEVICE_STACK
config MICROROS_TRANSPORT_UDP
bool "micro-ROS UDP network transport"

Expand Down Expand Up @@ -64,7 +65,18 @@ if MICROROS
micro-ROS Agent IP.
endif


if MICROROS_TRANSPORT_SERIAL_USB
config USB_CDC_ACM
bool
default y
config USB_CDC_ACM_RINGBUF_SIZE
int "USB-CDC-ACM Ringbuffer size"
default "2048"
config USB_DEVICE_PRODUCT
string "USB Device Product"
default "Zephyr micro-ROS"

endif
config MICROROS_NODES
string "available micro-ROS nodes"
default "1"
Expand Down Expand Up @@ -98,4 +110,4 @@ if MICROROS
default "4"

endif

6 changes: 0 additions & 6 deletions prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ CONFIG_APP_LINK_WITH_POSIX_SUBSYS=y
CONFIG_POSIX_CLOCK=y

CONFIG_STDOUT_CONSOLE=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr micro-ROS"
CONFIG_LOG=y
CONFIG_USB_CDC_ACM=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=2048
Loading