Austin Schuh | 0a96ea3 | 2022-01-01 22:29:30 -0800 | [diff] [blame^] | 1 | exports_files(["src/rp2_common/pico_standard_link/memmap_default.ld"]) |
| 2 | |
| 3 | cc_library( |
| 4 | name = "pico-sdk", |
| 5 | srcs = [ |
| 6 | "src/common/pico_sync/critical_section.c", |
| 7 | "src/common/pico_sync/lock_core.c", |
| 8 | "src/common/pico_sync/mutex.c", |
| 9 | "src/common/pico_sync/sem.c", |
| 10 | "src/common/pico_time/time.c", |
| 11 | "src/common/pico_time/timeout_helper.c", |
| 12 | "src/common/pico_util/datetime.c", |
| 13 | "src/common/pico_util/pheap.c", |
| 14 | "src/common/pico_util/queue.c", |
| 15 | "src/rp2_common/hardware_claim/claim.c", |
| 16 | "src/rp2_common/hardware_clocks/clocks.c", |
| 17 | "src/rp2_common/hardware_divider/divider.S", |
| 18 | "src/rp2_common/hardware_gpio/gpio.c", |
| 19 | "src/rp2_common/hardware_irq/irq.c", |
| 20 | "src/rp2_common/hardware_irq/irq_handler_chain.S", |
| 21 | "src/rp2_common/hardware_pll/pll.c", |
| 22 | "src/rp2_common/hardware_sync/sync.c", |
| 23 | "src/rp2_common/hardware_timer/timer.c", |
| 24 | "src/rp2_common/hardware_uart/uart.c", |
| 25 | "src/rp2_common/hardware_vreg/vreg.c", |
| 26 | "src/rp2_common/hardware_watchdog/watchdog.c", |
| 27 | "src/rp2_common/hardware_xosc/xosc.c", |
| 28 | "src/rp2_common/pico_bit_ops/bit_ops_aeabi.S", |
| 29 | "src/rp2_common/pico_bootrom/bootrom.c", |
| 30 | "src/rp2_common/pico_divider/divider.S", |
| 31 | "src/rp2_common/pico_double/double_aeabi.S", |
| 32 | "src/rp2_common/pico_double/double_init_rom.c", |
| 33 | "src/rp2_common/pico_double/double_math.c", |
| 34 | "src/rp2_common/pico_double/double_v1_rom_shim.S", |
| 35 | "src/rp2_common/pico_float/float_aeabi.S", |
| 36 | "src/rp2_common/pico_float/float_init_rom.c", |
| 37 | "src/rp2_common/pico_float/float_math.c", |
| 38 | "src/rp2_common/pico_float/float_v1_rom_shim.S", |
| 39 | "src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S", |
| 40 | "src/rp2_common/pico_malloc/pico_malloc.c", |
| 41 | "src/rp2_common/pico_mem_ops/mem_ops_aeabi.S", |
| 42 | "src/rp2_common/pico_platform/platform.c", |
| 43 | "src/rp2_common/pico_printf/printf.c", |
| 44 | "src/rp2_common/pico_runtime/runtime.c", |
| 45 | "src/rp2_common/pico_standard_link/binary_info.c", |
| 46 | "src/rp2_common/pico_standard_link/crt0.S", |
| 47 | "src/rp2_common/pico_standard_link/new_delete.cpp", |
| 48 | "src/rp2_common/pico_stdio/stdio.c", |
| 49 | "src/rp2_common/pico_stdio_uart/stdio_uart.c", |
| 50 | "src/rp2_common/pico_stdlib/stdlib.c", |
| 51 | #"src/common/pico_util/doc.h", |
| 52 | ], |
| 53 | hdrs = [ |
| 54 | "src/boards/include/boards/pico.h", |
| 55 | "src/common/pico_base/include/pico.h", |
| 56 | "src/common/pico_base/include/pico/assert.h", |
| 57 | "src/common/pico_base/include/pico/config.h", |
| 58 | "src/common/pico_base/include/pico/config_autogen.h", |
| 59 | "src/common/pico_base/include/pico/error.h", |
| 60 | "src/common/pico_base/include/pico/types.h", |
| 61 | "src/common/pico_base/include/pico/version.h", |
| 62 | "src/common/pico_binary_info/include/pico/binary_info.h", |
| 63 | "src/common/pico_binary_info/include/pico/binary_info/code.h", |
| 64 | "src/common/pico_binary_info/include/pico/binary_info/defs.h", |
| 65 | "src/common/pico_binary_info/include/pico/binary_info/structure.h", |
| 66 | "src/common/pico_stdlib/include/pico/stdlib.h", |
| 67 | "src/common/pico_sync/include/pico/critical_section.h", |
| 68 | "src/common/pico_sync/include/pico/lock_core.h", |
| 69 | "src/common/pico_sync/include/pico/mutex.h", |
| 70 | "src/common/pico_sync/include/pico/sem.h", |
| 71 | "src/common/pico_sync/include/pico/sync.h", |
| 72 | "src/common/pico_time/include/pico/time.h", |
| 73 | "src/common/pico_time/include/pico/timeout_helper.h", |
| 74 | "src/common/pico_util/include/pico/util/datetime.h", |
| 75 | "src/common/pico_util/include/pico/util/pheap.h", |
| 76 | "src/common/pico_util/include/pico/util/queue.h", |
| 77 | "src/rp2040/hardware_regs/include/hardware/platform_defs.h", |
| 78 | "src/rp2040/hardware_regs/include/hardware/regs/adc.h", |
| 79 | "src/rp2040/hardware_regs/include/hardware/regs/addressmap.h", |
| 80 | "src/rp2040/hardware_regs/include/hardware/regs/busctrl.h", |
| 81 | "src/rp2040/hardware_regs/include/hardware/regs/clocks.h", |
| 82 | "src/rp2040/hardware_regs/include/hardware/regs/dma.h", |
| 83 | "src/rp2040/hardware_regs/include/hardware/regs/dreq.h", |
| 84 | "src/rp2040/hardware_regs/include/hardware/regs/i2c.h", |
| 85 | "src/rp2040/hardware_regs/include/hardware/regs/intctrl.h", |
| 86 | "src/rp2040/hardware_regs/include/hardware/regs/io_bank0.h", |
| 87 | "src/rp2040/hardware_regs/include/hardware/regs/io_qspi.h", |
| 88 | "src/rp2040/hardware_regs/include/hardware/regs/m0plus.h", |
| 89 | "src/rp2040/hardware_regs/include/hardware/regs/pads_bank0.h", |
| 90 | "src/rp2040/hardware_regs/include/hardware/regs/pads_qspi.h", |
| 91 | "src/rp2040/hardware_regs/include/hardware/regs/pio.h", |
| 92 | "src/rp2040/hardware_regs/include/hardware/regs/pll.h", |
| 93 | "src/rp2040/hardware_regs/include/hardware/regs/psm.h", |
| 94 | "src/rp2040/hardware_regs/include/hardware/regs/pwm.h", |
| 95 | "src/rp2040/hardware_regs/include/hardware/regs/resets.h", |
| 96 | "src/rp2040/hardware_regs/include/hardware/regs/rosc.h", |
| 97 | "src/rp2040/hardware_regs/include/hardware/regs/rtc.h", |
| 98 | "src/rp2040/hardware_regs/include/hardware/regs/sio.h", |
| 99 | "src/rp2040/hardware_regs/include/hardware/regs/spi.h", |
| 100 | "src/rp2040/hardware_regs/include/hardware/regs/ssi.h", |
| 101 | "src/rp2040/hardware_regs/include/hardware/regs/syscfg.h", |
| 102 | "src/rp2040/hardware_regs/include/hardware/regs/sysinfo.h", |
| 103 | "src/rp2040/hardware_regs/include/hardware/regs/tbman.h", |
| 104 | "src/rp2040/hardware_regs/include/hardware/regs/timer.h", |
| 105 | "src/rp2040/hardware_regs/include/hardware/regs/uart.h", |
| 106 | "src/rp2040/hardware_regs/include/hardware/regs/usb.h", |
| 107 | "src/rp2040/hardware_regs/include/hardware/regs/usb_device_dpram.h", |
| 108 | "src/rp2040/hardware_regs/include/hardware/regs/vreg_and_chip_reset.h", |
| 109 | "src/rp2040/hardware_regs/include/hardware/regs/watchdog.h", |
| 110 | "src/rp2040/hardware_regs/include/hardware/regs/xip.h", |
| 111 | "src/rp2040/hardware_regs/include/hardware/regs/xosc.h", |
| 112 | "src/rp2040/hardware_structs/include/hardware/structs/adc.h", |
| 113 | "src/rp2040/hardware_structs/include/hardware/structs/bus_ctrl.h", |
| 114 | "src/rp2040/hardware_structs/include/hardware/structs/clocks.h", |
| 115 | "src/rp2040/hardware_structs/include/hardware/structs/dma.h", |
| 116 | "src/rp2040/hardware_structs/include/hardware/structs/i2c.h", |
| 117 | "src/rp2040/hardware_structs/include/hardware/structs/interp.h", |
| 118 | "src/rp2040/hardware_structs/include/hardware/structs/iobank0.h", |
| 119 | "src/rp2040/hardware_structs/include/hardware/structs/ioqspi.h", |
| 120 | "src/rp2040/hardware_structs/include/hardware/structs/mpu.h", |
| 121 | "src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h", |
| 122 | "src/rp2040/hardware_structs/include/hardware/structs/padsbank0.h", |
| 123 | "src/rp2040/hardware_structs/include/hardware/structs/pio.h", |
| 124 | "src/rp2040/hardware_structs/include/hardware/structs/pll.h", |
| 125 | "src/rp2040/hardware_structs/include/hardware/structs/psm.h", |
| 126 | "src/rp2040/hardware_structs/include/hardware/structs/pwm.h", |
| 127 | "src/rp2040/hardware_structs/include/hardware/structs/resets.h", |
| 128 | "src/rp2040/hardware_structs/include/hardware/structs/rosc.h", |
| 129 | "src/rp2040/hardware_structs/include/hardware/structs/rtc.h", |
| 130 | "src/rp2040/hardware_structs/include/hardware/structs/scb.h", |
| 131 | "src/rp2040/hardware_structs/include/hardware/structs/sio.h", |
| 132 | "src/rp2040/hardware_structs/include/hardware/structs/spi.h", |
| 133 | "src/rp2040/hardware_structs/include/hardware/structs/ssi.h", |
| 134 | "src/rp2040/hardware_structs/include/hardware/structs/syscfg.h", |
| 135 | "src/rp2040/hardware_structs/include/hardware/structs/systick.h", |
| 136 | "src/rp2040/hardware_structs/include/hardware/structs/timer.h", |
| 137 | "src/rp2040/hardware_structs/include/hardware/structs/uart.h", |
| 138 | "src/rp2040/hardware_structs/include/hardware/structs/usb.h", |
| 139 | "src/rp2040/hardware_structs/include/hardware/structs/vreg_and_chip_reset.h", |
| 140 | "src/rp2040/hardware_structs/include/hardware/structs/watchdog.h", |
| 141 | "src/rp2040/hardware_structs/include/hardware/structs/xip_ctrl.h", |
| 142 | "src/rp2040/hardware_structs/include/hardware/structs/xosc.h", |
| 143 | "src/rp2_common/cmsis/include/cmsis/rename_exceptions.h", |
| 144 | "src/rp2_common/hardware_base/include/hardware/address_mapped.h", |
| 145 | "src/rp2_common/hardware_claim/include/hardware/claim.h", |
| 146 | "src/rp2_common/hardware_clocks/include/hardware/clocks.h", |
| 147 | "src/rp2_common/hardware_divider/include/hardware/divider.h", |
| 148 | "src/rp2_common/hardware_divider/include/hardware/divider_helper.S", |
| 149 | "src/rp2_common/hardware_gpio/include/hardware/gpio.h", |
| 150 | "src/rp2_common/hardware_irq/include/hardware/irq.h", |
| 151 | "src/rp2_common/hardware_pll/include/hardware/pll.h", |
| 152 | "src/rp2_common/hardware_resets/include/hardware/resets.h", |
| 153 | "src/rp2_common/hardware_sync/include/hardware/sync.h", |
| 154 | "src/rp2_common/hardware_timer/include/hardware/timer.h", |
| 155 | "src/rp2_common/hardware_uart/include/hardware/uart.h", |
| 156 | "src/rp2_common/hardware_vreg/include/hardware/vreg.h", |
| 157 | "src/rp2_common/hardware_watchdog/include/hardware/watchdog.h", |
| 158 | "src/rp2_common/hardware_xosc/include/hardware/xosc.h", |
| 159 | "src/rp2_common/pico_bootrom/include/pico/bootrom.h", |
| 160 | "src/rp2_common/pico_bootrom/include/pico/bootrom/sf_table.h", |
| 161 | "src/rp2_common/pico_double/include/pico/double.h", |
| 162 | "src/rp2_common/pico_float/include/pico/float.h", |
| 163 | "src/rp2_common/pico_int64_ops/include/pico/int64_ops.h", |
| 164 | "src/rp2_common/pico_malloc/include/pico/malloc.h", |
| 165 | "src/rp2_common/pico_mem_ops/include/pico/mem_ops.h", |
| 166 | "src/rp2_common/pico_platform/include/pico/asm_helper.S", |
| 167 | "src/rp2_common/pico_platform/include/pico/platform.h", |
| 168 | "src/rp2_common/pico_printf/include/pico/printf.h", |
| 169 | "src/rp2_common/pico_runtime/include/pico/runtime.h", |
| 170 | "src/rp2_common/pico_stdio/include/pico/stdio.h", |
| 171 | "src/rp2_common/pico_stdio/include/pico/stdio/driver.h", |
| 172 | "src/rp2_common/pico_stdio_uart/include/pico/stdio_uart.h", |
| 173 | ], |
| 174 | copts = [ |
| 175 | "-Wno-unused-function", |
| 176 | ], |
| 177 | defines = [ |
| 178 | "LIB_PICO_BIT_OPS=1", |
| 179 | "LIB_PICO_BIT_OPS_PICO=1", |
| 180 | "LIB_PICO_DIVIDER=1", |
| 181 | "LIB_PICO_DIVIDER_HARDWARE=1", |
| 182 | "LIB_PICO_DOUBLE=1", |
| 183 | "LIB_PICO_DOUBLE_PICO=1", |
| 184 | "LIB_PICO_FLOAT=1", |
| 185 | "LIB_PICO_FLOAT_PICO=1", |
| 186 | "LIB_PICO_INT64_OPS=1", |
| 187 | "LIB_PICO_INT64_OPS_PICO=1", |
| 188 | "LIB_PICO_MALLOC=1", |
| 189 | "LIB_PICO_MEM_OPS=1", |
| 190 | "LIB_PICO_MEM_OPS_PICO=1", |
| 191 | "LIB_PICO_PLATFORM=1", |
| 192 | "LIB_PICO_PRINTF=1", |
| 193 | "LIB_PICO_PRINTF_PICO=1", |
| 194 | "LIB_PICO_RUNTIME=1", |
| 195 | "LIB_PICO_STANDARD_LINK=1", |
| 196 | "LIB_PICO_STDIO=1", |
| 197 | "LIB_PICO_STDIO_UART=1", |
| 198 | "LIB_PICO_STDLIB=1", |
| 199 | "LIB_PICO_SYNC=1", |
| 200 | "LIB_PICO_SYNC_CORE=1", |
| 201 | "LIB_PICO_SYNC_CRITICAL_SECTION=1", |
| 202 | "LIB_PICO_SYNC_MUTEX=1", |
| 203 | "LIB_PICO_SYNC_SEM=1", |
| 204 | "LIB_PICO_TIME=1", |
| 205 | "LIB_PICO_UTIL=1", |
| 206 | "PICO_COPY_TO_RAM=0", |
| 207 | "PICO_CXX_ENABLE_EXCEPTIONS=0", |
| 208 | "PICO_NO_FLASH=0", |
| 209 | "PICO_USE_BLOCKED_RAM=0", |
| 210 | ], |
| 211 | includes = [ |
| 212 | "src/boards/include", |
| 213 | "src/common/pico_base/include", |
| 214 | "src/common/pico_binary_info/include", |
| 215 | "src/common/pico_stdlib/include", |
| 216 | "src/common/pico_sync/include", |
| 217 | "src/common/pico_time/include", |
| 218 | "src/common/pico_util/include", |
| 219 | "src/rp2040/hardware_regs/include", |
| 220 | "src/rp2040/hardware_structs/include", |
| 221 | "src/rp2_common/cmsis/include", |
| 222 | "src/rp2_common/hardware_base/include", |
| 223 | "src/rp2_common/hardware_claim/include", |
| 224 | "src/rp2_common/hardware_clocks/include", |
| 225 | "src/rp2_common/hardware_divider/include", |
| 226 | "src/rp2_common/hardware_gpio/include", |
| 227 | "src/rp2_common/hardware_irq/include", |
| 228 | "src/rp2_common/hardware_pll/include", |
| 229 | "src/rp2_common/hardware_resets/include", |
| 230 | "src/rp2_common/hardware_sync/include", |
| 231 | "src/rp2_common/hardware_timer/include", |
| 232 | "src/rp2_common/hardware_uart/include", |
| 233 | "src/rp2_common/hardware_vreg/include", |
| 234 | "src/rp2_common/hardware_watchdog/include", |
| 235 | "src/rp2_common/hardware_xosc/include", |
| 236 | "src/rp2_common/pico_bootrom/include", |
| 237 | "src/rp2_common/pico_double/include", |
| 238 | "src/rp2_common/pico_float/include", |
| 239 | "src/rp2_common/pico_int64_ops/include", |
| 240 | "src/rp2_common/pico_malloc/include", |
| 241 | "src/rp2_common/pico_mem_ops/include", |
| 242 | "src/rp2_common/pico_platform/include", |
| 243 | "src/rp2_common/pico_printf/include", |
| 244 | "src/rp2_common/pico_runtime/include", |
| 245 | "src/rp2_common/pico_stdio/include", |
| 246 | "src/rp2_common/pico_stdio_uart/include", |
| 247 | ], |
| 248 | linkopts = [ |
| 249 | "-Wl,--wrap=" + fn |
| 250 | for fn in [ |
| 251 | "sprintf", |
| 252 | "snprintf", |
| 253 | "vsnprintf", |
| 254 | "__clzsi2", |
| 255 | "__clzdi2", |
| 256 | "__ctzsi2", |
| 257 | "__ctzdi2", |
| 258 | "__popcountsi2", |
| 259 | "__popcountdi2", |
| 260 | "__clz", |
| 261 | "__clzl", |
| 262 | "__clzll", |
| 263 | "__aeabi_idiv", |
| 264 | "__aeabi_idivmod", |
| 265 | "__aeabi_ldivmod", |
| 266 | "__aeabi_uidiv", |
| 267 | "__aeabi_uidivmod", |
| 268 | "__aeabi_uldivmod", |
| 269 | "__aeabi_dadd", |
| 270 | "__aeabi_ddiv", |
| 271 | "__aeabi_dmul", |
| 272 | "__aeabi_drsub", |
| 273 | "__aeabi_dsub", |
| 274 | "__aeabi_cdcmpeq", |
| 275 | "__aeabi_cdrcmple", |
| 276 | "__aeabi_cdcmple", |
| 277 | "__aeabi_dcmpeq", |
| 278 | "__aeabi_dcmplt", |
| 279 | "__aeabi_dcmple", |
| 280 | "__aeabi_dcmpge", |
| 281 | "__aeabi_dcmpgt", |
| 282 | "__aeabi_dcmpun", |
| 283 | "__aeabi_i2d", |
| 284 | "__aeabi_l2d", |
| 285 | "__aeabi_ui2d", |
| 286 | "__aeabi_ul2d", |
| 287 | "__aeabi_d2iz", |
| 288 | "__aeabi_d2lz", |
| 289 | "__aeabi_d2uiz", |
| 290 | "__aeabi_d2ulz", |
| 291 | "__aeabi_d2f", |
| 292 | "sqrt", |
| 293 | "cos", |
| 294 | "sin", |
| 295 | "tan", |
| 296 | "atan2", |
| 297 | "exp", |
| 298 | "log", |
| 299 | "ldexp", |
| 300 | "copysign", |
| 301 | "trunc", |
| 302 | "floor", |
| 303 | "ceil", |
| 304 | "round", |
| 305 | "sincos", |
| 306 | "asin", |
| 307 | "acos", |
| 308 | "atan", |
| 309 | "sinh", |
| 310 | "cosh", |
| 311 | "tanh", |
| 312 | "asinh", |
| 313 | "acosh", |
| 314 | "atanh", |
| 315 | "exp2", |
| 316 | "log2", |
| 317 | "exp10", |
| 318 | "log10", |
| 319 | "pow", |
| 320 | "powint", |
| 321 | "hypot", |
| 322 | "cbrt", |
| 323 | "fmod", |
| 324 | "drem", |
| 325 | "remainder", |
| 326 | "remquo", |
| 327 | "expm1", |
| 328 | "log1p", |
| 329 | "fma", |
| 330 | "__aeabi_lmul", |
| 331 | "__aeabi_fadd", |
| 332 | "__aeabi_fdiv", |
| 333 | "__aeabi_fmul", |
| 334 | "__aeabi_frsub", |
| 335 | "__aeabi_fsub", |
| 336 | "__aeabi_cfcmpeq", |
| 337 | "__aeabi_cfrcmple", |
| 338 | "__aeabi_cfcmple", |
| 339 | "__aeabi_fcmpeq", |
| 340 | "__aeabi_fcmplt", |
| 341 | "__aeabi_fcmple", |
| 342 | "__aeabi_fcmpge", |
| 343 | "__aeabi_fcmpgt", |
| 344 | "__aeabi_fcmpun", |
| 345 | "__aeabi_i2f", |
| 346 | "__aeabi_l2f", |
| 347 | "__aeabi_ui2f", |
| 348 | "__aeabi_ul2f", |
| 349 | "__aeabi_f2iz", |
| 350 | "__aeabi_f2lz", |
| 351 | "__aeabi_f2uiz", |
| 352 | "__aeabi_f2ulz", |
| 353 | "__aeabi_f2d", |
| 354 | "sqrtf", |
| 355 | "cosf", |
| 356 | "sinf", |
| 357 | "tanf", |
| 358 | "atan2f", |
| 359 | "expf", |
| 360 | "logf", |
| 361 | "ldexpf", |
| 362 | "copysignf", |
| 363 | "truncf", |
| 364 | "floorf", |
| 365 | "ceilf", |
| 366 | "roundf", |
| 367 | "sincosf", |
| 368 | "asinf", |
| 369 | "acosf", |
| 370 | "atanf", |
| 371 | "sinhf", |
| 372 | "coshf", |
| 373 | "tanhf", |
| 374 | "asinhf", |
| 375 | "acoshf", |
| 376 | "atanhf", |
| 377 | "exp2f", |
| 378 | "log2f", |
| 379 | "exp10f", |
| 380 | "log10f", |
| 381 | "powf", |
| 382 | "powintf", |
| 383 | "hypotf", |
| 384 | "cbrtf", |
| 385 | "fmodf", |
| 386 | "dremf", |
| 387 | "remainderf", |
| 388 | "remquof", |
| 389 | "expm1f", |
| 390 | "log1pf", |
| 391 | "fmaf", |
| 392 | "malloc", |
| 393 | "calloc", |
| 394 | "free", |
| 395 | "memcpy", |
| 396 | "memset", |
| 397 | "__aeabi_memcpy", |
| 398 | "__aeabi_memset", |
| 399 | "__aeabi_memcpy4", |
| 400 | "__aeabi_memset4", |
| 401 | "__aeabi_memcpy8", |
| 402 | "__aeabi_memset8", |
| 403 | "printf", |
| 404 | "vprintf", |
| 405 | "puts", |
| 406 | "putchar", |
| 407 | "getchar", |
| 408 | ] |
| 409 | ] + [ |
| 410 | "-Wl,-z,max-page-size=4096", |
| 411 | ], |
| 412 | target_compatible_with = [ |
| 413 | "@platforms//os:none", |
| 414 | "//tools/platforms/hardware:cortex_m0plus", |
| 415 | ], |
| 416 | visibility = ["//visibility:public"], |
| 417 | deps = [ |
| 418 | "//third_party/pico-sdk/src/rp2_common/boot_stage2:boot_stage2_header", |
| 419 | ], |
| 420 | ) |