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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hagenkaye opened this issue Dec 31, 2013 · 2 comments
Closed

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

hagenkaye opened this issue Dec 31, 2013 · 2 comments

Comments

@hagenkaye
Copy link
Contributor

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.

@hagenkaye
Copy link
Contributor Author

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.

@hagenkaye
Copy link
Contributor Author

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

tannewt referenced this issue in tannewt/circuitpython Oct 21, 2016
Support SSD1306 with hardware I2C interface. Closes #15
drrk pushed a commit to drrk/micropython that referenced this issue Jan 22, 2017
tannewt referenced this issue in tannewt/circuitpython Jul 28, 2020
retryfail pushed a commit to retryfail/micropython that referenced this issue Aug 20, 2020
gccollect: Add registers to the root pointer scan
xiaoxiang781216 pushed a commit to xiaoxiang781216/micropython that referenced this issue Jan 11, 2021
Add support for multiple scripts (and add new parameter `script_startup`)
WeActStudio pushed a commit to WeActStudio/micropython that referenced this issue Feb 14, 2021
mattytrentini referenced this issue in mattytrentini/micropython Jul 1, 2021
* Add DMA for SPI Module and IRQ for Pins

* replace mp_none_ptr with new version

* MP_ERROR_TEXT makro for error messages

* Update Makefile

Co-authored-by: Raphael <40037381+rk-exxec@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0