Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3843

SDK • What is the code path to main()?

$
0
0
Hi,

I recently bought myself a pico and am beginning my learning journey. I've stumbled a little over the CMake set up - I've never used CMake, and I'm finding myself fairly resistant to wanting to learn it, especially if my projects end up also spewing so many weird extra files all over the project directory, so I've been looking at "Bare Metal" approaches, which is more the sort of thing I enjoy doing anyway.

Most of the examples I've found for bare metal seem to be confined to the initial 252 bytes of bootloader2 SRAM, which isn't going to cut it for the project I'm hoping to work towards, so I'm interested in how the SDK gets from power on to my own main() function executing from flash.

Looking through the code I've found the generic stage 2 boot loader which is a little opaque and I can't work out where it goes next. It seems to either jump to the Link Register address, or into a vector table but I can't see where either of those values come from yet.

I was wondering if anyone could point me to a sort of explanation?

Thanks

Statistics: Posted by MikeWatts — Fri May 03, 2024 10:42 am



Viewing all articles
Browse latest Browse all 3843

Trending Articles