Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Daisy Seed stm32H750 board - initial support #9974

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

snkYmkrct
Copy link

@snkYmkrct snkYmkrct commented Jan 17, 2025

What works so far:
CircuitPython code is running fully from the QSPI flash
A special bootloader is needed to start execution.
Board shows up as USB drive, and there is a small file system on the internal flash - can edit code.py
Can blink the on board LED and use the BOOT button in user space

Workflow:
The CircuitPython binary is flashed with the STM32CubeProgrammer on the external flash at address 0x90000000, using the custom made external loader for the IS25LP064A QSPI flash, found here
On the internal flash, at address 0x08000000, there is a custom bootloader (download here) that does the chip and QSPI initializations, and sets the external flash in memory mapped mode for code execution.

The source code for the bootloader and the external loader are in the main and external-loader-for-cube-programmer branches of this repo https://github.com/snkYmkrct/Snakey-Boot-for-Daisy

WIP:
Add the rest of the board pins in the definition file.
Add SDRAM support
Figure out if the external flash can be used by swapping between memory mapped mode and writeable mode, so the file system can be expanded.

@snkYmkrct snkYmkrct marked this pull request as ready for review January 17, 2025 22:59
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Is there a hope that your custom bootloader might be taken back by Electrosmith, or you might collaborate with them about this? Do they have something similar?

ports/stm/packages/UFBGA176.c Outdated Show resolved Hide resolved
ports/stm/peripherals/stm32h7/stm32h750xx/clocks.h Outdated Show resolved Hide resolved
ports/stm/peripherals/stm32h7/stm32h750xx/gpio.c Outdated Show resolved Hide resolved
ports/stm/peripherals/stm32h7/stm32h750xx/periph.c Outdated Show resolved Hide resolved
ports/stm/peripherals/stm32h7/stm32h750xx/periph.h Outdated Show resolved Hide resolved
ports/stm/peripherals/stm32h7/stm32h750xx/pins.c Outdated Show resolved Hide resolved
ports/stm/peripherals/stm32h7/stm32h750xx/pins.h Outdated Show resolved Hide resolved
@snkYmkrct
Copy link
Author

snkYmkrct commented Jan 21, 2025

Thank you for the review!
I will make the required changes -- it seems I'm left with some old style files from when I started work on this.

I am not collaborating with Electrosmith, I just tackled this project as a personal challenge, after seeing a lot of people ask for CircuitPython / micropython support for the Daisy Seed board.

Electrosmith do have their own bootloader, but it is still closed source, and they seem very reluctant to share the code or any details about it. I am not sure if it could be used instead of my bootloader, since I did not test it.

My bootloader is simple, it just does minimal chip startup, initializes the QSPI flash, and jumps to running the code from there.
I created it from scratch, both for better understanding of how everything works, and to have a configuration file for the IS25LP064 flash chip ready to integrate into CircuitPython, if necessary.

Ideally, I would like to add support for the UF2 bootloader in future updates.

@snkYmkrct snkYmkrct requested a review from dhalbert January 22, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants