@@ -8,6 +8,8 @@ use defmt_test as _;
88use panic_probe as _;
99#[ cfg( feature = "rp2040" ) ]
1010use rp2040_hal as hal; // memory layout // panic handler
11+ #[ cfg( feature = "rp235x" ) ]
12+ use rp235x_hal as hal;
1113
1214/// The linker will place this boot block at the start of our program image. We
1315/// need this to help the ROM bootloader get our code up and running.
@@ -18,6 +20,12 @@ use rp2040_hal as hal; // memory layout // panic handler
1820#[ used]
1921pub static BOOT2 : [ u8 ; 256 ] = rp2040_boot2:: BOOT_LOADER_GENERIC_03H ;
2022
23+ /// Tell the Boot ROM about our application
24+ #[ cfg( feature = "rp235x" ) ]
25+ #[ link_section = ".start_block" ]
26+ #[ used]
27+ pub static IMAGE_DEF : hal:: block:: ImageDef = hal:: block:: ImageDef :: secure_exe ( ) ;
28+
2129/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
2230/// if your board has a different frequency
2331const XTAL_FREQ_HZ : u32 = 12_000_000u32 ;
@@ -55,6 +63,8 @@ mod tests {
5563 use panic_probe as _;
5664 #[ cfg( feature = "rp2040" ) ]
5765 use rp2040_hal as hal;
66+ #[ cfg( feature = "rp235x" ) ]
67+ use rp235x_hal as hal;
5868
5969 use hal:: { clocks:: init_clocks_and_plls, pac, watchdog:: Watchdog } ;
6070
@@ -66,6 +76,7 @@ mod tests {
6676 hal:: sio:: spinlock_reset ( ) ;
6777 }
6878 let mut pac = pac:: Peripherals :: take ( ) . unwrap ( ) ;
79+ #[ cfg( feature = "rp2040" ) ]
6980 let _core = pac:: CorePeripherals :: take ( ) . unwrap ( ) ;
7081 let mut watchdog = Watchdog :: new ( pac. WATCHDOG ) ;
7182
0 commit comments