** EDIT: SEE UPDATE BELOW**
Hi folks,
I’m attempting to use the new (unreleased) daisy bootloader_v6 to install a program to SRAM on my Patch by following this guide. The program loads and runs, but does not work once I unplug seed from my computer and reboot it.
I’ve done the following steps:
Setup:
- Checkout the “bootloader_v6” branch in libDaisy, and the latest master branch in DaisySP. Copy those folders into my project root directory (clone of daisy-projects).
- Run
rebuild_all.sh
from the root directory to build libDaisy and DaisySP. - hold the
boot
button on seed, press thereset
button, releaseboot
to put Daisy in DFU mode - Go to project directory.
make program-boot
to install the bootloader - Add
APP_TYPE = BOOT_SRAM
to my project makefile
Installing the binary
- Build the program:
make clean; make
- Plug a USB from my computer into seed’s USB port. This will power seed on.
- Press seed’s
boot
button immediately to extend the bootloader “grace period”. It will confirm by blinking the LED rapidly. - Write the program to seed:
make program-dfu
. Program appears to write successfully. Output shows that program resides in SRAM:
Memory region Used Size Region Size %age Used
FLASH: 0 GB 128 KB 0.00%
DTCMRAM: 16356 B 128 KB 12.48%
SRAM: 131020 B 480 KB 26.66%
RAM_D2_DMA: 16968 B 32 KB 51.78%
RAM_D2: 0 GB 256 KB 0.00%
RAM_D3: 0 GB 64 KB 0.00%
BACKUP_SRAM: 12 B 4 KB 0.29%
ITCMRAM: 0 GB 64 KB 0.00%
SDRAM: 645716 B 64 MB 0.96%
QSPIFLASH: 92 B 7936 KB 0.00%
arm-none-eabi-objcopy -O ihex build/Musubi.elf build/Musubi.hex
arm-none-eabi-objcopy -O binary -S build/Musubi.elf build/Musubi.bin
dfu-util -a 0 -s 0x90040000:leave -D build/Musubi.bin -d ,0483:df11
dfu-util 0.10
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Flash "
Downloading element to address = 0x90040000, size = 131020
Erase [=========================] 100% 131020 bytes
Erase done.
Download [=========================] 100% 131020 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
Observed behavior: The program runs as expected. However, once I disconnect the USB and reboot patch, the OLED screen is blank. The LED on seed repeatedly blinks in cycles of 2-3 slow blinks followed by 8-10 fast ones (the documentation says it would blink “SOS” if there were an error).
Any idea what the issue might be? It’s strange to me because the program successfully boots and runs immediately after it’s installed, but after I remove the USB connection and reboot, bootloader seems to not boot the program.
Thanks!