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

Support STM32F3DISCOVERY board #11

Merged
merged 7 commits into from
Jan 27, 2022

Conversation

marnix
Copy link
Contributor

@marnix marnix commented Jan 13, 2022

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. :-)

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.)
@marnix marnix marked this pull request as draft January 13, 2022 11:13
@marnix
Copy link
Contributor Author

marnix commented Jan 17, 2022

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!

@marnix marnix marked this pull request as ready for review January 17, 2022 19:45
@marnix
Copy link
Contributor Author

marnix commented Jan 27, 2022

@vesim987 @mattnite @MasterQ32 Will someone merge this? Or is there something I have to do first? Thanks!

@ikskuh ikskuh merged commit 1b5cc2a into ZigEmbeddedGroup:master Jan 27, 2022
@marnix marnix deleted the support-stm32f3discovery branch January 27, 2022 20:19
@marnix
Copy link
Contributor Author

marnix commented Jan 27, 2022

Thanks @MasterQ32 !

ikskuh pushed a commit that referenced this pull request Feb 16, 2024
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
ikskuh pushed a commit that referenced this pull request Feb 16, 2024
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
ikskuh pushed a commit that referenced this pull request Feb 16, 2024
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
ikskuh pushed a commit that referenced this pull request Feb 16, 2024
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
ikskuh pushed a commit that referenced this pull request Feb 16, 2024
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
ikskuh pushed a commit that referenced this pull request Feb 16, 2024
Co-authored-by: mattnite <mattnite@users.noreply.github.com>
mattnite added a commit that referenced this pull request Mar 1, 2024
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