491 Commits (eb24365786f4f84c512441c13b3e10095ba46a70)
 

Author SHA1 Message Date
Matt Knight eb24365786 regzon (#79)
regzon is the name for the json output for reg'z data model. This PR includes a number of tests for serialization and deserialization. The intention of this format is to provide an accessible format for tooling, and to provide a medium for schema patching. Rather than errata, patching can be utilized to improve codegen such as type deduplication.

This format is subject to change.
7 months ago
Matt Knight ec84f7eebf svd field array (#77) 7 months ago
Matt Knight 71a8e27e8e omit [%s] suffix for svd (#76) 7 months ago
Matt Knight 83b4ee2a3d packed structs can have an explicit backing integer (#75) 7 months ago
Matt Knight 43ee9c8af0 vector table generation for ATDF (#74) 7 months ago
Matt Knight efeba02119 enums in SVD are always children of peripherals (#71)
* enums in SVD are always children of peripherals

* make SVD enums anonymous for now
7 months ago
Matt Knight 66ac34e33b fix mmio array codegen (#72) 7 months ago
Matt Knight a34e4ef648 initial support for dimElementsGroup for SVD (#70) 7 months ago
Matt Knight 293f25e6c3 make distinct types for peripherals always (#69) 7 months ago
Matt Knight 9627d4196c Rearchitect Regz (#63) 7 months ago
Matt Knight 2b985fc898 Characterize (#60)
* rename ndjson, add new tool to characterize sets of xml files

* remove some debug logs

* add characterized register schemas
7 months ago
Matt Knight f204d7f42c A quick fix for ATDF codegen and register groups (#59)
* A quick fix for ATDF codegen and register groups

The current code was expecting register groups and peripherals to have a
1:1 ratio, however the register groups under `modules` are more like
templates which are used to instantiate peripherals. This does the
minimal amount of refactoring in order for this to work and unblock some
users.

* i386 -> x86 target name update
7 months ago
Matt Knight 7a0d75f105 upgrade dependencies (#57) 7 months ago
Ethan Frei 0d0e667c26 removing some used "unused" variables (#55) 7 months ago
Matt Knight dea71d5272 add comptime for uses of ++ (#53)
* add comptime for uses of ++

* ptrCast instead of bitCast

* don't build i386 windows for now
7 months ago
Matt Knight 43a88c16b3 fix ptrCast to intToPtr (#50) 7 months ago
Matt Knight c87a7422fc update clap, fix logs of optional types (#48)
* update clap, fix logs of optional types

* rename empty test
7 months ago
Matt Knight 242b9300b6 update build badge 7 months ago
Matt Knight ba94c404f8 migrate linux builds to build kite (#47)
* see if it works

* add badge

* try grouping and matrix

* poke

* fix typo

* clean up
7 months ago
Matt Knight f160633eb5 add buildkite pipeline file (#46) 7 months ago
Matt Knight befb9a2928 make InterruptVector public (#44) 7 months ago
Matt Knight 708f0a6af6 don't overwrite register set, simplify nvic register generation (#42) 7 months ago
Matt Knight 48f2c0b051 Nvic codegen (#41)
* add system registers for cortex m0 and m1, nvic register generation for the chip

* make warning log a debug log

* usize to u64

* register size is now max 2^16 - 1
7 months ago
Matt Hall c38ca6403e Update build.zig: rename path->source (#39)
See ziglang/zig#11557
7 months ago
Matt Knight 9af2e274f1 core registers for the m0plus (#26)
* core registers for the m0plus

* do proper optional handling
7 months ago
Matt Knight 6f4850dab7 fix mmio int generation (#25) 7 months ago
Matt Knight 780a75268f add reset value and reset mask register properties (#24)
* add reset value and reset mask register properties

* usize => u64
7 months ago
Matt Knight 3d0c1ece64 use unmanaged datastructures (#23) 7 months ago
Riccardo Binetti 8ba737656a Add support for dimensioned register fields (#20)
Signed-off-by: Riccardo Binetti <rbino@gmx.com>
7 months ago
Matt Knight e34f293fec Update README.md 7 months ago
Matt Knight edf25671b9 add parsing the access type for svd (#22) 7 months ago
Matt Knight 2eb508c318 Register properties size (#21)
* snapshot

* size from register properties now passes tests

* finish moving to named index types
7 months ago
Matt Knight 96bf099d2e Update README.md 7 months ago
Matt Knight 4f4c1e693e Update README.md
don't need --recursive to clone ;)
7 months ago
Matt Knight d10482c9bd Vendor (#19)
* vendor dependencies
7 months ago
Matt Knight 1c676cbcfb support windows builds (#14)
* support windows builds

* add gitattributes for line ending
7 months ago
Matt Knight e7539b24ae Add build wrapper for regz (#13)
* regz can now be used as a build step
7 months ago
Matt Knight d6d34e21b0 remove indenting, just let the ast parser format the code (#11) 7 months ago
Matt Knight 2de91f6ca5 Test framework (#8)
* add template for PRs

* add CI workflow

* add test step and some empty tests

* reduce targets in workflow, add example svd

* added first test

* added line

* don't crosscompile from windows for now
7 months ago
Matt Knight d6bdd69ab4 extern struct for vector table (#4) 7 months ago
Matt Knight ae94209b57 inline functions for MMIOs (#3) 7 months ago
Matt Knight 4b7c5c531b ATDF (#2)
* snapshotting so that I can work on this as I travel

* add atdf parsing

* update readme

* fix register generation edge case and skip fields named RESERVED
7 months ago
Gregory Anders b6821bf8c1 Update clap usage for most recent HEAD version 7 months ago
Matt Knight 1a1a281c01 description word wrapping and fixed unhandled interrupt function 7 months ago
Matt Knight fed1a8f3fd big initial commit, thanks kprotty for helping with MmioInt() 7 months ago
Matt Knight 39f633642d Initial commit 7 months ago
Tobias Kohlbau 096fda843a
usb: unify handling of length parameters (#177)
* usb: unify handling of length parameters

The length parameters in USB packets are strict and the existing
implementation does already hardcode the length within the serialize
functions. Therefore the user should not provide these lengths during
creation time. In order to make this more verbose use defaults values
within the structs and reference these defaults values within the
serialization functions. It's not possible to remove these fields
completly as this fields are used within deserialization from the
hardware itself.

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>

* Remove length fields as they are obsolete. The lengths is only required
during the serialization and therefore is already hardcoded. The only
other convinience is the calculation of the descriptor size, but this is
already wrong. extern structs are padded and therefore do not have the
right sizes.

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>

* cleanup some accidentially added changes

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>

---------

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
7 months ago
Grazfather 245401a0ca
wip: rp2040: Add support for PIO's jmp_pin (#174)
This field is a bit tricky: It belongs to the EXECCTRL register, while
most of the other fields can determined based on the directives used in
the assembled program, this one has to be set explicitly. This makes it
so that we have to plumb some way to explicitly set the field. I did
this by making `LoadAndStartProgramOptions` take `ExecOptions`, but this
isn't perfect, because if a user sets other fields, they will be ignored
in favour of the values set in the program.
7 months ago
Grazfather a7ff8ed32b
rp2040: Fix DMA not respecting transfer_size_bytes (#176) 7 months ago
Felix Queißner 5742d0e4b3
Better readme (#173)
* Adds better docs to README.md
* Adds tar, gzip to bundle.py checked dependencies.
* Adds fancy rendering of .data/chip-families.svg in output for embedding.
7 months ago