https://github.com/smuehlst/circle-stdlib
Standard C and C++ Library Support for Circle
https://github.com/smuehlst/circle-stdlib
baremetal c c-plus-plus circle circle-mbedtls circle-newlib circle-stdlib gcc-arm mbed-tls newlib raspberrypi
Last synced: 5 months ago
JSON representation
Standard C and C++ Library Support for Circle
- Host: GitHub
- URL: https://github.com/smuehlst/circle-stdlib
- Owner: smuehlst
- License: gpl-3.0
- Created: 2017-05-07T19:40:38.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2026-01-14T21:41:19.000Z (5 months ago)
- Last Synced: 2026-01-15T02:59:28.541Z (5 months ago)
- Topics: baremetal, c, c-plus-plus, circle, circle-mbedtls, circle-newlib, circle-stdlib, gcc-arm, mbed-tls, newlib, raspberrypi
- Language: C
- Homepage:
- Size: 1020 KB
- Stars: 115
- Watchers: 11
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# circle-stdlib
[](https://codeberg.org/larchcone/circle-stdlib/actions?workflow=smoketest.yaml)
[](https://codeberg.org/larchcone/circle-stdlib/actions?workflow=smoketest.yaml)
[](https://codeberg.org/larchcone/circle-stdlib/issues?state=open)
[](https://codeberg.org/larchcone/circle-stdlib/issues?state=closed)
## Project Home
This project moved from GitHub to **Codeberg**.
**Canonical repository:** https://codeberg.org/larchcone/circle-stdlib.git
Issues and pull requests need to be submitted on Codeberg.
The GitHub repository https://github.com/smuehlst/circle-stdlib.git is a read-only
mirror. Pull requests on GitHub will be closed with a
corresponding remark without further action.
For transitioning from GitHub to Codeberg the remote must be switched for
the [circle-stdlib](https://codeberg.org/larchcone/circle-stdlib)
and [circle-newlib](https://codeberg.org/larchcone/circle-newlib) repositories:
```bash
git remote set-url origin https://codeberg.org/larchcone/circle-stdlib.git
cd libs/circle-newlib
git remote set-url origin https://codeberg.org/larchcone/circle-newlib.git
```
## Overview
The goal of this project is to provide C and C++ standard library support for the
Raspberry Pi bare-metal environment [Circle](https://github.com/rsta2/circle).
[Newlib](https://sourceware.org/newlib/) is used as the standard C library. The fork
[circle-newlib](https://codeberg.org/larchcone/circle-newlib) contains the changes for
building Newlib in combination with Circle.
[mbed TLS](https://tls.mbed.org/) can optionally be used for TLS connections in
Circle (call configure with `--opt-tls`, see also the
[README file for circle-mbedtls](circle-mbedtls.md)).
## Getting Started
### Prerequisites
A toolchain from [Arm GNU Toolchain Downloads](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads):
* gcc 14.3.Rel1 hosted on Intel Linux or Windows Subsystem for Linux (WSL/WSL2):
* [AArch32 bare-metal target (arm-none-eabi)](https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz)
* [AArch64 ELF bare-metal target (aarch64-none-elf)](https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-x86_64-aarch64-none-elf.tar.xz)
* gcc 14.3.Rel1 hosted on AArch64 Linux:
* [AArch32 bare-metal target (arm-none-eabi)](https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-aarch64-arm-none-eabi.tar.xz)
* [AArch64 ELF bare-metal target (aarch64-none-elf)](https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-aarch64-aarch64-none-elf.tar.xz)
### Building the Libraries
Add the toolchain to the path, then:
```bash
git clone --recursive https://codeberg.org/larchcone/circle-stdlib.git
cd circle-stdlib
./configure
make
```
This configures the build for the default 32-bit toolchain with the `arm-none-eabi-` prefix.
The `configure` script has the following options:
```bash
$ ./configure -h
usage: configure [ ... ]
Configure Circle with newlib standard C library and mbed TLS library.
Options:
-d, --debug build with debug information, without optimizer
-h, --help show usage message
-n, --no-cpp do not support C++ standard library
-o, --option [=] additional preprocessor define (optionally with value)
can be repeated
--opt-tls build with mbed TLS support
-p , --prefix prefix of the toolchain commands (default: arm-none-eabi-)
--qemu build for running under QEMU in semihosting mode
-r , --raspberrypi
Circle Raspberry Pi model number (1, 2, 3, 4, 5, default: 1)
--softfp use float ABI setting "softfp" instead of "hard"
-s , --stddefpath
path where stddef.h header is located (only necessary
if script cannot determine it automatically)
```
To clean the project directory, the following commands can be used:
```bash
make clean
make mrproper # removes the configuration too
```
### Building the Samples
```bash
make build-samples
```
### Running and Debugging the Programs
The resulting executables are normal Circle bare-metal applications. Circle's
standard [installation](https://github.com/rsta2/circle#installation)
and [debugging](https://github.com/rsta2/circle/blob/master/doc/debug.txt)
instructions apply.
For running the programs under QEMU see Circle's corresponding
[notes on QEMU](https://github.com/rsta2/circle/blob/master/doc/qemu.txt).
## Release History
See [CHANGELOG.md](CHANGELOG.md).
## License
This project is licensed under the GNU GENERAL PUBLIC LICENSE
Version 3 - see the [LICENSE](LICENSE) file for details
## Acknowledgements
* Rene Stange for [Circle](https://github.com/rsta2/circle).
* The Newlib team for [Newlib](https://sourceware.org/newlib/).
* The mbed TLS team for [mbed TLS](https://tls.mbed.org/).