• C 54%
  • Assembly 39%
  • CMake 3.4%
  • Meson 2.2%
  • PHP 1.4%
Find a file
2024-05-10 14:16:48 +02:00
cross Meson and CMake small cross build scripts 2023-02-26 03:15:13 +01:00
docs Doc improvement 2023-07-23 16:51:14 +02:00
include Added __agbabi_poll_ewram for detecting "overclockable" EWRAM 2023-07-16 20:24:43 +02:00
source rtc: Fix newlib-specific reentrancy include. 2024-05-10 14:16:48 +02:00
test Add failing memset test case 2023-03-14 22:12:59 +01:00
CMakeLists.txt Updated agbabi to 2.1.6 2023-12-10 13:31:50 +01:00
LICENSE.md Refactoring agbabi 2022-01-07 14:06:26 +00:00
meson.build Updated agbabi to 2.1.6 2023-12-10 13:31:50 +01:00
README.md Clean ups and documentation. 2023-02-26 19:28:57 +01:00

AGB ABI Library (agbabi)

Quick Start Guide

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;
}

API Reference

Building

Requires gcc-arm-none-eabi cross compiler, and either cmake or meson for configuration.

CMake 3.18+

To cross-build libagbabi.a in directory build/:

cmake -S . -B build --toolchain=cross/agb.cmake
cmake --build build

Meson 0.56.2+

To cross-build libagbabi.a in directory build/:

meson setup build --cross-file=cross/agb.ini
meson compile -C build