8000 Replacing stm/string0.c with code from the musl c library · Issue #15 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
Replacing stm/string0.c with code from the musl c library  #15
Closed
@hagenkaye

Description

@hagenkaye

In the musl branch. cherry-pick these commits

7741268
7990eba
347280b
69b723e
18a48f8
2ae7f77

Summary of commits

The copyright/readme from musl was copied to micromusl, then a small edit to the README was made to describe the micromusl directory.

The original make system that musl uses has some steps that build header files and such, so some header files were copied over to the micromusl directory to satisfy the build system.

Some changes were made to the Makefile to include the same CFLAGS that stm uses to build.

Then a select handful of c files from src/string were brought over, these are the functions that micromusl replaces in stm/string0.c

Finally the stm/Makefile was altered to remove string0.c and to link against the libc.a archive in micromusl.

How to build/test (assumes cross compiler in your $PATH)

cd micromusl
export CROSS_COMPILE=arm-none-eabi-
./configure --disable-shared --prefix=build
make
make install
cd ../stm
make clean
make

Should build a binary that can be uploaded with dfu-utils

Quickly tested here. Comments and questions welcome.

Note: this is a first run preliminary test, not ready to merge with master, until fully tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0