Skip to content

Commit 70547f8

Browse files
committed
cleanup comments
1 parent 495e60b commit 70547f8

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

core/src/cpus/cortex_m.zig

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -578,17 +578,13 @@ var ram_vectors: [vector_count]usize align(256) = undefined;
578578
pub fn ram_image_entrypoint() linksection(".entry") callconv(.naked) void {
579579
asm volatile (
580580
\\
581-
// Get address of vector table
581+
// Set VTOR to point to ram table
582582
\\mov r0, %[_vector_table]
583-
// Get address of VTOR register
584583
\\mov r1, %[_VTOR_ADDRESS]
585-
// Set VTOR to point to ram table
586584
\\str r0, [r1]
587-
// Load stack address and entry point
585+
// Set up stack and jump to _start
588586
\\ldm r0!, {r1, r2}
589-
// Set sp
590587
\\msr msp, r1
591-
// Branch to _start (reset vector)
592588
\\bx r2
593589
:
594590
: [_vector_table] "r" (&startup_logic._vector_table),
@@ -630,7 +626,6 @@ pub const startup_logic = struct {
630626
}
631627

632628
// Move vector table to RAM if requested
633-
// TODO: Make sure that this isn't set for ram image
634629
if (interrupt.has_ram_vectors()) {
635630
// Copy vector table to RAM and set VTOR to point to it
636631

@@ -689,6 +684,7 @@ fn is_ramimage() bool {
689684
return (std.mem.containsAtLeast(u8, board_name, 1, "ram image"));
690685
return false;
691686
}
687+
692688
pub fn export_startup_logic() void {
693689
if (is_ramimage())
694690
@export(&ram_image_entrypoint, .{

port/raspberrypi/rp2xxx/build.zig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,26 +131,22 @@ pub fn init(dep: *std.Build.Dependency) Self {
131131
};
132132

133133
const bootrom_rp2040 = get_bootrom(b, &chip_rp2040, .w25q080);
134-
// Create a "bootloader" 'import', but it's actucally used to embed the file.
135-
// This file is just the flash xip bis?
136-
// But then why is the PICO_NO_FLASH relevant in the bootloader?
137134
const rp2040_bootrom_imports = b.allocator.dupe(std.Build.Module.Import, &.{
138135
.{ .name = "bootloader", .module = b.createModule(.{ .root_source_file = bootrom_rp2040 }) },
139136
}) catch @panic("out of memory");
140137

141138
return .{
142139
.chips = .{
143140
.rp2040 = chip_rp2040.derive(.{}),
144-
// This should probably be a board? Here it's a mix of a flash-less pico, so rp2040 on its own, but with an external oscillator
141+
// This should probably be a board? Here it's a mix of a flash-less pico, so rp2040 on
142+
// its own, but with an external oscillator
145143
.rp2040_ram_image = chip_rp2040.derive(.{
146144
.linker_script = b.path("rp2040_ram_image.ld"),
147145
.board = .{
148146
.name = "RaspberryPi Pico (ram image)",
149147
.url = "https://www.raspberrypi.com/products/raspberry-pi-pico/",
150-
// Using pico2 because it doesn't need a bootloader, and we don't have flash for one
151148
.root_source_file = b.path("src/boards/raspberry_pi_pico2.zig"),
152149
},
153-
// TODO: Support overriding the memory regions? It's only used for linker generation?
154150
}),
155151
.rp2350_arm = chip_rp2350_arm.derive(.{}),
156152
.rp2350_riscv = chip_rp2350_riscv.derive(.{}),

0 commit comments

Comments
 (0)