This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to flash Thingy 52 with custom firmware on osx

Hi,

I've just got my hands on this amazing little thing call Thingy 52. I have played around with the default app but now I'm struggling with flashing a custom firmware.

So far I manage to perform the following steps:

  • Downloaded Thingy 52 SDK 2.1.0
  • Followed the README to setup the SDK.
  • Successfully compiled project\pca20020_s132 with GCC.
  • Installed nrfutil.
  • Generated own public and private keys.
  • Manage to compile the bootloader (project/bootloader_secure)

Next step would be to flash the custom bootloader onto the Thingy 52. Unfortunately the documentation does not mention how this can be done only states that this needs to be done.

I consulted this blog post about secure DFU and there's a segment about Update softdevice and bootloader.

The drawback is that I'm using OSX and Keil and nRF Go is not available (to my knowledge) meaning that I'm stuck with the command line tools.(?)

So how can I flash a custom bootloader onto Thingy 52 and then create my own firmware DFU package to flash onto Thingy 52 using OSX?

Any help is highly appreciated!

Thanks

Parents
  • Hello Kristian,

    You need to install a bootloader to the Thingy first. It is not included in the Softdevice. You have created your own private and public key, right?

    I have not done this with the Thingy before, but I think it works quite similar to the regular bootloader examples.

    Please check this blog post written by Nordic on bootloaders.

    I assume that you have installed "nrfutil", since you have a private key (which you use to generate your package).

    What you need to do, as it says in the blog, is to exchange dfu_public_key.c with your own public key. The key that you use here should mach your private key (which is also explained in the blog post). After you have flashed the softdevice, flash the bootloader located in Thingy_SDK\project\bootloader_secure\pca20020\arm5_no_packs\secure_dfu_ble_s132_pca20020 (if you use Keil) after you have changed the public key, and compiled.

    After this, power cycle your Thingy:52, and it should blink green. Then you can find it with nRF Connect, and upload the DFU package that you generated with your private key.

    I actually tested it just now, and the thingy bootloader: bootloader_secure works just as the one referred to in the blog post.

    Best regards,

    Edvin

  • I've actually did all the steps you mentioned apart from the order. I flashed the bootloader first followed by the softdevice (as the docs said). Now when i flashed the softdevice first followed by the bootloader I get a flashing green light.

    Thanks!

Reply Children
No Data
Related