Skip to content

Commit

Permalink
[ESP32] update document for app_main outside of main component (#37331)
Browse files Browse the repository at this point in the history
* [ESP32] update document for app_main outside of main component

Earlier, we needed to fetch and link the components separately.
In #36883 we started using `add_prebuilt_library()` so there is
no need to explicitly specify the executable component.

* Restyled by prettier-markdown

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
shubhamdp and restyled-commits authored Feb 3, 2025
1 parent 11a4c4a commit dd0ce89
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/platforms/esp32/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ CONFIG_LWIP_IPV4=n
### Executable component not in "main" component

The ESP-IDF framework allows renaming the main component, which can be useful if
you want to place the app_main() function in a different component.
you want to place the `app_main()` function in a different component.

For required changes in the executable component, please refer to the
[esp-idf documentation](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/build-system.html#renaming-main-component).

If you're building applications that support Matter and want to place app_main()
in a component other than main, use the following command:

```
idf.py -DEXECUTABLE_COMPONENT_NAME="your_component" build
```
You need to list the required components in `idf_component_register()`. If this
module contains Matter related code, you may need to include
`chip, app_update, spi_flash, and nvs_flash` as `PRIV_REQUIRES`, along with any
other necessary dependencies.

0 comments on commit dd0ce89

Please sign in to comment.