Platform.local.txt + other arduino code = exit status 1 - platform.local

Hi,

I was trying to run the static_buffer from the tutorial, https://docs.edgeimpulse.com/docs/running-your-impulse-arduino

At first I ran into the issue that is nicely explained at the bottom of above page:
"Code compiling fails under Windows OS

fork/exec C:\Users\MYUSER\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++.exe: The filename or extension is too long.

This error is usually thrown when the list of object files to compile exceeds Windows max number of characters (32k) in a command line. To overcome this issue, download the platform.local.txt file and copy it under your mbed directory, ie:
C:\Users\MYUSER\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.4
β€˜β€™
So I copied the platform.local in the correct folder. After this the static_buffer script worked!

But if I try to compile and upload an different example script to the board (Arduino Nano BLE 33 Sense) e.g. the standard β€œblink” example (or others), I get the following error:
"Arduino: 1.8.13 (Windows 10), Board: "Arduino Nano 33 BLE
File Not Found
exit status 1
Error compiling for board Arduino Nano 33 BLE.
"
I do NOT get this error when the platform.local is not present in the folder.

In summary I would like to not have to delete the platform.local.txt every time I try to upload a different script besides the examples of edge impulse. (and reinstall it again if I want to try scripts using my inferencing-library)

All the above is tested on a windows 10 system, with data generated myself according to every step in the " Continuous motion recognition" tutorial.

If more info is need, be sure to ask!

@aureleq has been working with this target on Windows, he might know how to resolve this!

Hi @Rick1

Try with this new platform.local.txt file.
I changed the following line to ignore errors if no libraries are included in the sketch:

recipe.hooks.linking.prelink.2.pattern=cmd /c "dir /b /s {build.path}\libraries\*.o >> {build.path}\obj_files_tmp.txt 2>nul & exit 0"

Aurelien

1 Like

Hi,

That did it!
I can now run code with and without libraries, whilst still utilizing platform.local.txt.

Thank you both for your quick response and help!

Rick

2 Likes