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

support for esp32 #12

Merged
merged 5 commits into from
Jul 28, 2020
Merged

support for esp32 #12

merged 5 commits into from
Jul 28, 2020

Conversation

donRaphaco
Copy link

Raphael Vogelgsang added 3 commits June 30, 2020 10:53
Signed-off-by: Raphael Vogelgsang <[email protected]>
apps/ping_pong/app.c Outdated Show resolved Hide resolved
@donRaphaco donRaphaco marked this pull request as ready for review July 22, 2020 11:22
Signed-off-by: Raphael Vogelgsang <[email protected]>
@donRaphaco donRaphaco changed the base branch from dashing to foxy July 27, 2020 09:13
Comment on lines +11 to +14
#ifdef ESP_PLATFORM
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#endif
Copy link
Author

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>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed for usleep function

@pablogs9 pablogs9 merged commit 9a618e8 into foxy Jul 28, 2020
@pablogs9 pablogs9 deleted the esp32 branch July 28, 2020 11:06
Comment on lines +2 to +3
CONFIG_FREERTOS_UNICORE=y
CONFIG_ESP_TASK_WDT=n
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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

Copy link
Author

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 :)

Copy link
Member

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 ?

Copy link
Author

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 👍

Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

@pablogs9 pablogs9 Sep 22, 2020

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!!

fofolevrai pushed a commit to fofolevrai/freertos_apps that referenced this pull request Jun 14, 2021
Build docker containers as a base for the other jobs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants