It blinks the LED
Assuming you are using Ubuntu or Debian Linux, you will need:
-
riscv-unknown-elf
cross compiler (see ../../README.md) -
udev rule allowing read and write permissions for your OrangeCrab 25F or 85F (see ../../README.md)
-
dfu-util
(you can install withsudo apt install dfu-util
)
-
Generate a riscv binary and create a dfu update image:
$ make blink_85F.dfu
-
Make sure the OrangeCrab 85F is in DFU mode by plugging in the USB cable while holding down the button. You can check for a DFU device with
lsusb
ordmseg
. You may need to add a udev rule to give theplugdev
group permissions for1209:5af0
if you have not already done so. You also need to havedfu-util
installed (e.g.sudo apt install dfu-util
). -
Load the new firmware into the
-d 1209:5af0 --alt 0
DFU device with$ make dfu_85F
- Generate a riscv binary and create a dfu update image.
$ make all
-
Enter the DFU bootloader by holding the button while connecting OrangeCrab to your USB port
-
You can validate that the OrangeCrab is in DFU mode using
dmesg
usb 1-1: new full-speed USB device number 63 using xhci_hcd
usb 1-1: New USB device found, idVendor=1209, idProduct=5bf0
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: OrangeCrab r0.2 DFU Bootloader v2.0.3-13-g84c820a
usb 1-1: Manufacturer: GsD
- Load the RISCV firmware we've just built using
$ make dfu