- Notifications
You must be signed in to change notification settings - Fork 7.8k
feat(core): Add wait time before setup#11367
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Added initialization time for UART, etc. Default value is 0.
github-actionsbot commented May 15, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
👋 Hello tanakamasayuki, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
github-actionsbot commented May 15, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Test Results 76 files 76 suites 13m 13s ⏱️ Results for commit a77a94b. ♻️ This comment has been updated with latest results. |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add function definition and SET_SETUP_WAIT_TICH function
Uh oh!
There was an error while loading. Please reload this page.
Jason2866 commented May 15, 2025
Please do not add weak defines. There are two open issues where weak defines generate weird issues. |
tanakamasayuki commented May 16, 2025
Thank you for your reply. [memo] projects/build_opt.h main.cpp #if defined(ARDUINO_SETUP_WAIT_TIME) // set the delay time before running setup in build_opt.hvTaskDelay(ARDUINO_SETUP_WAIT_TIME); #endifRestarting the Arduino IDE did not recompile main.cpp. |
me-no-dev commented Jun 10, 2025
Rename to |
me-no-dev commented Jun 10, 2025
Reasons there were/are different. |
SuGlider commented Jun 21, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
SuGlider left a comment
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.
LGTM
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR introduces a new feature to allow a configurable wait time before sketch execution, giving users time to open the Serial Monitor and catch the initialization messages.
- Adds a macro and function (getArduinoSetupWaitTime_ms) to enable a configurable delay before setup().
- Updates the main loop task to use the new wait time.
- Provides an example sketch to demonstrate the feature.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libraries/ESP32/examples/ArduinoWaitTimeBeforeStartingSketch/ArduinoWaitTimeBeforeStartingSketch.ino | Demonstrates use of the wait time macro with a 5-second delay before starting. |
| cores/esp32/main.cpp | Updates loopTask to delay execution using getArduinoSetupWaitTime_ms. |
| cores/esp32/Arduino.h | Adds the macro SET_TIME_BEFORE_STARTING_SKETCH_MS and declares getArduinoSetupWaitTime_ms. |
Comments suppressed due to low confidence (1)
cores/esp32/Arduino.h:234
- Consider marking the function definition inside the macro as 'inline' (or 'static inline') to avoid potential multiple definition issues when included in multiple source files.
#define SET_TIME_BEFORE_STARTING_SKETCH_MS(time_ms) \ SuGlider commented Jun 21, 2025
@tanakamasayuki - thank you for the contribution! |
github-actionsbot commented Jun 22, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SuGlider commented Sep 9, 2025
@me-no-dev@P-R-O-C-H-Y@lucasssvaz - This feature may be interesting for debuging with CDC . I had a few problems reading logs when using TimyUSB CDC for the S2 and S3. When I reset the SoC and try to read the logs after enumeration and opening a terminal, messages are already gone. |
a42f4a7 into espressif:masterUh oh!
There was an error while loading. Please reload this page.
Description of Change
Added initialization time for UART, etc.
Default value is 0.
Tests scenarios
Arduino-esp32 core v3.2.0 with M5STACK_STICKC_PLUS2 Board
now or default
output
Output is cut off because UART is not yet initialized.
set wait
output
All output.