Photon 2 with PDM mic Argument list too long error

Hi,

I have exported an audio event detection project from Edge Impulse as a Particle library.

I have installed Microphone_PDM@0.0.2 library and followed all the VS steps.

When I try to Flash the board from Windows I'm getting this error:

/bin/bash: C:/Users/R/.particle/toolchains/gcc-arm/10.2.1/bin/arm-none-eabi-gcc-ar: Argument list too long
make[4]: *** [../build/module.mk:255: ../build/target/user/platform-32-m/MicTest/libuser.a] Error 126
make[3]: *** [../../../build/recurse.mk:12: user] Error 2
make[2]: *** [../build/recurse.mk:12: modules/tron/user-part] Error 2
make[1]: *** [C:\Users\R.particle\toolchains\buildscripts\1.15.0\Makefile:142: make-main] Error 2
make: *** [C:\Users\R.particle\toolchains\buildscripts\1.15.0\Makefile:119: flash-all] Error 2

  • The terminal process "C:\Users\R.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\R.particle\toolchains\buildscripts\1.15.0\Makefile' flash-all -s'" terminated with exit code: 2.
  • Press any key to close the terminal.

I have seen the error reported in July. Is there a fix? Thanks

I would start from the download on the Particle machine learning page, which removes the unnecessary files that are causing that error while compiling locally under Windows.

Then, if you want to train and substitute your own model, export the project from Edge Impulse but only replace the src/tflite-model directory, not the whole project.

Thanks for the answer. Replacing tflite-model caused many other errors.
I will try to setup VS Code in a Linux box.

Hi Rick, I have configured Ubuntu, installed VSCode, installed the Particle Workbench, installed the PDA mic library, installed the missing libarchive-zip-perl but still getting Arguments list too long:

make[4]: execvp: /bin/bash: Argument list too long
make[4]: *** [../build/target/user/platform-32-m/Photon_2_Keyword_keyword_spotting_inferencing/libuser.a] Error 127
make[3]: *** [user] Error 2
make[2]: *** [modules/tron/user-part] Error 2
make[1]: *** [make-main] Error 2
make: *** [flash-all] Error 2

  • The terminal process "/bin/bash '-c', 'make -f '/home/lubuntu/.particle/toolchains/buildscripts/1.15.0/Makefile' flash-all -s'" terminated with exit code: 2.
  • Press any key to close the terminal.

Oh, I didn't realize that you were using the Keyword_keyword_spotting_inferencing model. That explains why you got the errors just substituting the tflite-model.

I've never tested that model, but it does seem like it must include more files which exceed the limits for Linux bash, which I have never seen occur before.

We have a tool to trim out unnecessary files, but this is an unusual case because the tool relies on being able to build successfully once to generate the linker map. I've always been able to build under Linux in the past.