microzig
microzig copied to clipboard
Unified abstraction layer and HAL for several microcontrollers
I am having a hard time tracking down exactly what the issue is, but it's easy to repro ```c #include char buf[0x10]; int main (void) { // Prefill the buffer...
Currently the root module of the firmware is `core/start.zig`. This has one upside and one downside. The upside is that we can export the startup logic without requiring the user...
The naming can be weird on these. Using `-m` or maybe `-m ?` to list the supported MCUs would be nice.
Currently, only a bad implementation of a ATmega328p is supported, but there should be an option to select more MCUs.
See the following support list: https://en.wikipedia.org/wiki/Atmel_AVR_instruction_set#Instruction_set_inheritance There is already `src/lib/Cpu.zig:InstructionSet`, but there are no checks implemented. CPU simulation should error out if instruction is not supported.
Some mcus, e.g. the atxmega, map peripherals to different parts of the address space. For example, the RAM starts at 0x2000, and EEPROM starts at 0x1000. This can be supported...