39 Commits (724f4659b0f99cbff3eb874bd23e02c29df523c5)

Author SHA1 Message Date
Ardelean Călin f286bc8e25
Corrected Cortex-M ABI (#149) 1 year ago
Vesim d361a622ba
add umm allocator (#148) 1 year ago
Felix Queißner 3bdb7381be
Microzig Generation 2 Build Interface (#144)
* Starts to rework build framework.
* Fully reworks build API, builds with RP2040 again.
* Adds docs and doc generation.
* Renames source to register_definitions, makes Target.configure optional.
* Adds issue tracking links.
* Drops CI for now

---------

Co-authored-by: Felix "xq" Queißner <git@random-projects.net>
1 year ago
Francisco Llobet 2859530ac2
Fixing issues in Build to achieve v0.11.0 compatibility (#140) 1 year ago
Matt Knight c1ac2f4cf3
FileSource -> LazyPath (#136) 1 year ago
Nicolas Goy 9588941915
When adding an option, set it as app module dependency to make it available in the app root (#129) 1 year ago
David Sugar dd491cc84f
Abstract USB device implementation (#124) 1 year ago
Matt Knight ae6e619197
update to new usage of build api (#122) 1 year ago
Matt Knight dabc9325cd
improvements from working on RP2040 (#115)
* improvements from working on RP2040

* fix missing file bug
2 years ago
Matt Knight b6fc3abbf7
Mimic new stdlib build API (#111)
* start on new docs to match api

* tweak the MicroZig dependency tree

* use microzig_options

* remove empty.zig

* add test programs

* keep it to one arch, bump flash for debug
2 years ago
Matt Knight 11214ed8ba
new for loop syntax and remove import-module.zig (#110)
* new for loop syntax and recursive dependencies allowed for removal of import-module.zig

* fix chip standard path

* move to build.zig

* update template too
2 years ago
Matt Knight 97ca5497da
Regz rewrite (#103)
* wip

* remove tools

* reorganized

* move hardware into their own repos

* snake_case

* use FileSource for board/chip/cpu descriptors

* are_globally_enabled -> globally_enabled

* rearrange
2 years ago
Vesim 9ccde9ff37
Update to latest zig with modules (#102) 2 years ago
Philipp Wendel e63558330b
Catchup to changes introduced by ziglang/zig#14498 (#101) 2 years ago
Matt Knight 4f0d25220e
catchup to self hosted (#96) 2 years ago
Philipp Wendel 696c32ff0d
add arduino uno board (#89)
* Updated fn to return optional instead of error
* Added Arduino Uno Board
* Updated comments
2 years ago
Matt Knight 0936dfb05c
improve build api (#70) 2 years ago
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 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
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
Felix Queißner 1c1730445c
Brings AVR up to date (blink builds and blinks again! (#27)
* Brings AVR up to date (blink builds and blinks again!

* Fixes vector tables and build.

Co-authored-by: Felix "xq" Queißner <git@masterq32.de>
3 years ago
Marnix Klooster 92a2922742
stm32f3discovery/stm32f303 Initial UART1 support, including @panic() (#20)
* build.zig: Trivial rename around UART test

* mmio: Add writeRaw() to set a full register

* UART: Add TODO for auto baud rate detection

* STM32F30x Initial USART1 output/transmit support

All code assumes default chip clock configuration.
Code assumes STM32F303xB / STM32F3030xC.
Code supports only 8 data bits, 1 stop bit.

* stm32f3discovery @panic() to UART1

This is done by implementing `debugWrite()` for the board,
which only initializes UART1 if that was not yet done,
and flushes afterwards to make sure the host receives all.

* stm32f303: Support UART1 reader

This is done by implementing `rx()` and `canRead()`.

* stm32f303 UART1 correctly support 7 and 8 bits

This includes correctly masking the parity bit
on reads.

* stm32f3 UART1 support 0.5/1.5/2 stop bits

* stm32f303 UART1 simplify parity code

* Make work with regz-generated registers.zig change

* After #23 repair Reset on stm32, lpc1768
3 years ago
Matt Knight 0124a14773
Add interrupt declaration to cortex-m microcontrollers (#14)
Co-authored-by: Vesim <vesim809@pm.me>
3 years ago
Matt Knight 23eb8d5658
add packages to your embedded app (#13) 3 years ago
Matt Knight 38110fb3bd
calculate end-of-stack value from chip configs (#12) 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
Matt Knight 5a1e72f380
Create LinkerscriptStep (#7)
* create linkerscript step

* catch up to master, do some cleanup

* remove references to micro_linker

* commas

* remove package

* use root path trick for cpus and chips

* remove duped file
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 f5bc3be1ae Introduces the first SVD generated binding for LPC1768. svd2zig contains a hack for missing register sizes. 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