Sony's Developer World forum

    • Home
    • Forum guidelines

    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

    Spresense
    3
    7
    7045
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • slipperyseal
      slipperyseal last edited by slipperyseal

      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.

      Slippery Seal
      Software, Robotics, Embedded, Enterprise, Cloud, Tacos

      1 Reply Last reply Reply Quote
      • TE-KarlKomierowski
        TE-KarlKomierowski DeveloperWorld last edited by

        @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.py

        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.

        Br
        Karl

        1 Reply Last reply Reply Quote
        • slipperyseal
          slipperyseal last edited by

          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

          Slippery Seal
          Software, Robotics, Embedded, Enterprise, Cloud, Tacos

          TE-KarlKomierowski 1 Reply Last reply Reply Quote
          • TE-KarlKomierowski
            TE-KarlKomierowski DeveloperWorld @slipperyseal last edited by

            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

            1 Reply Last reply Reply Quote
            • slipperyseal
              slipperyseal last edited by slipperyseal

              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.

              Slippery Seal
              Software, Robotics, Embedded, Enterprise, Cloud, Tacos

              1 Reply Last reply Reply Quote
              • A
                allenbjr last edited by

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

                I will try this hack. Thanks for sharing.

                1 Reply Last reply Reply Quote
                • slipperyseal
                  slipperyseal last edited by

                  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

                  Slippery Seal
                  Software, Robotics, Embedded, Enterprise, Cloud, Tacos

                  1 Reply Last reply Reply Quote
                  • First post
                    Last post
                  Developer World
                  Copyright © 2021 Sony Group Corporation. All rights reserved.
                  • Contact us
                  • Legal