Skip to content
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

Using newlib-nano libraries with LPCXpresso #52

Closed
dinau opened this issue Sep 1, 2013 · 0 comments
Closed

Using newlib-nano libraries with LPCXpresso #52

dinau opened this issue Sep 1, 2013 · 0 comments

Comments

@dinau
Copy link
Contributor

dinau commented Sep 1, 2013

Hi, all

I've been successful to use the newlib-nano libraries with LPCXpresso compiler (GCC_CR).
This is highly experimental,
but some simple example programs ("ticker" and "basic") work well at this moment.

  1. First, needed for the newlib-nano libraries included in
    Launchpad GCC
    https://launchpad.net/gcc-arm-embedded
    I'm using Ver.4.7-2013q2.
  2. Copy the newlib-nano libraries to the library folder of LPCXpresso.
    Assume that Launchpad GCC root folder name is "launchpad-gcc-root" and
    LPCXpresso root folder name is "lpxpresso-root".

(1) nano.specs file
[copy] launchpad-gcc-root/arm-none-eabi/armv7-m/nano.specs
[to] lpcxpresso-root/lpcxpresso/tools/arm-none-eabi/lib/

(2) Each libraries
i.e. for Cortex-M3 micros
[copy] launchpad-gcc-root/arm-none-eabi/lib/armv7-m/*_s.a
[to] lpcxpresso-root/lpcxpresso/tools/arm-none-eabi/lib/armv7-m/

i.e. for Cortex-M0 micros
[copy] launchpad-gcc-root/arm-none-eabi/lib/armv6-m/*_s.a
[to] lpcxpresso-root/lpcxpresso/tools/arm-none-eabi/lib/armv6-m/

Adding "--specs=nano.specs" option to the linker script option.

[workspace_tools/toolchains/gcc.py]:

    class GCC_CR(GCC):
        def __init__(self, target, options=None, notify=None):
            GCC.__init__(self, target, options, notify, GCC_CR_PATH)

            additional_compiler_flags = [
                "-D__NEWLIB__", "-D__CODE_RED", "-D__USE_CMSIS", "-DCPP_USE_HEAP",
            ]
            self.cc += additional_compiler_flags
            self.cppc += additional_compiler_flags
            if "nanolib" in self.options:
                # Use latest gcc nanolib
                self.ld.append("--specs=nano.specs")
                if target.name in ["LPC1768"]:
                    self.ld.extend(["-u", "_printf_float", "-u", "_scanf_float"])
            self.ld += ["-nostdlib"]

Building "basic" test program with newlib-nano libraries

    $ workspace_tools/build.py -m LPC1768 -t GCC_CR
    $ workspace_tools/make.py  -m LPC1768 -t GCC_CR -d. -p 0 -o nanolib

dinau

@dinau dinau closed this as completed Mar 19, 2014
SeppoTakalo pushed a commit that referenced this issue Oct 5, 2016
…69..31e338c

31e338c Use temp variable in mutex release loop (#52)

git-subtree-dir: features/FEATURE_COMMON_PAL/mbed-trace
git-subtree-split: 31e338c23934491fcb852ee4d2788d34851d01a2
adbridge pushed a commit that referenced this issue Oct 10, 2016
…69..31e338c

31e338c Use temp variable in mutex release loop (#52)

git-subtree-dir: features/FEATURE_COMMON_PAL/mbed-trace
git-subtree-split: 31e338c23934491fcb852ee4d2788d34851d01a2
hasnainvirk pushed a commit to hasnainvirk/mbed-os that referenced this issue Feb 12, 2017
… from a1982c1..e125164

e125164 Check secure session pointer in timer callback (ARMmbed#61)
f49e596 Update unit tests (ARMmbed#59)
6a5634a Support for multiple virtual services (ARMmbed#58)
7fe6b98 Remove yotta files (ARMmbed#57)
5c5c8fe Fix socket send return value overflow (ARMmbed#56)
0870d05 Update unit test stubs to match latest socket api (ARMmbed#55)
e687be8 Merge pull request ARMmbed#54 from ARMmbed/warn_fixes
b8fe613 updated unittests
8640d05 Compilation warnings fixed
eea83e5 Flag out entropy source addition (ARMmbed#53)
7d72eb4 Fix unittests (ARMmbed#52)
4a6991e Avoid referencing ns_msghdr_t::flags

git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service
git-subtree-split: e125164
cmonr pushed a commit that referenced this issue May 24, 2018
linlingao pushed a commit to linlingao/mbed-os that referenced this issue Jul 12, 2019
* GPIO port

* fixed hw_types

* delete TODO

* remove ARCM_BASE

* fixed naming issue

* possible fixed for LED3

* working GPIO

* GPIO is working

* add function for gpio_is_connected

* fixed PinMode bug

*  GPIO IRQ done

*  fixed an gpio irq bug

* uncommented reserved pins because they are causing problem when calling pinmap_peripheral

*  fixed perip

* updated peripheral

* irq

* fixed irq

* fixed irq

* fixed irq

* fixed irq

* updated: GPIO IRQ and GPIO working and passed CI test

* fixed irqn offset

* analogIn
pan- pushed a commit to pan-/mbed that referenced this issue May 29, 2020
EddystoneService: warn if targeting a chipset that does not have non-volatile memory configured
pan- added a commit to pan-/mbed that referenced this issue May 29, 2020
Updating mbed-os to mbed-os-5.3.5
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