fdcavalcanti commented on PR #17591:
URL: https://github.com/apache/nuttx/pull/17591#issuecomment-3682054754
>
> The problem with using the NXTMPDIR environment variable is that each time
after distclean it would update the mbedtls and component/esp_phy/...
submodules. This is slow and always requires a internet connection. Also the
copying of esp-hal-3rdparty can be slow.
>
Yes it needs to update the submodules: some hashes change depending on your
SoC. I'm afraid we can't skip that.
If we have an update on let's say mbedtls version, we need to be sure users
will sync to the proper hash. Requiring internet connection is a must to build
Espressif devices and honestly, this should not even be an issue.
But, I agree we can always speed things up and I have one suggestion to
shave some time off the build.
1. Get the hash for RISC-V devices on
`nuttx/arch/risc-v/src/common/espressif/Make.defs (ESP_HAL_3RDPARTY_VERSION).
Xtensa devices have one version for each SoC.
2. Enter the `nxtmpdir/esp-hal-3rdparty` directory and locally checkout and
update the submodules, checking out all the submodules on the Make.defs file:
```
cd ../nxtmpdir/esp-hal-3rdparty
git checkout bb255ca422f4b4d60c9f4f74dbdf51316dc2b669
git submodule update --init --depth=1 components/mbedtls/mbedtls
components/esp_phy/lib components/esp_wifi/lib
components/bt/controller/lib_esp32c3_family components/esp_coex/lib
```
This will keep the local copy updated and shave a good time from the build.
Build time without the cached repo:
```
$ time (./tools/configure.sh -l -S esp32-devkitc:nsh; make -j10 )
...
real 0m40,103s
user 1m32,573s
sys 0m29,117s
```
After checking out manually as shown above:
```
$ time (./tools/configure.sh -l -S esp32-devkitc:nsh; make -j10 )
...
real 0m14,788s
user 0m54,180s
sys 0m24,838s
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]