-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support STM32F3DISCOVERY board #11
Support STM32F3DISCOVERY board #11
Conversation
These changes were mostly copied from the stm32f103 already there. But this is far from complete, many shortcuts were taken: - Most importantly, only a single LED on the board, and its port/pin, is supported, viz. the 'north' LD3 on bit 9 of GPIOE. - Setting RCC_AHBENR bit IOPEEN ("I/O port E clock enable") is done at the same as setting the mode (input or output) on one of its pins. No idea if that is the right place to do this. - In cortex-m4.zig, using 'max ram' as the initial stack pointer. The rest is completely copied from cortex-m3.zig. - UART test is disabled. (It seems to assume mbed-lpc1768 pin numbers.)
(How was this code working earlier?!?)
For now I don't know how to deal with the duplication between existing CPU file cortex-m3.zig and new cortex-m4.zig: the only difference is the top-of-stack (which actually seems to be part of the chip definition, not the CPU definition), and I don't see how to abstract that out currently. Apart from that, this PR seems pretty complete to me. Removing draft status; let me know if anything else is required. Thanks! |
Thanks @MasterQ32 ! |
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
So this is my first humble success in the microzig world: a red blinking led on STM32F3DISCOVERY.
Completely incomplete, of course, but it is something. :-)