24 Commits (681b3b0d7a6b2fc5d0f8918c583c790c646a31f1)

Author SHA1 Message Date
Matheus C. França d57f19c886
Gd32v Support (#21)
* Logan nano - board added

* Changes:
- replace baseline_rv32 to sifive_e21(imac)
- update registers.zig
- parsepin added (WIP)
- more riscv_encoding added

* refactoring

* fix build

* Missing interrupts

* minimal interrupt

* remove vectorTable

* skip interrupt test - riscv32

* remove supports_uart_test flag

* remove `supports_interrupt_test`
2 years ago
Riccardo Binetti 5cf1a4612d
uart: allow selecting the tx/rx pins (#54)
Some microcontrollers allow routing multiple pins to the same UART peripheral.
This commit allows selecting specific pins on these platforms.
2 years ago
Riccardo Binetti b9cd24ae96
Improve STM32F407 Uart and introduce GPIO Alternate Function (#44) 2 years ago
Riccardo Binetti 8b04413e55
Add Uart to STM32F4Discovery and rework uart-sync example (#43)
* stm32f407: add Uart support

* lpc1768: add cpu_frequency in board and chip

Allow using them with microzig Uart, which ensures the clock is present

* lpc1768: fix UART2 and UART3 peripheral clock register

They are in the PCLKSEL1 register, not PCLKSEL0

* uart-sync: use native microzig Uart, target different boards/chips

The previous example was lpc1768 specific, this new example should work with all
board and chips which implement the microzig Uart functionality. Instead of 4
LEDs, the new example uses a single LED to provide minimal debugging
capabilities if something does not work correctly.
This allows building this example for the stm32 f3 and f4 discovery boards.
2 years ago
Riccardo Binetti 873e5995b6
Add initial support for the stm32f429idiscovery eval board (#38)
* Add stm32f429 registers

Generated using regz with:

./regz STM32F429.svd > registers.zig

Using this SVD:

871761af63/data/STMicro/STM32F429.svd

* Add initial support for the stm32f429idiscovery eval board

Blinky example working on the board
3 years ago
Riccardo Binetti 97733da9e2
Add initial support for the stm32f4discovery eval board (#35)
* Add stm32f407 registers

Generated using regz with:

./regz STM32F407.svd > registers.zig

Using this SVD:

871761af63/data/STMicro/STM32F407.svd

* Add initial support for the stm32f4discovery eval board

The blinky example is working on the board
3 years ago
Felix Queißner e639dc7983
panic exporting is no longer needed. (#30)
Co-authored-by: Felix "xq" Queißner <git@masterq32.de>
3 years ago
Matt Knight b2793e2589
Avr interrupt overloading (#29)
* mostly implemented, need different patch in order to wire it in

* add generated code

* turned interrupts back on

* fix symbol names for avr

* export in cpu file

* Emits a function instead of a `void` symbol.

* add interrupt test to avr

* Removes invalid comment.

Co-authored-by: Felix "xq" Queißner <git@masterq32.de>
3 years ago
Matt Knight 74e22672d0
use register code generated by regz (#23) 3 years ago
Matt Knight 13f0a1e347
instantiate vector table in start.zig (#22) 3 years ago
Matt Knight c34d8b73d5
interrupt generation for chips (#16) 3 years ago
Matt Knight 152db2ae5f
no need to make the interrupt the .Naked calling convention (#15) 3 years ago
Matt Knight 0124a14773
Add interrupt declaration to cortex-m microcontrollers (#14)
Co-authored-by: Vesim <vesim809@pm.me>
3 years ago
Marnix Klooster 1b5cc2ad1f
Support STM32F3DISCOVERY board (#11)
* Support disabling UART test configs

* `zig build [install]` also builds .bin files

* Support one blinking LD3 on STM32F3DISCOVERY board

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

* Nicer initial stack pointer: exactly after RAM

* Fix build error

(How was this code working earlier?!?)

* stm32f30x: Allow all 16 pins, all GPIOx registers

* STM32F3DISCOVERY: map all LED pins
3 years ago
Matt Knight 46a924234e
add stm32f103 registers and reorganize so that microzig can be used as a package (#9) 3 years ago
Matthew Knight af7aa777f9
Freshen things up (#6)
* catch up to some of master's changes, getting prepped to anchor to 0.9.0

* found fix for lpc board
3 years ago
Vesim eedc689738 Move lpc1768 to new generated SVD 3 years ago
Felix (xq) Queißner 196c4c4d05 mbed LPC1768 only commit. This introduces a working UART abstraction for LPC1768, currently the uart-sync example has chip-related code in it. 3 years ago
Felix (xq) Queißner 294cfebf7a Makes UART compile for LPC1768. 3 years ago
Felix (xq) Queißner deb9c3fe03 Designs the basic uart frontend. 3 years ago
Felix (xq) Queißner 284d19814d Implements blinky for AVR. 3 years ago
Felix (xq) Queißner 6cdf641f32 Continues blinky setup. 3 years ago
Felix (xq) Queißner e68a282981 Implements (untested) startup for AVR and LPC1768. 3 years ago
Felix (xq) Queißner bbfdb421d8 File structure, draft 1 3 years ago