1111//! address `0x1000_0100`. This IVT is found and jumped to by the RP2040 boot
1212//! block(`0x1000_0000` to `0x1000_00FF`).
1313
14+ // -----------------------------------------------------------------------------
15+ // Licence Statement
16+ // -----------------------------------------------------------------------------
17+ // Copyright (c) Jonathan 'theJPster' Pallant and the Neotron Developers, 2021
18+ //
19+ // This program is free software: you can redistribute it and/or modify it under
20+ // the terms of the GNU General Public License as published by the Free Software
21+ // Foundation, either version 3 of the License, or (at your option) any later
22+ // version.
23+ //
24+ // This program is distributed in the hope that it will be useful, but WITHOUT
25+ // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
26+ // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
27+ // details.
28+ //
29+ // You should have received a copy of the GNU General Public License along with
30+ // this program. If not, see <https://www.gnu.org/licenses/>.
31+ // -----------------------------------------------------------------------------
32+
1433#![ no_std]
1534#![ no_main]
1635
36+ // -----------------------------------------------------------------------------
37+ // Imports
38+ // -----------------------------------------------------------------------------
39+
1740use cortex_m_rt:: entry;
1841use embedded_hal:: digital:: v2:: OutputPin ;
1942use embedded_time:: rate:: * ;
@@ -23,6 +46,10 @@ use pico;
2346use pico:: hal;
2447use pico:: hal:: pac;
2548
49+ // -----------------------------------------------------------------------------
50+ // Static and Const Data
51+ // -----------------------------------------------------------------------------
52+
2653/// This is the standard RP2040 bootloader. It must be stored in the first 256
2754/// bytes of the external SPI Flash chip. It will map the external SPI flash
2855/// chip to address `0x1000_0000` and jump to an Interrupt Vector Table at
@@ -33,6 +60,16 @@ use pico::hal::pac;
3360#[ used]
3461pub static BOOT2 : [ u8 ; 256 ] = rp2040_boot2:: BOOT_LOADER ;
3562
63+ // -----------------------------------------------------------------------------
64+ // Types
65+ // -----------------------------------------------------------------------------
66+
67+ // None
68+
69+ // -----------------------------------------------------------------------------
70+ // Functions
71+ // -----------------------------------------------------------------------------
72+
3673/// This is the entry-point to the BIOS. It is called by cortex-m-rt once the
3774/// `.bss` and `.data` sections have been initialised.
3875#[ entry]
@@ -86,3 +123,7 @@ fn main() -> ! {
86123 delay. delay_ms ( 500 ) ;
87124 }
88125}
126+
127+ // -----------------------------------------------------------------------------
128+ // End of file
129+ // -----------------------------------------------------------------------------
0 commit comments