pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Contradictory comments in boot2_w25q080.S and exit_from_boot2.S

Open Kristine1975 opened this issue 3 years ago • 2 comments

According to the comment boot2_w25q080.S, upon entry lr is 0x10000100:

https://github.com/raspberrypi/pico-sdk/blob/2062372d203b372849d573f252cf7c6dc2800c0a/src/rp2_common/boot_stage2/boot2_w25q080.S#L95-L96

According to the comment in exit_from_boot2.S however, it is zero, and that is what the code checks for:

https://github.com/raspberrypi/pico-sdk/blob/2062372d203b372849d573f252cf7c6dc2800c0a/src/rp2_common/boot_stage2/asminclude/boot2_helpers/exit_from_boot2.S#L12-L13

So my guess is the comment in boot2_w25q080.S is incorrect (as well as the one in boot2_at25sf128a.S).

Kristine1975 avatar Feb 23 '22 13:02 Kristine1975

Perhaps this is related to #10 ? :man_shrugging:

lurch avatar Feb 24 '22 00:02 lurch

Perhaps this is related to #10 ? 🤷‍♂️

It doesn't look like it: The 0x10000100 comment already existed in the SDK's initial release 26653ea:

https://github.com/raspberrypi/pico-sdk/blob/26653ea81e340cacee55025d110c3e014a252a87/src/rp2_common/boot_stage2/boot2_w25q080.S#L94-L95

#10 merely extracted the code with the second comment to its own file exit_from_boot2.S.

Kristine1975 avatar Feb 24 '22 14:02 Kristine1975