-
Notifications
You must be signed in to change notification settings - Fork 50
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
support for esp32 #12
Conversation
Signed-off-by: Raphael Vogelgsang <[email protected]>
Signed-off-by: Raphael Vogelgsang <[email protected]>
Signed-off-by: Raphael Vogelgsang <[email protected]>
#ifdef ESP_PLATFORM | ||
#include "freertos/FreeRTOS.h" | ||
#include "freertos/task.h" | ||
#endif |
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.
for esp32 these includes are needed for vTaskDelete
@@ -1,4 +1,5 @@ | |||
#include <stdio.h> | |||
#include <unistd.h> |
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.
needed for usleep
function
CONFIG_FREERTOS_UNICORE=y | ||
CONFIG_ESP_TASK_WDT=n |
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.
Hello @donRaphaco, do you have any idea on why is this necessary?
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.
The CONFIG_ESP_TASK_WDT=n
setting I added to prevent getting a warning (during runtime) that the watchdog timer for the main task did not reset. I figured task watchdog timers aren't really useful if there is only one task, hence I deactivated them with this setting. (about the esp32 task watchdog timer)
The setting CONFIG_FREERTOS_UNICORE=y
I don't know why it's necessary for microros, but if I don't use this setting I'm getting a runtime error and I can't really figure out why exactly.
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.
Thank you very much @donRaphaco
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.
@pablogs9 I just realized, that the error I had with CONFIG_FREERTOS_UNICORE=y
is now solved somehow, which is really cool since I noticed a performance boost right away when I removed the setting.
So CONFIG_FREERTOS_UNICORE=y
isn't actually necessary any more and should be removed :)
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.
Thank you very much @donRaphaco. Could you share a reference link and I will commit the changes?
BTW, have you seen this: https://github.com/micro-ROS/micro_ros_espidf_component ?
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.
@pablogs9 what do you mean by "reference link"?
Yeah I've seen https://github.com/micro-ROS/micro_ros_espidf_component and tested it. I really like it, since it's better integrates with the esp-idf stuff 👍
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.
sorry, I meant a link to somewhere where is explained which was this issue with CONFIG_FREERTOS_UNICORE
and why /how they have solved it.
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.
Well to be honest I never really understood the issue with CONFIG_FREERTOS_UNICORE
.
All I know is that in the first PR #12 I made, without this setting there was a runtime error even before the app_main
function was executed.
I have no idea what the actual problem was then and also don't know when and how it was fixed.
So sorry I don't have a reference for this.
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.
Ok, so I will try both ESP32 + micro-ROS build tools and I will remove it from config defaults. Thanks!!
Build docker containers as a base for the other jobs.
relates to micro-ROS/micro_ros_setup#140