Ayke van Laethem
ffa6d562a9
tools/gen-device-svd: fix bug in previous commit
There was a bug in the generated Go code: padding member numbers would
not increase their count leading to multiple struct members with the
same name.
6 years ago
Ayke van Laethem
a72d0b7959
tools/gen-device-svd: make sure all clusters are included
This is important for nrf52840, which has UART pin selection in a
cluster that wasn't exposed.
6 years ago
Ayke van Laethem
5c79a93c85
tools/gen-device-svd: generate code for cluster arrays
This should make it possible to add support for PWM on nrf devices.
6 years ago
Ayke van Laethem
9b4a6dcc14
tools/gen-device-svd: move peripheral list to beginning
It's much easier to scan the source when the peripheral list is at the
front. Go doesn't care about the order of declaration anyway.
6 years ago
Ayke van Laethem
e77a5af5d2
tools/gen-device-svd: rewrite with ElementTree
xml.etree.ElementTree is much easier to work with. This also fixes a few
small bugs in the parser. And as an added bonus, device generation got a
lot faster: apprently etree is a lot faster than minidom.
6 years ago
Ayke van Laethem
8d170d3bd2
all: change special type __volatile to pragma //go:volatile
This is one step towards removing unnecessary special casts in most
cases. It is also part of removing as much magic as possible from the
compiler (the pragma is explicit, the special name is not).
6 years ago
Ayke van Laethem
ddd4a39cb8
avr: fix default handler in interrupt vector
Apparently the target of a weak symbol must be defined in the same file
as where it is used as a weak symbol.
https://www.avrfreaks.net/forum/using-weak-custom-vector-table#comment-745922
6 years ago
Ayke van Laethem
3076ad470e
tools/gen-device-svd: fix script filename in output
6 years ago
Ayke van Laethem
b9638315d2
avr: automatically generate interrupt vectors
6 years ago
Ayke van Laethem
eadec6f766
tools/gen-device-svd: avoid _Msk for single-bit fields
6 years ago
Ayke van Laethem
a577bc2a1b
tools/gen-device-svd: show better error messages
Show an error message when input .svd files cannot be found.
6 years ago
Ayke van Laethem
7c16f6c904
tools/gen-device-svd: make source URL configurable
6 years ago
Ayke van Laethem
b705b332a7
tools/gen-device-svd: indentation in .s file
6 years ago
Ayke van Laethem
e0d13f489f
tools/gen-device/svd: auto-generate output directory
6 years ago
Ayke van Laethem
d841daa32b
tools/gen-device-svd: emit correct Go code for stm32
Groups were not recognized because the parser only looked at the
derivedFrom attribute and not at <groupName> tags for matching
peripherals.
6 years ago
Ayke van Laethem
9fa08bf51d
all: use groupName in peripherals
This is needed for support for multiple instances of a peripheral type.
6 years ago
Ayke van Laethem
110230a50d
tools/gen-device-svd: make svd files deal with stm32
First concrete preparation for stm32 support at some point.
6 years ago
Ayke van Laethem
5b0aaf0d39
targets: clean up and unify linker scripts
Especially arm.ld needed some cleaning up. Other than that, I've made
sure the two linker scripts look similar where possible.
6 years ago
Ayke van Laethem
505b1f750d
all: generate interrupt vector from .svd file
6 years ago
Ron Evans
fc0ff3a987
avr: initial implementation for PWM
Signed-off-by: Ron Evans <ron@hybridgroup.com>
Edited slightly by Ayke van Laethem
6 years ago
Ayke van Laethem
18b3e8d156
gen-device: move to new tools directory
6 years ago