I flashed the bootloader successfully and even found a trick (did not find in manual) of press and release reset button and then press and release boot button to keep the LED pulsing (instead of switching from pulsing to flashing) which I understand to mean it is ready to accept a DFU connection. I use the build_and_program_dfu task, the program builds to DTCMRAM and none to flash - good, but when it comes to programming I get
Cannot open DFU device 0483:df11
No DFU capable USB device available
Now of course there was a DFU device just a second ago to be able to flash the bootloader, so the connection should be sound. What am I missing here?
You can find information about the Daisy Bootloader in this documentation here (Daisy Bootloader - Daisy) including detail about extending the grace period indefinitely by pressing the BOOT button.
During the grace period (and with Daisy connected to your computer via USB), you can run make program-dfu.
@Takumi_Ogata Well that’s whats inexplicable to me, I run that command with the extended grace period “breathing” and still get not DFU device. If I remove the bootloader and try to flash normally with make program-dfu it works fine. Then load the bootloader and get to the grace period and no DFU again
Also, side-question, the guide says that if there is a .bin on a connected SD card it will flash the program to QSPI, does that mean it won’t be to SRAM? Does the APP_TYPE have to be changed to QSPI?
Another tidbid that may or may not be useful: when flashing to flash with dfu I see device DFU in FS Mode under my bus devices in Windows 11 and I have the option of ejecting a device of the same name in my taskbar. It shows up under a new and separate “Universal Serial Bus controllers” header. And flashing is possible. But when the bootloader is present I see STM Device in DFU Mode and have the option to Eject Daisy Bootloader in my taskbar. It shows up under the usual “Universal Serial Bus controllers” header (with things like Generic USB Hub etc). All this says to me is that my computer understands this DFU device is there but VS code/terminal does not when I run make program-dfu. But maybe this can tell you something else.
Ok I solved the issue. I did not realize I must reinstall the WinUSB driver after flashing the bootloader. I can now flash the program via dfu with the bootloader. However, my program is not working as it did when I was installing to flash. I get result 3 from a log which prints the result of the following function:
int MountSD(){
SdmmcHandler::Config sd_cfg;
sd_cfg.Defaults();
if (sdcard.Init(sd_cfg) != SdmmcHandler::Result::OK)
{
return 1;
}
if (fsi.Init(FatFSInterface::Config::MEDIA_SD) != FatFSInterface::Result::OK)
{
return 2;
}
if (f_mount(&fsi.GetSDFileSystem(), "/", 1) != FR_OK)
{
return 3;
}
return 0;
}
It seems the SD card no longer mounts. Why might this be just because I’m now using the bootloader? Only problem I can think of is that I’m using SDRAM but I did not see anything about that being a problem with the bootloader.