-
Notifications
You must be signed in to change notification settings - Fork 6
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
Modifications to run microROS on NuttX RTOS #31
Comments
It is not possible to check if the typedef already exists, but a possible solution can be:
|
Hello @robertobucher, please open a PR with your changes. |
I guess that related: |
Exactly, but I don't know exactly the effects of this check #ifndef __INCLUDE_DIRENT_H on the other OS (freertos and zephyr). For NuttX it is required that the type DIR is not redefined, and the definition is in dirent.h! This is one of the problems related to microros that causes the failure of the generation of the libmicroros.a. There are other things but only related to files in this repository (colcon.meta and the microros_main.c). I tested the the app using a nucleo-144 board and UDP as communication channel under galactic. |
The patches are now proposed as micro-ROS/rcutils#25 I had some problems by rebasing the 2 repositorires... With the proposed PR, micro_ros_nuttx_app is able to finish the compilation without errors. I've not tested the serial communication, but only communication via UDP. |
Issue template
microROS on NuttX target runs correctly again, but there are some corrections required to correctly compile the example.
Steps to reproduce the issue
The file micro_ros_src/src/rcutils/src/filesystem.c contains a redefinition of "DIR" (which is already defined in the dirent.h" file in NuTTX).
A test is required such
#ifdef DIR or #ifndef DIR....
Expected behavior
the nuttx application compile again
Actual behavior
There is the error about redefining DIR. To get the compilaton correctly I've commented the line
#ifdef RCUTILS_NO_FILESYSTEM
//typedef int DIR; <=======
#endif // _RCUTILS_NO_FILESYSTEM
typedef struct rcutils_dir_iter_state_t
{
#ifdef _WIN32
HANDLE handle;
WIN32_FIND_DATA data;
#else
DIR * dir;
#endif
} rcutils_dir_iter_state_t;
but it is not the correct solution.
Additional information
I've modified also the microros_main.c file in the microros/example_app
The text was updated successfully, but these errors were encountered: