diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-10-24 19:41:55 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-11-13 14:25:59 -0500 |
commit | c75eb53c0c6d81631849cfc49eba9b2efa93ddfb (patch) | |
tree | 27988b27e73ebd62d3e3325886a11e67c131c1de /lib/pico-sdk/rp2040/pico/asm_helper.S | |
parent | 9f328cab9536d73df697b325fab13dd7eb550522 (diff) | |
download | kutter-c75eb53c0c6d81631849cfc49eba9b2efa93ddfb.tar.gz kutter-c75eb53c0c6d81631849cfc49eba9b2efa93ddfb.tar.xz kutter-c75eb53c0c6d81631849cfc49eba9b2efa93ddfb.zip |
lib: Update lib/rp2040 to v2.0.0 SDK release
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'lib/pico-sdk/rp2040/pico/asm_helper.S')
-rw-r--r-- | lib/pico-sdk/rp2040/pico/asm_helper.S | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/pico-sdk/rp2040/pico/asm_helper.S b/lib/pico-sdk/rp2040/pico/asm_helper.S new file mode 100644 index 00000000..59c67db1 --- /dev/null +++ b/lib/pico-sdk/rp2040/pico/asm_helper.S @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +//#include "pico.h" + +# note we don't do this by default in this file for backwards comaptibility with user code +# that may include this file, but not use unified syntax. Note that this macro does equivalent +# setup to the pico_default_asm macro for inline assembly in C code. +.macro pico_default_asm_setup +.syntax unified +.cpu cortex-m0plus +.thumb +.endm + +// do not put align in here as it is used mid function sometimes +.macro regular_func x +.global \x +.type \x,%function +.thumb_func +\x: +.endm + +.macro weak_func x +.weak \x +.type \x,%function +.thumb_func +\x: +.endm + +.macro regular_func_with_section x +.section .text.\x +regular_func \x +.endm + +// do not put align in here as it is used mid function sometimes +.macro wrapper_func x +regular_func WRAPPER_FUNC_NAME(\x) +.endm + +.macro weak_wrapper_func x +weak_func WRAPPER_FUNC_NAME(\x) +.endm + +# backwards compatibility +.macro __pre_init func, priority_string +.section .preinit_array.\priority_string +.p2align 2 +.word \func +.endm |