Skip to content

Sonata system v0.2

Compare
Choose a tag to compare
@marnovandermaas marnovandermaas released this 28 May 19:42
· 497 commits to main since this release

Release notes

This is a release that contains all the infrastructure of v0.1 with the addition of:

  • SPI blocks for Raspberry Pi HAT, Arduino Shield and mikroBUS Click.
  • Control for the RGB LEDs.
  • Documentation updates.
  • Nix environment and CI updates.
  • Fixes to simulator.

For more information on the system please refer to the documentation. It has full support to run CHERIoT RTOS and we have a software template repository where you can develop your own application running on top of the RTOS.

Temporary flow

This is a temporary flow that should help you get your board to life (LCD powers up and LEDs blink). We've had reports that interacting with the SONATA drive can cause problems in the main persistent flow. This temporary flow avoids interacting with that drive and just uses the RPI_RP2 drive instead. After you have tested this flow please try the main persistent flow and if that does not work, you can come back to this as a backup.

Here are the steps you should take:

  1. Unplug your Sonata board.
  2. Hold down SW9, labelled "RP2040 Boot".
  3. While holding button re-plug your Sonata board.
  4. A drive named RPI-RP2 should show up, copy the file named tmp_rpi_rp2_part1_v0.2.uf2 into this drive.
  5. After the drive dismounts automatically, it will remount as SONATA, please ignore this drive and its contents while using this temporary flow.
  6. Unplug your Sonata board.
  7. Hold down SW9, labelled "RP2040 Boot".
  8. While holding button re-plug your Sonata board.
  9. A drive named RPI-RP2 should show up, copy the file named tmp_rpi_rp2_part2_v0.2.uf2 into this drive.

Main persistent flow

You can download the generated bitstream below named sonata_bitstream_v0.2.bit. This generated bitstream contains a bootloader that will load a software image from flash.

Besides the bitstream, you'll also need a UF2 to program the RP2040, which is named rpi_rp2_v0.2.uf2. Future releases may be found in the sonata-rp2040 repository.

You will also need a UF2 of the software that you want to execute. You can create your own using our template repository. For testing I've also attached an example to this release named sonata_simple_demo_v0.2.uf2 to this release.

A quick start guide:

  1. Before plugging in your Sonata board, hold down the SW9 labelled "RP2040 Boot", and while holding this button plug your board into your laptop using the Main USB.
  2. A drive called RPI-RP2 should pop up on your computer and drag rpi_rp2_v0.2.uf2 into it.
  3. This drive should automatically dismount once the file is transferred and remount as SONATA. Once the remount has happened, you can drag in the bitstream sonata_bistream_v0.2.bit. You may have to unplug and replug the USB cable if the drive does not mount automatically.
  4. Once programming is successful, you should see the CHERI LED light up and the LEGACY LED turn off. If this is not the case, the bitstream loading may have failed and you should retry by unplugging and replugging the main USB on the Sonata board and redrag the bitstream into the SONATA drive.
  5. After programming the bitstream, drag the sonata_simple_demo_v0.2.uf2 into the SONATA drive.
  6. You should now see the user LEDs turn on and off, as well as the lowRISC logo appear on the LCD.

Non-persistent flow

If all of the above fails you can circumvent the RP2040 altogether by using JTAG:

openFPGALoader -c ft4232 sonata_bitstream_v0.2.bit
./util/mem_helper.sh load_program -e sonata_simple_demo_v0.2.elf

Do note that this flow is not persistent so you will need to reprogram both the bitstream and the firmware after each power cycle.