google / google/CFU-Playground

Switch to newlib

Open
#142 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Verilog
Stars
565
Forks
160
PR merge metrics
No merged PRs in 30d

Description

@danc86 points out that the way CFU-Playground currently builds mixes some elements of GCC's library with LiteX's libbase. In particular, some headers come from LiteX, and some from GCC, while linking has both libbase and GCC's libraries.

In order to avoid subtle bugs, we should find some way to compile the LiteX app without libbase. I believe newlib is the library shipped with riscv64-gcc.

Challenges:
- I/O routines in libbase should be extracted to another codebase. In particular, UART routines.
- Still need access to files in include/generated, both the linker scripts and header files.
- To fully port newlib, need implment "syscall" functions as described in [the Sycalls section of the newlib manual](https://sourceware.org/newlib/libc.html#Syscalls) and William Gatliff's [Porting and Using Newlib in Embedded Systems](https://www.cs.ccu.edu.tw/~pahsiung/courses/esd/resources/newlib.pdf)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.