5
5
*/
6
6
7
7
#include <stdio.h>
8
- // Include all headers to check for compiler warnings
9
- #include "hardware/adc.h"
10
- #include "hardware/claim.h"
11
- #include "hardware/clocks.h"
12
- #include "hardware/divider.h"
8
+
9
+ #ifndef KITCHEN_SINK_INCLUDE_HEADER
10
+ // provided for backwards compatibility for non CMake build systems - just includes enough to compile
13
11
#include "hardware/dma.h"
14
- #include "hardware/exception.h"
15
- #include "hardware/flash.h"
16
- #include "hardware/gpio.h"
17
- #include "hardware/i2c.h"
18
- #include "hardware/interp.h"
19
- #include "hardware/irq.h"
20
- #include "hardware/pio.h"
21
- #include "hardware/pio_instructions.h"
22
- #include "hardware/pll.h"
23
- #include "hardware/pwm.h"
24
- #include "hardware/resets.h"
25
- #if PICO_RP2040
26
- #include "hardware/rtc.h"
27
- #endif
28
- #if !PICO_RP2040
29
- #include "hardware/sha256.h"
30
- #endif
31
- #include "hardware/spi.h"
32
- #include "hardware/sync.h"
33
- #include "hardware/timer.h"
34
- #include "hardware/ticks.h"
35
- #include "hardware/uart.h"
36
- #include "hardware/vreg.h"
37
- #include "hardware/watchdog.h"
38
- #include "hardware/xosc.h"
39
- #include "pico/aon_timer.h"
40
- #include "pico/binary_info.h"
41
- #include "pico/bit_ops.h"
42
- #include "pico/bootrom.h"
43
- #if LIB_PICO_CYW43_ARCH
44
- #include "pico/cyw43_arch.h"
45
- #endif
46
- #include "pico/divider.h"
47
- // todo we should have this but right now double.h is only present with double_implementation == pico
48
- #if PICO_RP2040
49
- #include "pico/double.h"
50
- #endif
51
- #include "pico/fix/rp2040_usb_device_enumeration.h"
52
- #include "pico/flash.h"
53
- // todo we should have this but right now float.h is only present with float_implementation == pico
54
- #if PICO_RP2040
55
- #include "pico/float.h"
56
- #endif
57
- #include "pico/i2c_slave.h"
58
- #if LIB_PICO_INT64_OPS_PICO
59
- #include "pico/int64_ops.h"
60
- #endif
61
- #include "pico/malloc.h"
62
- #include "pico/multicore.h"
63
- #include "pico/platform.h"
64
- #include "pico/printf.h"
65
- #include "pico/rand.h"
66
- #include "pico/runtime.h"
67
- #if LIB_PICO_SHA256
68
- #include "pico/sha256.h"
69
- #endif
70
- #include "pico/stdio.h"
71
- #include "pico/stdlib.h"
72
12
#include "pico/sync.h"
73
- #include "pico/time.h"
74
- #include "pico/unique_id.h"
75
- #include "pico/util/datetime.h"
76
- #include "pico/util/pheap.h"
77
- #include "pico/util/queue.h"
78
-
79
- #include "hardware/structs/adc.h"
80
- #include "hardware/structs/busctrl.h"
81
- #include "hardware/structs/clocks.h"
82
- #include "hardware/structs/dma.h"
83
- #include "hardware/structs/i2c.h"
84
- #include "hardware/structs/interp.h"
85
- #include "hardware/structs/io_bank0.h"
86
- #include "hardware/structs/io_qspi.h"
87
- #ifndef __riscv
88
- #include "hardware/structs/mpu.h"
89
- #include "hardware/structs/nvic.h"
90
- #endif
91
- #include "hardware/structs/pads_bank0.h"
92
- #include "hardware/structs/pads_qspi.h"
93
- #include "hardware/structs/pio.h"
94
- #include "hardware/structs/pll.h"
95
- #if PICO_RP2350
96
- #include "hardware/structs/powman.h"
97
- #endif
98
- #include "hardware/structs/psm.h"
99
- #include "hardware/structs/pwm.h"
100
- #include "hardware/structs/resets.h"
101
- #include "hardware/structs/rosc.h"
102
- #if PICO_RP2040
103
- #include "hardware/structs/rtc.h"
104
- #endif
105
- #ifndef __riscv
106
- #include "hardware/structs/scb.h"
107
- #endif
108
- #include "hardware/structs/sio.h"
109
- #if !PICO_RP2040
110
- #include "hardware/structs/sha256.h"
111
- #endif
112
- #include "hardware/structs/spi.h"
113
- #if PICO_RP2040
114
- #include "hardware/structs/ssi.h"
115
- #endif
116
- #include "hardware/structs/syscfg.h"
117
- #ifndef __riscv
118
- #include "hardware/structs/systick.h"
13
+ #include "pico/stdlib.h"
14
+ #if LIB_PICO_BINARY_INFO
15
+ #include "pico/binary_info.h"
119
16
#endif
120
- #include "hardware/structs/timer.h"
121
- #include "hardware/structs/uart.h"
122
- #include "hardware/structs/usb.h"
123
- #if PICO_RP2040
124
- #include "hardware/structs/vreg_and_chip_reset.h"
17
+ #else
18
+ #include KITCHEN_SINK_INCLUDE_HEADER
125
19
#endif
126
- #include "hardware/structs/watchdog.h"
127
- #include "hardware/structs/xip_ctrl.h"
128
- #include "hardware/structs/xosc.h"
129
20
130
21
#if LIB_PICO_MBEDTLS
131
22
#include "mbedtls/ssl.h"
132
23
#include "lwip/altcp_tcp.h"
133
24
#include "lwip/altcp_tls.h"
134
25
#endif
135
26
27
+ #if LIB_PICO_BINARY_INFO
136
28
bi_decl (bi_block_device (
137
29
BINARY_INFO_MAKE_TAG ('K' , 'S' ),
138
30
"foo" ,
@@ -141,6 +33,7 @@ bi_decl(bi_block_device(
141
33
NULL ,
142
34
BINARY_INFO_BLOCK_DEV_FLAG_READ | BINARY_INFO_BLOCK_DEV_FLAG_WRITE |
143
35
BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN ));
36
+ #endif
144
37
145
38
uint32_t * foo = (uint32_t * ) 200 ;
146
39
@@ -167,7 +60,6 @@ float __attribute__((noinline)) foox(float x, float b) {
167
60
return x * b ;
168
61
}
169
62
170
-
171
63
int main (void ) {
172
64
spiggle ();
173
65
0 commit comments