1/* 2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7#include "hardware/platform_defs.h" 8#include "pico/config.h" 9 10#define WRAPPER_FUNC_NAME(x) __wrap_##x 11#define SECTION_NAME(x) .text.##x 12#define RAM_SECTION_NAME(x) .time_critical.##x 13#define rom_table_code(c1, c2) ((c1) | ((c2) << 8)) 14 15// do not put align in here as it is used mid function sometimes 16.macro regular_func x 17.global \x 18.type \x,%function 19.thumb_func 20\x: 21.endm 22 23.macro regular_func_with_section x 24.section .text.\x 25regular_func \x 26.endm 27 28// do not put align in here as it is used mid function sometimes 29.macro wrapper_func x 30regular_func WRAPPER_FUNC_NAME(\x) 31.endm 32 33.macro __pre_init func, priority_string 34.section .preinit_array.\priority_string 35.align 2 36.word \func 37.endm 38 39