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 : 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 and I understand I have to use the scripts of the ./tools folder but their purpose are not clear to me.
    I launched the file with the following option :

    tools/ -S /home/ahoudeau/spresense/ -H Windows

    Then it goes through different steps until Export to Arduino line where it stops because of lack the “” 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.
    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 '': No such file or directory
    unzip:  cannot find or open, or
    rm: impossible de supprimer '': 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/ 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/ ligne 85: zip : commande introuvable
    mv: impossible d'évaluer '': No such file or directory
    SDK exported to /home/ahoudeau/spresense/
    Please input a ZIP file as SDK package

    Can you please explain me how does the works and what does it take as input and what it is supposed to output ?

  • DeveloperWorld

    Hello @ahoudeau ,

    The script prepares an Arduino15 folder that you can use to manually install Spresense Arduino Library. You can find more about manual installation here:

    The comes from the folder in which the Spresense SDK is located.

    If your Spresense SDK is here /home/ahoudeau/spresense then the zip file can be found here: /home/ahoudeau/spresense/ or /home/ahoudeau/spresense/sdk/

    The is an exported Spresense SDK that is created after running the command make export in spresense/sdk.

    1. Check if the exists in your Spresense SDK.

    2. Try running the command make export and see if it will export the Spresense SDK successfully.

    Try these 2 steps and write what you got. What OS are you using?


  • Hello,
    I am using Windows10 and I use the bash terminal of VScode for the commands. I checked the presence of and tried to run make export in spresense/sdk but 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 '': No such file or directory


  • DeveloperWorld

    Hello @ahoudeau

    I found a solution. The problem was that there is no zip command in the default installation of MSYS2. You must install an additional package.

    To do this run this command from MSYS2:

    $ pacman -S zip

    After installing this package you should no longer have a problem with the script.


  • Hello
    Thank you ! it eventually worked fine after the pacman -S zip command. 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 generated Arduino15/package/SPRESENSE/tools to build code examples I have errors.
    My original issue was the line 84 of audio_recorder_sink.cpp and rebuild the Arduino library. Is it possible to rebuild the 1.4.2 version with the modified audio_recorder_sink.cpp ?

  • DeveloperWorld

    Hello @ahoudeau

    The source code that was used by the script 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 Arduino15 folder.

    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:

    1. In the Arduino IDE go to Tools-> Board-> Board Manager... and remove Spresense.

    2. Go to %userprofile%\AppData\Local\Arduino15 and remove packages and package_spresense_index.json and other files that have spresense in their name.

    3. Copy packages and package_spresense_index.json from spresense-arduino-compatible/Arduino15 to %userprofile%\AppData\Local\Arduino15

    4. In the Arduino IDE go to Tools-> Board and select Spresense.

    Do you use automatic updates in the Arduino IDE?


Log in to reply