Commit Graph

3368 Commits (cf2ba1d37d507441b2ff35abfea1a36abcc3ec8a)

Author SHA1 Message Date
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
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
Filip Jagodzinski 8fcb00cccd ARMC6: Enable link-time optimizer for develop profile 2020-02-04 12:29:50 +01:00
Filip Jagodzinski 0780f89011 ARMC6: Enable link-time optimizer for release profile 2020-02-04 12:29:50 +01:00
Martin Kojtal 250e58134f
Merge pull request #12286 from pea-pod/target-nucleo_l452re-p
Add new target: NUCLEO_L452RE-P
2020-02-03 16:34:36 +00:00
Kevin Bracey c4a0808fe6
Merge pull request #12335 from rajkan01/cpu_usage_remove_ci
Remove CPU usage example from CI build
2020-01-31 15:02:09 +02:00
Kevin Bracey 858d02d68c
Merge pull request #12302 from michalpasztamobica/remove_libcpp_extern_template
Remove _LIBCPP_EXTERN_TEMPLATE ARMCC compilation flag
2020-01-30 15:40:40 +02:00
Ari Parkkila 4da93bf979 Add UBLOX_C030_R412M in CellularInterface.json 2020-01-30 04:30:54 -08:00
Rajkumar Kanagaraj 56819fbc53 Remove CPU usage example from CI build 2020-01-30 03:59:36 -08:00
pea-pod f7c4693747 Add new target: NUCLEO_L452RE-P 2020-01-27 18:41:18 -06:00
Anna Bridge f45a5a78b5
Merge pull request #12231 from devran01/upd_musca_a
Import latest python scripts and MCUBoot image
2020-01-25 11:53:34 +00:00
Anna Bridge 7101e92d12
Merge pull request #12303 from rajkan01/fix_micro_lib_warning
Fix ARM compiler warning for microlib
2020-01-24 14:58:18 +00:00
Anna Bridge 8b25c51746
Merge pull request #12226 from JanneKiiskila/target_test_sector_missing
target_test - assert if sectors keyword missing
2020-01-24 11:23:51 +00:00
Anna Bridge 34a291be64
Merge pull request #12228 from jeromecoutant/PR_REGIONSIZE
Need RAM and ROM size for compilation
2020-01-23 11:47:58 +00:00
Anna Bridge cfa2dee248
Merge pull request #12023 from kjbracey-arm/gccnull
GCC: remove -fno-delete-null-pointer-checks
2020-01-23 11:47:13 +00:00
Rajkumar Kanagaraj fe470d9ff9 Fix build tool test case failure 2020-01-22 09:45:01 -08:00
Rajkumar Kanagaraj 6d3782accb Fix ARM compiler warning for microlib
- Remove the --library_type=micorlib from c/cxx configuration.
2020-01-22 07:17:08 -08:00