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.
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.
-
@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:
https://github.com/sonydevworld/spresense-arduino-compatible/blob/master/Arduino15/packages/SPRESENSE/tools/spresense-tools/1.0.0/flash_writer/scripts/flash_writer.pyBut 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.
Br
Karl -
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 flash_writer.py.
Hoorah.
Christian
-
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.
BR
Karl -
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. xmodem.py will also be required. eula.py 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 flash_writer.py and commented out the few lines where is was referenced.
xmodem.py and the modified flash_writer.py can be placed in spresense/sdk/tools/linux/
from there i renamed (or delete) the flash_writer intel binary and rename flash_writer.py 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