Commit Graph

3383 Commits (07872bcd3a357fc6de9d21a20f26d71ab7f0effd)

Author SHA1 Message Date
MarceloSalazar a15f6a43ad General clean-up of unsupported targets 2020-04-09 15:36:21 +01:00
MarceloSalazar e43ece13aa Rename EMW3166 target 2020-04-09 15:32:41 +01:00
Martin Kojtal 62cac3b640
Merge pull request #12712 from jamesbeyond/lto-printf
Fix LTO issue with minimal-printf
2020-04-01 12:22:52 +02:00
Martin Kojtal d0917b0ec7
Merge pull request #12630 from jeromecoutant/PR_TEST_DUALCORE
mbed test with dual core targets
2020-03-31 09:29:37 +02:00
Qinghao Shi 5822903992 update lto profile including printf wrap functions 2020-03-29 20:55:08 +01:00
Anna Bridge 83926138aa
Merge pull request #11726 from kjbracey-arm/armc6_no_static_destructors
Disable C++ static destructors in ARMC6 compiler
2020-03-27 14:14:00 +00:00
Anna Bridge 1bbcaec04a
Merge pull request #12683 from kivaisan/socketaddress_refactor
SocketAddress rework
2020-03-27 11:30:12 +00:00
Martin Kojtal 2d10d670d0
Merge pull request #12640 from evedon/ed-mprintf-profile
Remove minimal-printf extension profile
2020-03-26 14:50:13 +01:00
Martin Kojtal b5f00bc67a
Merge pull request #12679 from vmedcy/psoc6-export
PSoC6: enable export to uVision and IAR
2020-03-26 09:09:35 +01:00
Kevin Bracey 1ecd9604f6 Disable C++ static denstructors in ARMC6 compiler
We disable C++ static destructors as best as possible in the various
toolchains, trying to eliminate unwanted destructor code. We don't want
to waste RAM or ROM on the C++-standard-specified behaviour of running
all statically-constructed objects' destructors in reverse order on
exit; we're never going to perform an orderly exit.

Techniques used include:

* `SingletonPtr` - makes an object be "lazily constructed" on first use,
  and also eliminates its destructor. Lazy construction adds ROM+RAM
  overhead.
* `__eabi_atexit` is stubbed out, preventing RAM usage by run-time
  registration of static destructors.
* GCC has `exit` wrapped to kill shutdown code
* IAR has static destructors disabled in the compiler flags

Killing static destructors in the compiler is the optimum; if we only
stub out `__eabi_atexit`, the compiler is still inserting calls to it,
and referencing the destructors in those call.

Clang 8 added the compiler option `-fno-c++-static-destructors` (and the
object attributes `[[clang::no_destroy]]` and
`[[clang::always_destroy]]` for fine control).

We can hence enable that option in ARMC6 tool profiles, matching IAR.

This option appears to exist in ARM Compiler 6.11, but generates an
apparently spurious linker error about `EthernetInterface`. It works in
ARM Compiler 6.13, so this PR needs to wait until the compiler is
updated.
2020-03-24 15:30:39 +00:00
Kevin Bracey 4eda58893e SocketAddress rework
* Add optimised constexpr default constructor. Default construction
  was previously by a heavyweight defaulted `nsapi_addr_t` parameter.
* Remove deprecated resolving constructor.
* Take `nsapi_addr_t` inputs by constant reference rather than value.
* Inline the trivial getters and setters.
* Use `unique_ptr` to manage the text buffer.
* Make `operator bool` explicit.
* Optimise some methods.
* Update to C++11 style (default initialisers, nullptr etc)
2020-03-24 11:05:33 +02:00
jeromecoutant 6c57c9fd67 mbed test with dual core targets
For Dual Core targets, there are in fact 2 sub-targets, CM4 and CM7 targets.
This allows to execute tests with boards detected by mbedls.
2020-03-24 09:53:36 +01:00
Volodymyr Medvid 0ac62d0317 PSoC6: enable export to uVision and IAR 2020-03-23 20:08:30 +01:00
Rajkumar Kanagaraj 7761d45643 Remove deprecated ARMC5 from `mbed compile -S` command output 2020-03-23 07:28:32 -07:00
Volodymyr Medvid 26043e5ee4
makefile export: create .link_options.txt with echo
$(file > $@.in, $(filter %.o, $^)) is not supported in GNU Make 3.81.
Create the linker response file with pipe redirect from echo command.
This is tested with Cygwin make and make 3.8.1 shipped with macOS.

(cherry picked from commit 6918e6a76b)

Revert "Fixed problem with overlong command line."

This reverts commit dd02ac09a1.

See also https://github.com/ARMmbed/mbed-os/pull/12646#issuecomment-602058273
2020-03-21 20:24:28 +01:00
Anna Bridge 59540ed8c1
Merge pull request #12646 from dhebbeker/fix/fix-makefile-for-windows
Makefile: fix for overlong command line
2020-03-20 16:31:02 +00:00
David Hebbeker dd02ac09a1
Fixed problem with overlong command line.
The list of object files was so long, that it got truncated by the bash (git-bash).

Error was

    /usr/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
    /usr/bin/sh: -c: line 1: syntax error: unexpected end of file
    mingw32-make[1]: *** [Makefile:679: mbed-os-example-blinky-baremetal.elf] Error 1
    mingw32-make: *** [Makefile:26: all] Error 2

Such a problem has aleady been reported in: https://github.com/ARMmbed/mbed-os/issues/10943#issuecomment-510064805
I fixed this problem using this answer: https://stackoverflow.com/a/37506805/5534993
2020-03-18 14:40:12 +01:00
Evelyne Donnaes 1bbe3a725f Removed minimal-printf profile 2020-03-17 13:57:48 +00:00
Martin Kojtal 3710584bff
Merge pull request #12540 from JojoS62/fix-lto-unknown-messages
fix for suppress 'unknown object name' messages from memap.py
2020-03-09 08:28:44 +00:00
Martin Kojtal 37aafc9da8
Merge pull request #12476 from OpenNuvoton/nuvoton_build_no_cmsis
Fix build failure when target's cmsis doesn't exist
2020-03-03 14:19:36 +00:00
Martin Kojtal d6df32d609
Merge pull request #12526 from fkjagodzinski/fix-gcc_lto_toolchain_py3
GCC: Fix the toolchain LTO workaround for Python 3
2020-03-02 09:32:42 +00:00
JojoS62 a33d622f4f suppress 'unknown object name' messages
by using the -lto option on gcc and windows,
 many messages like above are produced.
removed by ignoring .ltrans.o files
2020-02-29 15:10:37 +01:00
Martin Kojtal fc5f3259de
Merge pull request #12458 from GaborAbonyi/add_musca_b1_platform
Add Musca B1 target
2020-02-27 13:53:58 +00:00
Filip Jagodzinski 4bd29791ee GCC: Fix the GCC_ARM_LTO_WORKAROUND for Python 3
In the Python3 version of re module, the Unicode strings (str) and 8-bit
strings (bytes) cannot be mixed.
2020-02-27 12:58:36 +01:00
Martin Kojtal 732692cd77
Merge pull request #12475 from VeijoPesonen/purge_rspif
Proposal to remove SPIFReducedBlockDevice
2020-02-25 15:23:23 +00:00
Martin Kojtal bb48fa46cd
Merge pull request #12437 from 0xc0170/dev_travis_scancode
travis: add PR license check for missing/not-valid license files
2020-02-24 15:56:07 +00:00
Veijo Pesonen b575df072f Removes RSPIF block device driver
The driver is not needed by the bootloader anymore.
2020-02-24 16:01:14 +02:00
Martin Kojtal 1b4ad98787 scancode: add logger and parse it to get count 2020-02-24 12:03:01 +00:00
Martin Kojtal adaa2b6a0a travis: license check does not fail but report issues
Master branch contains lot of missing SPDX identifiers, we will clean them up but this will take some time. In the meantime, we should not increase the license missing files. Each PR will report if there is no license issue or positive number reported as Github status. Travis won't fail if there are issues. This will highlight the issues that anyone can fix.

As soon as master is clean, we can fix set_status and revert part of this commit.
2020-02-24 12:02:37 +00:00
Anna Bridge 8c17270306
Merge pull request #12480 from 0xc0170/fix_spdx
Fix SPDX identifiers and licenses (excluding features and targets)
2020-02-21 16:34:30 +00:00
Tamas Kaman 551c3c553c Add ARM_MUSCA_B1 as a new target platform
Musca-B1 is a Cortex-M33 based target with security extension enabled.

- ARM_MUSCA_B1 is the non-secure target running mbed-os.
- ARM_MUSCA_B1_S is the secure target running TF-M.
- TF-M sources were imported and patched in previous commits.
- TF-M secure bootloader (McuBoot) for MUSCA_B1 is submitted by a
  pre-built binary.
- A post-build hook concatenates The secure and non-secure binaries,
  signs it and then concatenates the bootloader with the signed binary.

Change-Id: I4b36290941b5f0bb7aa7c12dda2f38b5c1e39ae2
Signed-off-by: Tamas Kaman <tamas.kaman@arm.com>
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
2020-02-21 14:34:39 +01:00
Martin Kojtal 37a7ff0443 scancode: skip non code files
For instance pdf, or binaries - catch them as an exception and skip for
additional SPDX check
2020-02-21 09:57:30 +00:00
Martin Kojtal 5f1c77741a tools: fix SPDX identifiers 2020-02-21 07:01:48 +00:00
Martin Kojtal 0995ece3b2 Add scancode evaluate script
The goal: check license offenders in pull request

This is similar to what astyle does in Travis. We get list of files being changed. Because scancode does not support list of files being scanned but rather a file or directory, we copy files to SCANCODE folder. Execute scancode license check in this folder and check for offenders.

The rules there are: code files must have a license and SDPX identifier. If they don't, we print these and ask for review.

It functions nicely there is just one workaround needed. SPDX is not always 100 percent correctly found, therefore we recheck file if no SPDX manually in the script. This proves to remove false positives.
2020-02-20 09:49:50 +00:00
Chun-Chieh Li 8e8b546cbf Fix build failure when target's cmsis doesn't exist
For bootloader enabled target, it needs to have cmsis pack or provide memory override. This change fixes build failure in case of no cmsis pack but providing memory override with start being zero.
2020-02-20 17:39:20 +08:00
Martin Kojtal 829a3cded3
Merge pull request #12318 from VeijoPesonen/sfdp_split_smptbl
SFDP: Move Sector Map Parameter Table parsing under SFDP module
2020-02-19 15:49:40 +00:00
Martin Kojtal 589a9a4d16
Merge pull request #12462 from maciejbocianski/fix_armc_memory_stats
Fix static ram memory statistics for arm compiler
2020-02-19 13:01:26 +00:00
Maciej Bocianski c69e77cf54 fix arm compiler static ram memory statistics
don't count ARM_LIB_HEAP in static RAM pool
2020-02-19 08:18:34 +01:00
Filip Jagodzinski 56255adb9f Tools: Add a workaround for the GCC_ARM & LTO bug
This is a workaround for the GCC not using the strong symbols from
C files to override the weak symbols from ASM files. This GCC bug is only
present when building with the link-time optimizer (LTO) enabled. For
more details please see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83967

This can be fixed by changing the order of object files in the linker
command; objects providing the weak symbols and compiled from assembly
must be listed before the objects providing the strong symbols.
To keep things simple, ALL object files from ASM are listed before
other object files.
2020-02-13 17:47:40 +01:00
Filip Jagodzinski b03f974d03 GCC: Move link-time optimizer flags to extensions dir
Disable the lto for the default develop and release prifiles and move
the flags to tools/profiles/extensions/lto.json profile.

Usage:
mbed compile --profile release --profile tools/profiles/extensions/lto.json
2020-02-13 16:39:20 +01:00
Filip Jagodzinski 3e3bee4a21 GCC: Add the -u flag to keep the main() symbol
This fixes the undefined reference to 'main' that arose after adding
the "-flto" flag to compilation.

This was the case for combined "-Wl,--wrap,main" and "-flto" flags.
2020-02-13 16:39:20 +01:00
Filip Jagodzinski 516153e033 GCC: Enable link-time optimizer for develop profile 2020-02-13 16:39:20 +01:00
Filip Jagodzinski a5240da3b4 GCC: Use 'common' flags at link time
According to GCC man:
To use the link-time optimizer, -flto and optimization options should be
specified at compile time and during the final link. It is recommended
that you compile all the files participating in the same link with the
same options and also specify those options at link time.

Additionally, move the '-g3' flag out of 'common' flags in the debug
profile. Although the '-g' is correctly ignored by the linker, the
'-glevel' is not and causes a build error "ld: unrecognized option
'-g3'".
2020-02-13 16:39:20 +01:00
Filip Jagodzinski f87a8e0f52 GCC: Enable link-time optimizer for release profile 2020-02-13 16:39:19 +01:00
Mark Edgeworth 2ad6f45d83 Fix #12290: crash_log_parser on py3 2020-02-12 14:56:35 +00:00
Rajkumar Kanagaraj 03d57b7ba2 Add the exception in Mbed OS build tool for Arm Compiler 5 toolchain. 2020-02-10 04:06:07 -08:00
Veijo Pesonen 3ee153a303 test config: SPIF - overwrite QSPIF with all devices 2020-02-07 09:52:12 +02:00
Martin Kojtal 32675cc6ac
Merge pull request #11874 from fkjagodzinski/armc6_build-enable_lto_for_release
ARMC6: Add a build profile extension with the link-time optimizer enabled
2020-02-05 14:42:16 +00:00
Martin Kojtal e3ad1cae55
Merge pull request #12334 from AriParkkila/cell-c030-r412m
Update cellular drivers/tests for UBLOX_C030_R412M
2020-02-05 12:50:11 +00:00
Maciej Bocianski 083e3e569d armc6: make lto an optional profile 2020-02-04 12:38:39 +01:00