Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixjones/agbabi
Provides GBA optimized functions for some common, handy operations.
https://github.com/felixjones/agbabi
Last synced: 2 months ago
JSON representation
Provides GBA optimized functions for some common, handy operations.
- Host: GitHub
- URL: https://github.com/felixjones/agbabi
- Owner: felixjones
- License: other
- Created: 2021-01-14T21:45:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-10T12:16:48.000Z (8 months ago)
- Last Synced: 2024-10-16T02:58:33.741Z (3 months ago)
- Language: C
- Size: 171 KB
- Stars: 68
- Watchers: 7
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-gba-dev-zh - 阿格巴比
- awesome-gbadev - agbabi - Drop-in application binary interface library (context switching, division, irq, memcpy, sine). (Libraries / Other places)
README
# 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.
```c
#include
#include
#include /* 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
- [Arm Standard Compiler Helper Function Library (aeabi)](docs/aeabi.md)
- [AGB Support Library (agbabi)](docs/agbabi.md)
- [POSIX Support Library](docs/posix.md)## 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/`:
```shell
cmake -S . -B build --toolchain=cross/agb.cmake
cmake --build build
```### Meson 0.56.2+
To cross-build `libagbabi.a` in directory `build/`:
```shell
meson setup build --cross-file=cross/agb.ini
meson compile -C build
```