494 Commits (f42d279890811cd997e592f67da515107d597a4d)
 

Author SHA1 Message Date
Matt Knight 42c7a62a3f
Initial commit 2 years ago
Matt Knight 470cd86348
add microzig submodule and buildkite pipeline file (#1) 2 years ago
Matt Knight 4eba908bd2
migrate code from microzig repo (#1)
* migrate code from microzig repo

* move robot file

* add microzig submodule

* add chips to build

* add buildkite pipeline

* try listing boards

* change board names

* revert pipeline
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
Matt Knight d8e329d90b restructure for regz rewrite 2 years ago
Matt Knight e3562492df
update to master (#19) 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
Marnix Klooster e1c1466d9e
Initial partial SPI support (#97)
* 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

* stm32f303 I2C rough initial code

Allows only writing and reading single bytes.

* stm32f3 i2c: enable debug 'logging'

* Add a few comments

* I2C API changes, STM32F303 I2C multi-byte transfers

Now using controller/device terminology, instead of master/slave.

Now using 'transfer objects' to make STOPs and re-STARTs explicit,
and allow using Writer and Reader APIs.

Added 'register' abstraction.

STM32F303 I2C now supports this new API, and multi-byte transfers.

Now waiting for I2C_ISR.BUSY == 0, after setting I2C_CR2.STOP == 1.
Without this, the sequence write-stop-write caused an additional STOP
to be sent immediately the START and address of the second write.

* Make work with regz-generated registers.zig change

* Updated to match regz-generated update

* After #23 repair Reset on stm32, lpc1768

* Clean-up I2C `readRegisters()`.

* Refactor to separate read/write states

* On STM32F303, make second read call fail

Also doc comments to clarify the new API.

* STM32 I2C: Properly support multiple write calls

* I2C STM32: Fix release mode compile error

...on top of an earlier commit on this branch.

* I2C Add 'write register' shorthand functions

* Make sure vector_table is correctly exported

It needs to be a non-`comptime` `var` for `@export` to work properly.

The only 'documentation' for this behavior currently seems GitHub comment
https://github.com/ziglang/zig/issues/5157#issuecomment-618933196 .

This issue was introduced in 1c17304 for PR #27,
which broke at least ARM-based STM32F303.

* fix missing vector table on ARM

* Revert "Merge branch 'fix-vector_table-export' into marnix-master"

This reverts commit 8ea0a74e1031cd0b88abe0283f179f0cf20f450c, reversing
changes made to 355a3618080d28c5da6e044773e6449989355fe5.

* Temp commit for SPI

* Check new I2C target_speed config setting

* Corrected incorrect doc comment

* Initial SPI transfer support for STM32F303

* SPI device CS pin is now used

* Revert accidentally committed debug flag.

* SPI: Add shorthands for 'register-based' devices.

* Additional fix to remove PE3 pin dependency

* SPI: Renames, comments, extracted device-specific code

Specifically,
top-level `Spi` is now `SpiBus`;
and the internal API has an additional `switchToDevice()`,
and receives `DeviceConfig` in more places.

* SPI device: Add `transceive()` method.

---------

Co-authored-by: Matt Knight <mattnite@protonmail.com>
2 years ago
Aidan Oldershaw 1c3e04baa1
Use `root.std_options` to override log behaviour (#99)
ziglang/zig#14181 changed the interface for overriding the log function.
Previously, you would define a public `root.log` function. Now, you
define a `root.std_options` namespace that has a `logFn` decl.

Signed-off-by: Aidan Oldershaw <aidan.oldershaw@gmail.com>
2 years ago
Felix Queißner db78794f01
Adds social media preview. (#98)
Co-authored-by: Felix "xq" Queißner <xq@random-projects.net>
2 years ago
Matt Knight 0713809eaf
catch up to master (#17) 2 years ago
Matt Knight 4f0d25220e
catchup to self hosted (#96) 2 years ago
Connor Rigby 680b6282f3
stdlib: allow app to override the zig os layer (#93) 2 years ago
Matt Knight 72a5680af8
Initial commit 2 years ago
Felix Queißner 31070c1530
Makes executable files never stripped, we want that sweet debug info. Makes empty.zig less empty, so the compiler finds the file. (#91)
Co-authored-by: Felix "xq" Queißner <xq@random-projects.net>
2 years ago
Felix Queißner 248388d6e8
Update README.adoc (#90) 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
hollmmax c5f68cae63
add stm3240g-eval board (#84) 2 years ago
Felix "xq" Queißner e84264e64b Blinky! \o/ 2 years ago
Matt Knight 33984fa960 one readme 2 years ago
Felix "xq" Queißner e7e70cb96c LED 1 is RED. Reset loop tho 2 years ago
Felix Queißner 0d9721d907
Adds microzig.initializeSystemMemories (#87)
Co-authored-by: Felix "xq" Queißner <xq@random-projects.net>
2 years ago
Matt Knight 144d557357 remove hal.uart.panic 2 years ago
Matt Knight e1e525a50d conflict fixed 2 years ago
Felix "xq" Queißner fec7e7cf8d Merge remote-tracking branch 'origin/main' 2 years ago
Felix "xq" Queißner 58cfb98e80 Initial vomit: not working at all, basic docs. 2 years ago
Matt Knight 0f10a5d8f5
Initial commit 2 years ago
Matt Knight e9af302b69
uart improvements and improved definition of how many clock units there are (#16) 2 years ago
Felix "xq" Queißner b0b90a7cf0 Implements UART.reader() 2 years ago
Felix Queißner 15bc1fc06d
Much improves the panic function, now prints a stack trace more often. (#86)
Co-authored-by: Felix "xq" Queißner <xq@random-projects.net>
2 years ago
Felix "xq" Queißner 7b69211d41 Implements gpio.setPullUpDown 2 years ago
Felix "xq" Queißner 86d383e673 Implements ADC and PWM support in pin config, simplifies Pins() type. 2 years ago
Felix "xq" Queißner 5c07800cdb Removes debug code. 2 years ago
Felix "xq" Queißner c899778c87 Clock setup fixes. 2 years ago
Felix "xq" Queißner a55df1b52c Some debug logs in adc.reset() and resets.reset(), fixes some bugs with booleans. 2 years ago
Felix "xq" Queißner fe14d4f03b Implements input, pull up/down and uart routing. 2 years ago
Matt Knight 5c853fd23a
use compile errors instead of comments (#15) 2 years ago
Matt Knight 7c8d430237
adc bindings, mostly there but not quite (#14) 2 years ago
Felix Queißner 29aee14fd2
Update to latest master. (#13)
Co-authored-by: Felix "xq" Queißner <xq@random-projects.net>
2 years ago
Matt Knight 681b3b0d7a
added param to panic function (#83) 2 years ago
Matt Knight fa46be8ea2
Revert "Revert "Add executable method (addOptions, addObjectFile) and fix recursive call in addIncludePath (#79)" (#81)" (#82)
This reverts commit 4cc682cece.
2 years ago
David Sugar e280cca9b6
ATSAME51J20A chip (#78)
* Added some function wrappers to EmbeddedExecutable that expose commonly used functionalities of LibExeObjStep

* atsame51j20a chip added. GPIO support. UART support over SERCOM5.

* added support for true random numbers to atsame51j20a chip
2 years ago
Matt Knight 4cc682cece
Revert "Add executable method (addOptions, addObjectFile) and fix recursive call in addIncludePath (#79)" (#81)
This reverts commit bebf6cf92d.
2 years ago
Nicolas Goy bebf6cf92d
Add executable method (addOptions, addObjectFile) and fix recursive call in addIncludePath (#79) 2 years ago
Matt Knight d4a74cb4f3
move examples in here (#12) 2 years ago
Matt Knight 4159581b48
remove pointless discard (#80) 2 years ago
David Sugar 3617b8b25f
Added some function wrappers to EmbeddedExecutable that expose commonly used functionalities of LibExeObjStep (#77) 2 years ago
Matt Knight 9fa748ff13
Pin config (#9)
* pin config

* wip

* wip

* try some experimental pwm stuff
2 years ago
Vesim 20deb2cc3e
Allow to specify VectorTable in app and hal. (#76) 2 years ago