Skip to content

Replacing stm/string0.c with code from the musl c library  #15

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.

Activity

  1. hagenkaye commented on Jan 1, 2014

    @hagenkaye
    ContributorAuthor

    I'm rethinking on how to get the changes back into micro python. Cherry picking them from a branch is probably not the best way to go about this.

    dpgeorge#9 (comment)

    Seems it would be easier to put the micromusl specific code in a separate repo and then do pull requests on code that goes into micro python.

    I can see this becoming a hand merge nightmare as the project continues.

  2. hagenkaye commented on Jan 1, 2014

    @hagenkaye
    ContributorAuthor

    I'm closing this issue, as a new method of bringing in changes is being developed.

  3. added a commit that references this issue on Oct 21, 2016
    6fe8c7b
  4. added a commit that references this issue on Jan 22, 2017
  5. added a commit that references this issue on Jul 28, 2020
  6. added a commit that references this issue on Aug 20, 2020
  7. added a commit that references this issue on Jan 11, 2021
  8. added a commit that references this issue on Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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