LIFsCode / ELOC-3.0

Firmware for ELOC 3.0 Hardware
MIT License
2 stars 3 forks source link

Build error since commit 408ab7e #105

Closed EDsteve closed 1 month ago

EDsteve commented 1 month ago

@OOHehir Everything still works with this: a8fe924db72a94445ee09ca81fb506e6a31ac048 But I am getting an error when building esp32dev-ei using this commit or later: 408ab7e0dafe505fb75ca2e66e42d059a20afa94

[Compiling .pio\build\esp32dev-ei\lib620\edge-impulse\EdgeImpulse.cpp.o
Archiving .pio\build\esp32dev-ei\lib48f\libaudio_input.a
Archiving .pio\build\esp32dev-ei\libb7a\libwav_file.a
Archiving .pio\build\esp32dev-ei\lib282\libspiffs.a
xtensa-esp32-elf-g++: error: CreateProcess: No such file or directory
Compiling .pio\build\esp32dev-ei\lib620\edge-impulse\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_abs_f16.c.o
*** [.pio\build\esp32dev-ei\lib620\edge-impulse\EdgeImpulse.cpp.o] Error 1
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
*** [.pio\build\esp32dev-ei\lib620\edge-impulse\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_abs_f16.c.o] Error 1
============================================== [FAILED] Took 94.05 seconds ==============================================

Environment    Status    Duration
-------------  --------  ------------
esp32dev-ei    FAILED    00:01:34.048](url)
OOHehir commented 1 month ago

@EDsteve It looks like your building master/ main? Have you changed the EI model?

I'm building the latest master "523b8de: Add terminal output when loading config from SPIFFS" & it builds OK as long as the following are set in sdkconfig:

# CONFIG_ESP32_DEFAULT_CPU_FREQ_80=y
# CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
CONFIG_ESP32_SPIRAM_SUPPORT=y

If you don't want the 240Mhz you can just comment out

#define AI_INCREASE_CPU_FREQ

in project_config.h & it should build ok for 80Mhz.

EDsteve commented 1 month ago

@OOHehir Hmm. Not sure what is going on. Can't get rid of this error. Yes. I am trying to build the master branch. I didn't change the model and using the one which is also on Github.

I have tried:

  1. Set the frequencies as you mentioned above in sdkconfig -> Same error
  2. Commenting out #define AI_INCREASE_CPU_FREQ -> Same error
  3. Completely uninstalled VScode / PlatformIO (also removed all necessary folders)
  4. Fresh install of VScode and PIO
  5. Cloned the project fresh from Github into a new folder -> Same error
  6. Moved .platformio folder as described here - Same error

Again. Building this commit works without issues. But the commit after that or the latest commit won't build any more. Maybe because of the changes made in platform.io? Still on the road so i can't try it on another PC. Will be back in Germany on 28.

Question: When you talk about changes in sdkconfig. Which of these sdkconfigs should i change? image

OOHehir commented 1 month ago

@EDsteve

All sdkconfig get 'build' from sdkconfig.defaults. So it's safe to delete everyone except sdkconfig.defaults

This could be a windows v linux issue, probably after a change in the pre build python script. Could you attach your build log? To avoid this script you could comment out this line. You may then get an error in some of the files the edge-impulse-sdk, normally about being uninitialized, but your probably familiar with how to fix this error.

EDsteve commented 1 month ago

@OOHehir You always find a way :) Commented out the line you suggested results in another build error as you have guessed. But that can easily be fixed.

Here the build log from before the fix(Its too long so it's not complete): Build log.txt

OOHehir commented 1 month ago

@EDsteve Glad you got it working.

Looks like Windows rejecting a build when the build command gets too long. Is it possible to move your platformIO installation directory so the path is shorter? If not I'll have to come up with another fix.

EDsteve commented 1 month ago

@OOHehir I have already tried that and moved the path to C:\.platformIO without success. Now i have shortened the path even further to C:\.p and it still results with the same error :( Huff. It seems this is becoming a bigger issue?

Changing the path was not straight forward. Adding PLATFORMIO_CORE_DIR=c:\.p in the platform.io didn't really work. I ended up using a Environment Variable as described here, which did the trick. So in the second last line you can see that it used the new path. Unfortunately with the same error.

Archiving .pio\build\esp32dev-ei\lib282\libspiffs.a
xtensa-esp32-elf-g++: error: CreateProcess: No such file or directory
Compiling .pio\build\esp32dev-ei\lib620\edge-impulse\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_abs_f16.c.o
Compiling .pio\build\esp32dev-ei\lib620\edge-impulse\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_abs_f32.c.o
*** [.pio\build\esp32dev-ei\lib620\edge-impulse\EdgeImpulse.cpp.o] Error 1
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
*** [.pio\build\esp32dev-ei\lib620\edge-impulse\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_abs_f16.c.o] Error 1
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
*** [.pio\build\esp32dev-ei\lib620\edge-impulse\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_abs_f32.c.o] Error 1
===================================================== [FAILED] Took 87.37 seconds =====================================================

Environment    Status    Duration
-------------  --------  ------------
esp32dev-ei    FAILED    00:01:27.373
================================================ 1 failed, 0 succeeded in 00:01:27.373 ================================================

 *  The terminal process "C:\.p\penv\Scripts\platformio.exe 'run', '--environment', 'esp32dev-ei'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 
OOHehir commented 1 month ago

@EDsteve I've disabled this script & instead applies a system wide build 'unflag'. Instead off allowing uninitialized variables in just the edge-impulse-sdk config, it now allows them for the entire build. Not ideal, but as an interim measure, it allows us to move forward while I can come up with a better fix.

Can you give the latest main/ master a try please?

EDsteve commented 1 month ago

@OOHehir Great. That worked and i can build without errors. At the airport now. So i just did a quick test. I don't really understand the side effects of this fix. But it seems you have it under control :)

OOHehir commented 1 month ago

@EDsteve OK, it slightly reduces the possibility of catching bugs during build, so just an interim measure.