BOOT_FLASH attached to a pin?

@Takumi_Ogata ,
Is there any ETA on when this may come out?

Thanks,
Brett

Hi Brett,

I’m not sure the ETA for the new Daisy Bootloader.
You can edit in that question to here: Need help: "Failed to launch GDB: Load failed" -- when the load succussed - #6 by BHAudio

For anyone looking at this thread in 2023, libDaisy now implements a function System::ResetToBootloader(). Calling it from your program will put the Seed in DFU mode, even if the program lives in Flash and you’re not actually using the libDaisy bootloader. Great way to prototype firmware on Seeds that live in enclosures where the USB port is accessible but the boot / reset buttons are out of the way…

3 Likes

@Takumi_Ogata @alo.bu
Is there a full article somewhere on the new updates?

Hi Brett,

V6 may not be officially released yet.

Apologies in advance for the necro-post.

Does anyone have a working example of this? daisy::System::ResetToBootloader(); definitely halts the Seed and perhaps resets it, but it doesn’t seem to put the Seed in DFU mode for me.

Works for me. This code blinks for about 10 seconds, then enters the builtin STM bootloader:

#include "daisy_seed.h"

// Use the daisy namespace to prevent having to type
// daisy:: before all libdaisy functions
using namespace daisy;

// Declare a DaisySeed object called hardware
DaisySeed hardware;

int main(void)
{
    // Declare a variable to store the state we want to set for the LED.
    bool led_state;
    led_state = true;
    int count = 0;

    // Configure and Initialize the Daisy Seed
    // These are separate to allow reconfiguration of any of the internal
    // components before initialization.
    hardware.Configure();
    hardware.Init();

    // Loop forever
    for(;;)
    {
        // Set the onboard LED
        hardware.SetLed(led_state);

        // Toggle the LED state for the next time around.
        led_state = !led_state;

        // Wait 500ms
        System::Delay(500);
        if (++count > 20)
            System::ResetToBootloader();
    }
}
1 Like

Bah. Procedural programmer brain strikes again. I was trying to trigger it after a footswitch is held down for one second, but was miscalculating the timer increment across the AudioCallback() and a System::Delay() call in int main(). It’s not even worth posting the errant code. Basically, my brain was vapor locked :face_with_peeking_eye: