5
5
The goal of this project is to build C and C++ standard libraries for use with the
6
6
Raspberry Pi bare metal environment [ Circle] ( https://github.com/rsta2/circle ) .
7
7
8
- [ Newlib] ( https://sourceware.org/newlib/ ) is used as the standard C library.
8
+ [ Newlib] ( https://sourceware.org/newlib/ ) is used as the standard C library. The fork
9
+ [ circle-newlib] ( https://github.com/smuehlst/circle-newlib ) contains the changes for
10
+ building Newlib in combination with Circle.
9
11
10
12
## Getting Started
11
13
@@ -25,6 +27,23 @@ cd circle-stdlib
25
27
./build.bash
26
28
```
27
29
30
+ The ` build.bash ` script has the following options:
31
+
32
+ ```
33
+ $ ./build.bash -h
34
+ usage: build.bash [ <option> ... ]
35
+ Build Circle with newlib standard C library.
36
+
37
+ Options:
38
+ -c, --clean clean build results and exit
39
+ -d, --debug build with debug information, without optimizer
40
+ -h, --help show usage message
41
+ -r <number>, --raspberrypi <number>
42
+ Circle Raspberry Pi model number (1, 2, 3, default: 1)
43
+ -s <path>, --stddefpath <path>
44
+ path where stddef.h header is located
45
+ ```
46
+
28
47
### Building a Sample Program
29
48
30
49
```
37
56
As a first step Newlib is built without any system calls being implemented. This means that
38
57
all features that do not depend on system calls should work (e.g. math functions,
39
58
` setjmp ` /` longjmp ` , ` bsearch ` , ` qsort ` ), but everything that depends on "system calls" like
40
- ` open ` , ` read ` etc. does not work and return errors (e.g. stdio functions).
59
+ ` open ` , ` read ` etc. does not work and returns errors (e.g. stdio functions).
41
60
42
61
## License
43
62
0 commit comments