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

@aurel any suggestions for the Sony Spresense running Edge Impulse Arduino code on windows. I have tried my platform.local.txt Nano33BleSense file but getting a massive amount of errors.

Probably much more to it, but thought I would give you a heads up about what I am trying to do.

Other topic here Spresense Arduino IDE Camera Demo

I am getting the same compile errors when trying to load a sound impulse. I guess my next stsep would be to try running the sound impulse on Ubuntu. Any other suggestions?

Hi @Rocksetta,

Latest Arduino version - 1.8.15 - doesn’t require the platform.local.txt patch.
However our official port is using the Spresense SDK/NuttX to maximize embedded performances, I would suggest using the standalone application to start with: https://docs.edgeimpulse.com/docs/running-your-impulse-spresense
You don’t need any specific IDE, just arm gcc and make.

Aurelien

Thanks @Aurel, I will try that. Newby Question about using Make and GCC:


example-standalone-inferencing-spresense/
|_ edge_impulse/
|  |_ edge-impulse-sdk/
|  |_ model-parameters/
|  |_ tflite-model/
|  |_ README.md
|_ mkspk/
|_ spresense-exported-sdk/
|_ stdlib/
|_ tools/
|_ .gitignore
|_ Dockerfile
|_ LICENSE
|_ Makefile
|_ README.md
|_ ei_main.cpp
|_ main.cpp

Since main.cpp looks pre-made I assume ei_main.cpp is the example program you want to run and the supporting files are in the edge_impulse/ folder. Where would we put our own supporting header files?

By the way @aurel, have you ever used Gitpod.io? For this kind of special setup and working with others online it is amazing. I have my topic about it here:

Hi @Rocksetta,

Thats correct, main.cpp performs some board specific intialization and then call ei_main(). You can add your custom code in the ei_main.cpp file. The exported C++ library goes into the edge_impulse folder.

You can also play with the full firmware if you need to keep all data acquisition capabilities.

I’ve never used Gitpod but it looks interesting! I can see the benefits if you only have access to a tablet or such. Most of our GitHub repo also have a Dockerfile so using Docker to compile is super easy if you don’t want to bother with setting up the different toolchains.

Aurelien

Thanks @aurel, you have given me some ideas. I hadn’t seen the full Spresense github, that is interesting, also some Dockers load directly onto Gitpod.io so I will try that. I am always looking for the easiest build and the Arduino IDE might be the best solution, but good to look into these other platforms.

1 Like

@aurel: Super interesting, both these dockers loaded in Gitpod fine:

image:
   edgeimpulse/sanity-check-arduino

and

image: 
   pioka/spresensesdk-builder:latest

but

image:
   edgeimpulse/spresense-build:latest

did not, where are the Edge Impulse dockers stored? They don’t seem to be on docker-hub, whereas the first one was on docker-hub here .

@Rocksetta You’ll need to build them first, we don’t store these containers on Docker Hub in general.

1 Like

hmm, too bad.

If you ever put any of the local builds or in this case the full spresense build on docker-hub, please tell me. I would make a Gitpod that could load directly from the Edge Impulse Github, so that all users could be using the same setup. Great for online tutorials as everyone can follow with the same setup.

The only negative is getting the .bin or .elf file onto the board, but there are multiple ways to do that, the bigger issues is getting code to compile.

The EdgeImpulse docker hub is here