Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

STM32F303 HAL made working; added SPI 3-way / half-duplex / bidi mode #30

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ HALs and register definitions for stm32 (STMicro) devices

== What version of Zig to use

Right now we are following https://ziglang.org/download/[master], but once 0.11.0 is released, we will be switching to the latest stable version of Zig.
Right now we are following https://ziglang.org/download/[0.11.0], and we plan to keep following the latest stable version of Zig.

== stm32 boards that renode supports:

- blue pill (stm32f103)
- nucleo 64 (stm32f103)
- f3 discovery
- f4 discovery
- f7 discovery
4 changes: 4 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ pub const chips = struct {
.json = .{ .cwd_relative = build_root ++ "/src/chips/STM32F303.json" },
},
},
.hal = .{
.source_file = .{ .cwd_relative = build_root ++ "/src/hals/STM32F303.zig" },
},
};

pub const stm32f407vg = .{
Expand Down Expand Up @@ -190,6 +193,7 @@ pub const boards = struct {
pub const stm32f3discovery = .{
.preferred_format = .elf,
.chip = chips.stm32f303vc.chip,
.hal = chips.stm32f303vc.hal,
.board = .{
.name = "STM32F3DISCOVERY",
.source_file = .{ .path = build_root ++ "/src/boards/STM32F3DISCOVERY.zig" },
Expand Down
4 changes: 2 additions & 2 deletions src/boards/STM32F3DISCOVERY.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub const micro = @import("microzig");
pub const microzig = @import("microzig");

pub const cpu_frequency = 8_000_000;

Expand All @@ -24,7 +24,7 @@ pub const pin_map = .{
};

pub fn debug_write(string: []const u8) void {
const uart1 = micro.core.experimental.Uart(1, .{}).get_or_init(.{
const uart1 = microzig.core.experimental.uart.Uart(1, .{}).get_or_init(.{
.baud_rate = 9600,
.data_bits = .eight,
.parity = null,
Expand Down
Loading