-
Notifications
You must be signed in to change notification settings - Fork 6
Add preliminary support for ESP IDF and FreeRTOS #305
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
base: main
Are you sure you want to change the base?
Conversation
…configurations and adding example projects.
Benchmark results after merging this PR: Benchmark resultsPerformance:PingPongUc: PingPongC: ReactionLatencyUc: ReactionLatencyC: Memory usage:PingPongUc: PingPongC: ReactionLatencyUc: ReactionLatencyC: |
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
deadline_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
nanopb_test_c
physical_clock_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
} | ||
|
||
LF_ENTRY_POINT(TimerSource,32,32, SEC(1), false, false); | ||
#ifdef TIMEOUT |
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.
Why this change?
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.
I've added a configurable timeout to address an issue when debugging a Raspberry Pi Pico on WSL. After a reboot, the serial port must be manually forwarded from the host to WSL, which means that the initial boot logs are missed. This change gives users the option to set a long timeout, providing a sufficient window to re-establish the port connection and see the logs to confirm the board is working.
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.
So it is actually not a timeout in the LF sense, but a delay on startup?
@@ -0,0 +1,46 @@ | |||
|
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.
remove empty spaces.
cmake_minimum_required(VERSION 3.20.0) | ||
set(PLATFORM "ESP_IDF" CACHE STRING "Platform to target") | ||
set(BUILD_EXAMPLES OFF CAHCHE BOOL) | ||
set(TIMEOUT "1" ON CACHE STRING "Timeout in seconds, disable for infinite") |
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.
why as a compile flag, normally the timeout value is inside the generated code?
#include "esp_flash.h" | ||
#include "esp_system.h" | ||
#include "reactor-uc/reactor-uc.h" | ||
#include "reactor-uc/environment.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.
I think this include should be unnecessary because it should already be included by the previous include statement.
|
||
void app_main(void) | ||
{ | ||
configure_led(); |
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.
is app_main
the entry point for the ESP sdk?
why not put this configure_led();
inside a startup reaction?
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.
That's a good point. It makes more sense to place this logic in the startup reaction.
@@ -0,0 +1,1389 @@ | |||
# |
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.
can we maybe, put this into the template repo for the ESP?
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.
Yes, sure
This PR adds preliminary support for building and running the
reactor-uc
library and its examples on FreeRTOS and ESP-IDF platforms, tested on the RP2040 (Pico) and ESP32 microcontrollers (#37).