Giter VIP home page Giter VIP logo

newlib-nano-1.0's Introduction

newlib-nano-1.0

The newlib-nano is an open source C library (libc) targeting embedded microcontrollers (MCU). Implementation focus is on code and data size reduction through optimization and removal of non-MCU features.

It was originally developed for ARM Cortex-M based MCUs as a part of the GNU Tools for ARM Embedded Processors see this link for more details.

newlib-nano is a derivative of the well known newlib C library for embedded systems.

This project goal is to enhance newlib-nano with additional features and extend support to additional MCU families.

For ready to use downloads see the 32bitmicro web site.

newlib-nano-1.0's People

Contributors

32bitmicro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newlib-nano-1.0's Issues

realloc copies too much data

The nano_realloc() function in newlib/libc/stdlib/mallocr.c does a memcpy with size equal
to the realloc parameter 'size', this can be a problem as we are copying from the original location more data than needed with the risk of triggering some faults in case the access to that memory is protected or not accessible. The implementation should use the old size for copying when the size increases.

Diff with upstram newlib

It'd be great to see in revision history what is the difference from newlib upstream tree... What I would do is

  1. check in the newlib as is first with revision hash in commit message
  2. copy over the changes and make another commit.
    This way it's would easier to maintain the fork on let others diff it easily between the initial check-in and the head.

Although, it would be a good idea to try and pull-request your changes into upstream with preprocessor directives around the parts you consider cutting out.

putchar not initializing _REENT struct

The putchar macro is not calling the __sinit() function.
If putchar is called before any call to stdio function calling __sinit() (like printf()) ; putchar attemps to write into the const struct __sf_fake_stdout.

wrong implementation of __mulhi3

This is current implementation in code base:
image

if a is an even integer or any integer with 0s at lower significant followed by 1s. then it will end up in an infinite loop.

Correct code should be

while(a)
{
    if (a & 1) r += b;
    b <<= 1;
    a >>= 1;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.