Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Questions about spresense-aruino-compatible
-
Hello
I am trying to use the spresense as an audio recorder ant I am faing the same error message than detailed in this topic : https://forum.developer.sony.com/topic/98/recorder_wav-multiple-recordings. The error message is Attention: module[4][0] attention id[1]/code[6] (objects/media_recorder/audio_recorder_sink.cpp L84).I tried the solution detailed in the last message of this previous topic which is to build Spresense Arduino package again. However I am a bit lost. I downloaded the content of https://github.com/sonydevworld/spresense-arduino-compatible and I understand I have to use the scripts of the ./tools folder but their purpose are not clear to me.
I launched the prepare_arduino.sh file with the following option :tools/prepare_arduino.sh -S /home/ahoudeau/spresense/ -H WindowsThen it goes through different steps until Export to Arduino line where it stops because of lack the “sdk-export.zip” file but I have no idea of where the zip file could come from.
Install gcc-arm-none-eabi... Install SDK from Spresense build... Export SDK from build. SDK_VERSION=1.0.0 VARIANT_NAME=spresense Clean SDK objects... Configure SDK components... Kernel : release SDK : board/spresense device/adc device/camera device/charger device/pwm device/sdcard feature/asmp feature/audio_player feature/audio_recorder feature/audio_recognizer feature/dnnrt feature/gnss feature/imageproc feature/ststep_counter -- +DNN_RT_MP -NSH_BUILTIN_APPS Build kernel... Export to Arduino... cp: impossible d'évaluer 'sdk-export.zip': No such file or directory unzip: cannot find or open sdk-export.zip, sdk-export.zip.zip or sdk-export.zip.ZIP. rm: impossible de supprimer 'sdk-export.zip': No such file or directory mv: impossible d'évaluer '/tmp/tmp.tPAcwT86QD/sdk-export/nuttx': No such file or directory /home/ahoudeau/spresense/sdk/tools/sdk_export.sh: ligne 63 : cd: /tmp/tmp.tPAcwT86QD/sdk/1.0.0/spresense/release: No such file or directory mv: impossible d'évaluer '/tmp/tmp.tPAcwT86QD/sdk-export/sdk/modules/include/': No such file or directory mv: impossible d'évaluer '/tmp/tmp.tPAcwT86QD/sdk-export/sdk/bsp/include/sdk': No such file or directory mv: impossible d'évaluer '/tmp/tmp.tPAcwT86QD/sdk-export/sdk/libs/': No such file or directory mv: impossible d'évaluer './libs/libsdk.a': No such file or directory cp: impossible d'évaluer 'build': No such file or directory /home/ahoudeau/spresense/sdk/tools/sdk_export.sh: ligne 85: zip : commande introuvable mv: impossible d'évaluer 'sdk-export.zip': No such file or directory SDK exported to /home/ahoudeau/spresense/sdk-export.zip Please input a ZIP file as SDK packageCan you please explain me how does the prepare_arduino.sh works and what does it take as input and what it is supposed to output ?
Thanks,
BR -
Hello @ahoudeau ,
The script
prepare_arduino.shprepares anArduino15folder that you can use to manually install Spresense Arduino Library. You can find more about manual installation here: https://developer.sony.com/develop/spresense/docs/arduino_set_up_en.html#_manual_installationThe
sdk-export.zipcomes from the folder in which the Spresense SDK is located.If your Spresense SDK is here
/home/ahoudeau/spresensethen the zip file can be found here:/home/ahoudeau/spresense/sdk-export.zipor/home/ahoudeau/spresense/sdk/sdk-export.zipThe
sdk-export.zipis an exported Spresense SDK that is created after running the commandmake exportinspresense/sdk.-
Check if the
sdk-export.zipexists in your Spresense SDK. -
Try running the command
make exportand see if it will export the Spresense SDK successfully.
Try these 2 steps and write what you got. What OS are you using?
BR
-
-
Hello,
I am using Windows10 and I use the bash terminal of VScode for the commands. I checked the presence ofsdk-export.zipand tried to runmake exportinspresense/sdkbut I end with the same error.
Here is the end of the terminal output :SPK: nuttx.spk make[1] : on entre dans le répertoire « /home/ahoudeau/spresense/nuttx/tools » make[1] : on quitte le répertoire « /home/ahoudeau/spresense/nuttx/tools » Merging archive: libsched Merging archive: libdrivers Merging archive: libconfigs Merging archive: libc Merging archive: libmm Merging archive: libarch Merging archive: libcxx Merging archive: libnet Merging archive: libfs Merging archive: libbinfmt Merging archive: libgraphics Merging archive: libnx Merging archive: libcxx Merging archive: libbsp Merging archive: libextdrivers Merging archive: libsdkaudio Merging archive: libsystem Merging archive: libexamples Merging archive: libboard cp: impossible d'évaluer 'sdk-export.zip': No such file or directoryBR
-
Hello @ahoudeau
I found a solution. The problem was that there is no
zipcommand in the default installation ofMSYS2. You must install an additional package.To do this run this command from
MSYS2:$ pacman -S zipAfter installing this package you should no longer have a problem with the
prepare_arduino.shscript.BR
-
Hello
Thank you ! it eventually worked fine after thepacman -S zipcommand. However the generated files seem to be for version 1.0.0 while the version I get through Arduino IDE is 1.4.2. So if I try to use the generatedArduino15/package/SPRESENSE/toolsto build code examples I have errors.
My original issue was the line 84 ofaudio_recorder_sink.cppand rebuild the Arduino library. Is it possible to rebuild the 1.4.2 version with the modifiedaudio_recorder_sink.cpp?
BR -
Hello @ahoudeau
The source code that was used by the
prepare_arduino.shscript is version 1.4.2. You can check the git log and see the tag.Version 1.0.0 here does not apply to the Spresense Arduino Library version but only to the version of your custom Arduino15.
You can change this to 1.4.2. Change all occurrences of 1.0.0 to 1.4.2 in the
Arduino15folder.It will not change anything in the source code. Everything will be the same. Only the Arduino IDE will see that this is a different package.
You shouldn't have any problems. Maybe try:
-
In the Arduino IDE go to Tools-> Board-> Board Manager... and remove Spresense.
-
Go to
%userprofile%\AppData\Local\Arduino15and removepackagesandpackage_spresense_index.jsonand other files that have spresense in their name. -
Copy
packagesandpackage_spresense_index.jsonfromspresense-arduino-compatible/Arduino15to%userprofile%\AppData\Local\Arduino15 -
In the Arduino IDE go to Tools-> Board and select Spresense.
Do you use automatic updates in the Arduino IDE?
BR
-