micro-ROS / micro_ros_zephyr_module

micro-ROS Zephyr module and sample code
Apache License 2.0
54 stars 26 forks source link

A few build questions #79

Closed gseqBE closed 2 years ago

gseqBE commented 2 years ago

Hello, I'm more familiar with the old style of using zephyr(micro_ros_setup). My issues was here, and have been directed here.

Questions:

  1. Using the nightly workflow as a template, I create a docker image based off Ubuntu 22.04, with necessary apt installs. Once built, under a container, I have a build script(z.sh) which gets sourced(source z.sh), with necessary zephyr sdk install. Any guidance/comments on this setup? z.txt

  2. Once the above script finishes, I clone micro_ros_zephyr_module under zephyrproject/zephyr, then build using west build -p always -b disco_l475_iot1 micro_ros_zephyr_module but building with any other board fails: west build -p always -b nucleo_h743zi micro_ros_zephyr_module with alot of redifinition errors(see redefinition.log). There is another issue detailing this, but I'm on v3.1 and sdk 0.14.2. I made sure to checkout v3.1 of zephyr. redefinition.log

3.In the old method, one could change the transport. We are using udp. How does one do that here and configure microros. Is that required now?

Steps to reproduce the issue

Expected behavior

Actual behavior

Additional information

pablogs9 commented 2 years ago
  1. I recommend you use the Zephyr Getting Started instead of our CI: https://docs.zephyrproject.org/3.1.0/develop/getting_started/index.html make sure that you check out version v3.1

  2. If you source your Zephyr installation it is not necessary to clone this repo inside the Zephyr installation folder. Regarding the redefinitions, make sure that the conf is correct and also that you have here the specific board configuration. In any case, have you tried to build a Zephyr app without micro-ROS, and the same configuration and include zephyr/posix/time.h where seems to be the error: conflicting types for 'APSR_Type'?

  3. You can change the transport by selecting in menuconfig which one is needed to be built, here you have the implementations, and here the transport configuration at app level.

gseqBE commented 2 years ago

Thanks. Regarding 2. I'm able to build successfully a blinky with west build -p always -b nucleo_h743zi samples/basic/blinky with time.h included in blinky/src/main.c. Investigating...

pablogs9 commented 2 years ago

Ok, let us know what you find

gseqBE commented 2 years ago

Update:

  1. How would one add the board configuration to microros? zephyr/boards/arm has the nucleo_h743zi I can successfully build: west build -p auto -b disco_l475_iot1 micro_ros_zephyr_module but not: west build -p auto -b nucleo_h743zi micro_ros_zephyr_module. I get redefinition errors. btw, I'm on an aarch64 architecture(M1)

New question:

  1. Is there support for a custom app(like the old version)? There used to be a define UROS_CUSTOM_APP_FOLDER.
pablogs9 commented 2 years ago
  1. That's Zephyr configuration using .conf and .overlay files
  2. This is a sample app, just modify main.c
gseqBE commented 2 years ago

I managed to get a successful compile with the nucleo_h743zi. Just had to create the overlay file in the micro_ros_zephyr_module root.

/ { aliases { uros-serial-port = &usart3; }; };

Thank you.