Skip to content

Compile error if CONFIG_FREERTOS_HZ != 1000 #6955

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

Merged
merged 5 commits into from
Aug 26, 2022
Merged

Compile error if CONFIG_FREERTOS_HZ != 1000 #6955

merged 5 commits into from
Aug 26, 2022

Conversation

egnor
Copy link
Contributor

@egnor egnor commented Jul 7, 2022

Description of Change

Since delay() won't work properly with CONFIG_FREERTOS_HZ not set to 1000, this adds a _Static_assert to verify that fact. (The standard Arduino build already sets the value properly; this is for people using the Arduino platform as a component within their own ESP-IDF build.)

Tests scenarios

Tested with a platformio build that left CONFIG_FREERTOS_HZ at the default (100) and verified build failure.
Then added CONFIG_FREERTOS_HZ=1000 to config.defaults, erased config.esp32 and built again, verifying success this time.

(This particular build happens to be for the OLIMEX ESP32-POE, but none of this has any impact on runtime-- runtime code is unchanged.)

Related links

Addresses #6946

@CLAassistant
Copy link

CLAassistant commented Jul 7, 2022

CLA assistant check
All committers have signed the CLA.

@egnor
Copy link
Contributor Author

egnor commented Jul 11, 2022

Ha, looks like the CI build ran afoul of this check. From the conversation when that check was added:

Sure, but still what would be the benefit compared to the lib-builder doing this every 6 hours? Make sure that Arduino will build without any other submodules and default config?

Working as intended, I suppose... this change explicitly makes it so the default config does not build. Tracing through the CI scripts, it looks like it starts with a standard espressif/idf:release-v4.4 container:

build-esp-idf-component:

Is the right thing to add some steps to that workflow that create an sdkconfig.defaults (or point to an sdkconfig.ci)? Or something else?

@egnor
Copy link
Contributor Author

egnor commented Jul 18, 2022

(By the way @atanisoft, I attempted to request re-review in github, but it failed, seemingly due to this issue: community/community#11738)

@VojtechBartoska VojtechBartoska added Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF Status: Pending labels Aug 10, 2022
@egnor egnor requested review from atanisoft and removed request for me-no-dev August 24, 2022 22:08
@me-no-dev
Copy link
Member

In order for CI to pass, we either need to ensure that proper option is selected here or have the CI add sdkconfig.defaults before building against ESP-IDF

@egnor
Copy link
Contributor Author

egnor commented Aug 25, 2022

In order for CI to pass, we either need to ensure that proper option is selected here or have the CI add sdkconfig.defaults before building against ESP-IDF

Based on my understanding of the Kconfig language, you can't set reverse dependencies to force an int option (like FREERTOS_HZ) to a specific value based on a different config. So unless you know some trick I don't, I'll look into some sort of sdkconfig.defaults setup...

@egnor egnor requested review from me-no-dev and atanisoft and removed request for atanisoft and me-no-dev August 26, 2022 02:35
@egnor
Copy link
Contributor Author

egnor commented Aug 26, 2022

(Let's see if this fixes the CI. Sorry about the reviewer flip-flopping, I was confused by the interface.)

@me-no-dev
Copy link
Member

Thanks @egnor ! CI passes now :)

@me-no-dev me-no-dev merged commit adb01cf into espressif:master Aug 26, 2022
Jason2866 added a commit to Jason2866/arduino-esp32 that referenced this pull request Sep 6, 2022
* Enable configuring target variants (espressif#7019)

This change enables picking the right board configuration from the
variants/ folder. Previously, we would always pick the default
configuration (e.g., "esp32" instead of "heltec_wifi_lora_32_V2").

* Update .gitignore (espressif#7021)

Add entries to gitignore

* Update esptool to version 4.2.1 (espressif#7127)

* Update esptool to version 4.2.1

* Fix esptool for MacOS

* Esptool v4.2.1 for CI Platformio (espressif#7147)

to complete the test.

Co-authored-by: Jason2866 <[email protected]>

* Update get.py to support python 3.10+ (espressif#7166)

* Update get.py to support python 3.10+

* Use try/except to remove version check

* fixed names on the VID and PID for boards (espressif#7144)

somehow had duplicated the same name across all my boards. the PID's and VID's were correct, but the name was the same for all of them. that is fixed now.

* Compile error if CONFIG_FREERTOS_HZ != 1000 (espressif#6955)

* Compile error if CONFIG_FREERTOS_HZ != 1000
* add a check at the CMake level, per feedback
* Set CONFIG_FREERTOS_HZ=1000 in CI test of Arduino-as-component

* Adding u-blox NORA-W10 series (ESP32-S3) (espressif#7191)

* Create pins_arduino.h

* Update boards.txt

* Update boards.txt

* Fixed espressif/esp-rainmaker#152 (espressif#7171)

* Update PlatformIO build scripts (espressif#7200)

This update includes the following:

- Implemented an additional build step that produces an adjusted bootloader image with updated headers
  according to  selected flash mode and size values. This step is only executed for debugging or uploading
  via debug probes.

- Implemented a basic mechanism to dynamically add an extra UF2 bootloader image if corresponding
  partition is selected (e.g. for Adafruit targets)

- Minor code formatting

Co-authored-by: Dr. Christian Kohlschütter <[email protected]>
Co-authored-by: Me No Dev <[email protected]>
Co-authored-by: Paul Price <[email protected]>
Co-authored-by: Daniel Egnor <[email protected]>
Co-authored-by: Michael Ammann <[email protected]>
Co-authored-by: Sanket Wadekar <[email protected]>
Co-authored-by: Valerii Koval <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants