|
Hello everyone,
I'm trying to do a bare metal minimal boot on the Zero 2 (at least, I think that's what I did):
- void _start() {
- static constexpr uint32_t GpioRegisterBase = 0x0300B000;
- write_register( GpioRegisterBase + 0x4c, 0x1111'1111 );
- write_register( GpioRegisterBase + 0x58, 0xffff );
- while(true) {}
- }
Copy code
Compiled and verified the binary does what I need (position independent). I then used the mksunxiboot tool from the latest u-boot to get an 8KB image, which I wrote to an SDCard at 8KB offset in. When put in the Zero 2, I expected to see the power and status leds turned on. Instead, I got nothing. Now I don't know whether my code doesn't run, or whether it runs, but isn't turning on the leds for whatever reason.
Can anyone help?
- I know that I'm not initializing the ram or the clocks or, well, anything. My understanding is that it shouldn't matter to such a small program.
- I know u-boot is doing ... something with the "arm trusted firmware". I have it compiled, but I'd rather not have to use it if I can avoid it. For educational reasons, I'd rather be the one who initializes the RAM and the MMU, and the firmware does both if I let it. At least for now, I do not need to run at EL3, so this shouldn't be a blocker.
|
|