mkspk and flash_writer for ARM

  • I understand Ubuntu is the officially supported platform for the nuttx based sdk, but I do a lot of linux and embedded development on a Raspberry Pi (my laptop is a Mac). I was able to successfully install the sdk, but upon trying to program the spresense found that mkspk and flash_writer executables are x86 binaries, not ARM.

    I couldn't find the source for these on github. I was just hoping that I could find arm versions of these files.

  • DeveloperWorld

    @slipperyseal said in mkspk and flash_writer for ARM:

    I couldn't find the source for these on github. I was just hoping that I could find arm versions of these files.

    Hi @slipperyseal ,

    This question has come up before, people asking for source.

    The flash_writer source can actually be found here:

    But the mkspk will only be provided as a x86 binary for for now but in the future a version for the Raspberry Pi might be available too.


  • Thanks Karl,

    I can now run builds happily on a google cloud VM to generate the SPK. then flash my spresense from the raspberry pi using

    Hoorah. 🙂


  • DeveloperWorld

    Well done @slipperyseal !

    If you could create a hackster project and share your solution with the rest of the world I think many people would appreciate that since this question has been asked many times.

  • I'll summarise here quickly. There are two custom binaries included with the spresense nuttx sdk. mkspk, which creates the SPK files and flash_writer which xmodems the binary up to the device. These wont execute on a raspberry pi.

    As mkspk source is not available, i had to install the sdk on an Intel based machine (or cloud VM). Building of the SPK happens there. Then i use scp to transfer the NUTTX.SPK file to my raspberry pi (3).

    The sdk seems to work fine on a pi until it gets to the mkspk or flashing stages.

    To flash the spk, I took the python source mentioned in this thread. In the same directory of github are xmodem and eula python files. will also be required. seemed to have some other dependencies which didnt resolve. but i found eula isnt required for the flashing only stage, so i removed the import of eula from and commented out the few lines where is was referenced. and the modified can be placed in spresense/sdk/tools/linux/

    from there i renamed (or delete) the flash_writer intel binary and rename to flash_writer so references to it will resolve. also chmod +x the two files to ensure they are executable.

    while the VM builds a lot faster than the pi, the pi still seems to be a valid development environment. sony seem to have put a huge amount of work into the spresense development tools, so if ARM / pi is going to be as common a request as we are told, adding ARM versions of these binaries is going to benefit a lot of people and make spresense even more accessible.

  • Excellent. I vote for source code for dependencies or Raspberry Pi for now.

    I will try this hack. Thanks for sharing.

  • I'v just attempted to re-install the SDK on my Raspberry Pi (for the sole purpose the running the flasher - full builds still require an Intel system) but it seems it now fails at install-tools stage. which is a shame. 😞

    shasum: openocd-0.10.0-spr1-20191113-linux32.tar.bz2.sha: no properly formatted SHA checksum lines found

Log in to reply