Link with libagbabi.a
via the normal means for your build environment (eg: -Lagbabi
for GCC and Clang), and add the include
directory via the normal means for your build environment (eg: -Iagbabi/include
).
Linking will implicitly activate the armeabi
library.
Include the armeabi.h
and agbabi.h
headers to access the armeabi
and agbabi
C functions.
#include <aeabi.h>
#include <agbabi.h>
#include <sys/ucontext.h> /* POSIX context switching */
int main() {
unsigned int a = __aeabi_uidiv(9u, 3u);
int b = __agbabi_sqrt(25u);
ucontext_t c;
getcontext(&c);
return 0;
}
- Arm Standard Compiler Helper Function Library (aeabi)
- AGB Support Library (agbabi)
- POSIX Support Library
Requires gcc-arm-none-eabi
cross compiler, and either cmake
or meson
for configuration.
To cross-build libagbabi.a
in directory build/
:
cmake -S . -B build --toolchain=cross/agb.cmake
cmake --build build
To cross-build libagbabi.a
in directory build/
:
meson setup build --cross-file=cross/agb.ini
meson compile -C build