Commit Graph

446 Commits (266d4c43a2e382d7013a98ca6a1cc14a5ffb83b5)

Author SHA1 Message Date
deepikabhavnani 0082474ef2 Update `cmse` flag based on core_arch instead of different cores 2019-01-31 16:19:24 -06:00
deepikabhavnani f760f72757 Update IAR flags for Armv8M devices.
Cortex-M23 / Cortex-M33 CPU settings for baseline and mainline
profile (with optional floating and dsp options) updated.
2019-01-31 16:19:24 -06:00
Cruz Monrreal c9e00cf781
Merge pull request #9480 from deepikabhavnani/core_arch_v8m
Refactor core optional parameters (FPU + DSP + Security extensions)
2019-01-31 10:22:09 -06:00
Cruz Monrreal II 149d280e7a Added encoding to version check for Py3 compat 2019-01-28 12:59:43 -06:00
deepikabhavnani febbeffff6 Change if statements to lookup tables 2019-01-25 09:43:03 -06:00
deepikabhavnani f7d49fdc82 Change DSP variant symbol to `E` from `D`(d-double floating point) 2019-01-25 09:31:44 -06:00
deepikabhavnani c472005cfa GCC_ARM: Strip the -NS from core option before setting floating point options 2019-01-25 09:28:36 -06:00
deepikabhavnani c0750de318 Armc6 - Set floating point and CPU options for all core variants explicitly
Below are the options read from the toolchains/arm
armclang --target=arm-arm-none-eabi -mcpu=list
The following arguments to option 'mcpu' can be selected:
  -mcpu=cortex-m0
  -mcpu=cortex-m0plus
  -mcpu=cortex-m1
  -mcpu=cortex-m3
  -mcpu=cortex-m4
  -mcpu=cortex-m7
  -mcpu=cortex-m23
  -mcpu=cortex-m33
  ...

armlink --cpu=list
The following arguments to option 'cpu' can be selected:
 --cpu=Cortex-M0
 --cpu=Cortex-M0plus
 --cpu=Cortex-M1
 --cpu=Cortex-M1.os_extension
 --cpu=Cortex-M1.no_os_extension
 --cpu=Cortex-M4
 --cpu=Cortex-M4.no_fp
 --cpu=Cortex-M7
 --cpu=Cortex-M7.fp.sp
 --cpu=Cortex-M7.no_fp
 --cpu=Cortex-M23
 --cpu=Cortex-M33
 --cpu=Cortex-M33.no_fp
 --cpu=Cortex-M33.no_dsp
 --cpu=Cortex-M33.no_dsp.no_fp
...

armclang --target=arm-arm-none-eabi -mfpu=list
The following arguments to option 'mfpu' can be selected:
  -mfpu=fpv4-sp-d16
  -mfpu=fpv5-sp-d16
  -mfpu=fpv5-d16
...
2019-01-25 09:28:36 -06:00
deepikabhavnani 907c517473 Use core arch for setting secure/non-secure flags 2019-01-25 09:28:36 -06:00
Martin Kojtal 129889bf52
Merge pull request #9404 from deepikabhavnani/dsp_flag
DSP_PRESENT flag is needed for Armv8m devices having DSP enabled
2019-01-23 14:21:23 +01:00
Martin Kojtal af52c30234
Merge pull request #9433 from deepikabhavnani/asm_v8m_flags
Set DSP and floating point flags for ASM files
2019-01-23 09:18:18 +01:00
Deepika ddc762776f Set DSP and floating point flags for ASM files 2019-01-18 14:13:31 -06:00
Deepika ed8b53877c DSP_PRESENT flag is needed for Armv8m devices having DSP enabled 2019-01-18 13:34:15 -06:00
Kevin Bracey d17d43bdfa Revert "Warn with ARMC6 and not v8m"
This reverts commit 3f684113b0.
2019-01-17 10:59:27 -06:00
Senthil Ramakrishnan 3e6dafa71a Removed extra space 2019-01-04 09:33:33 -06:00
Senthil Ramakrishnan f10ed4b286 Add more information to error url to enhance error analytics 2019-01-04 09:24:31 -06:00
Cruz Monrreal 57c2079605
Merge pull request #9154 from kjbracey-arm/armc6_hardfp
ARMC6: Use float-abi=hard
2019-01-03 10:34:23 -06:00
Kevin Bracey dddeab7414 ARMC6: Use float-abi=hard
For binary compatibility with ARMC5, use the hard ABI variant whenever
we have FP hardware - this is ARMC5's default behaviour, which we do not
override.

Cortex-M4F was already using hard; this brings M7F and M33F into line.
2018-12-19 14:28:35 +02:00
Mahesh Mahadevan 4649a6ee5f Update to add support for Cortex-M33FD
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-12-13 14:11:49 -06:00
Anna Bridge a91dccd901
Merge pull request #9072 from theotherjimmy/toggle-memory-defines
Enable stats reporting with a flag in targets.json
2018-12-13 15:10:46 +00:00
Jimmy Brisson 9dbdbe8e85 Enable stats reporting with a flag in targets.json
### Description

PR #8607 will cause problems for the NRF52832 and the NRF52840
in the online compiler starting with 5.10.2. This PR prevents this problem
by using a toggle in `targets.json` to enable these new defines for every
target except for the NRF52832 and NRF52840.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-12-11 15:58:37 -06:00
deepikabhavnani f05e7b77d0 Add core option for Cortex-M33 with DSP enabled
Signed-off-by: Deepika Bhavnani <Deepika.Bhavnani@arm.com>
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-12-07 12:20:01 -06:00
Cruz Monrreal 2b46b1d64d
Merge pull request #8779 from theotherjimmy/memap-better-old
Migrate old memap file handling into toolchains
2018-11-30 17:51:08 -06:00
Martin Kojtal e69aa15aea
Merge pull request #8744 from kfnta/psa_spm_base
PSA Secure partition manager and services
2018-11-27 15:26:38 +01:00
Oren Cohen dd73fa689c PSA SPM
* Intorduce PSA-SPM to mbed-os
* Add SPM tests (for PSA targets)
* Add PSA PRoT internal storage Secure implementation
* Integrate SPM into the boot proccess
* PSA manifest data generator
* Introduce PSA targets skeleton to mbed-os
* Add artifact delivery to the tools
2018-11-27 09:16:35 +02:00
Jimmy Brisson 38d8bb64fa Migrate old memap file handling into toolchains
### Description

This PR moves the old memap file handling required for differential
memap from within memap to the toolchain object. This has the
advantage that we can do the `mv <app>.map <app>.map.old` the moment
before it is overwritten by the linker. This should allow multiple
reruns of memap without modifying your build directory.

### Pull request type

    [ ] Fix
    [x] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-11-26 08:47:40 -06:00
Mikhail Maltsev d16388354a Fix build of library archive with Arm Compiler 6
The 'archive' method of the toolchain class 'ARM' expects that self.ar
is a string, but the constructor of the class 'ARMC6' initializes it
with a list. This patch fixes the issue.
2018-11-22 13:32:20 +00:00
Martin Kojtal 5b42e2886f
Merge pull request #8607 from aashishc1988/ram_rom_fetch
Fetch ram/rom start/size
2018-11-22 10:49:50 +01:00
Aashish chaddha 0c594a42dc The check for managed bootloader support should be in regions and we need a try/catch when we call it.
Moved "bootloader_not_supported" check to where it was and handle that exception at only one place.

Removed ram/rom size info for realtek from targets.json. THe info we have is not correct.

was Not handling config exceptions from regions and ram_regions property

adding rom-ram info for REALTEK_RTL8195AM
2018-11-15 15:28:14 -06:00
Deepika a6ed5fcbd0 Adding arch option instead MCPU for no dsp and no fpu support
No FPU option is valid, but supported only for 8.x releases, with 7.x release
+nofp gives build errors.
2018-11-13 08:21:31 -06:00
Aashish chaddha 3956451c07 Fixing some corner cases
1. Adding SRAM in available ram
2. If the target doesn't exist in cmsis but targets.json, handle accordingly and raise apt exceptions where needed.
3. If no sram is provided, raise exception
2018-11-12 13:28:01 -06:00
Cruz Monrreal II 6ab56d978e Merge branch 'quote-includes-2' of ssh://github.com/moonchen/mbed-os into rollup 2018-11-09 11:40:32 -06:00
Cruz Monrreal II 14a9824511 Merge branch 'root-include-path' of ssh://github.com/theotherjimmy/mbed into rollup 2018-11-08 13:24:12 -06:00
Jimmy Brisson 95e2b07ad8 Resources: Compute parents using only header names
### Description

The prior fix made the assumption that you wanted to compute all of the
parents for a give header file going all the way up the path. This is
not true: you probably want to stop when the project stops. We already
keep track of a virtual name within the project, so instead, we compute
parents of the name, and generate the actual location of these files in
your FS as the path. This makes the solution robust offline and online
(I tested it with my local copy of os.mbed.com)

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-11-08 09:23:49 -06:00
Aashish chaddha 27f20c7478 Fetch RAM/ROM information from CMSIS pack and add as defines
RAM/ROM memory data of target is required for statistics and linker
files, goal here is to fetch maximum 4 RAM/ROM regions from CMSIS pack
and make them available for C/C++/Linker flags as defines
2018-11-07 10:20:28 -06:00
Deepika Bhavnani ba86a53871 Update tools/toolchains/gcc.py 2018-11-05 17:44:18 +01:00
jeromecoutant 1ea28973b2 TOOLS : Add missing M33 and M33F in python scripts 2018-11-05 17:44:15 +01:00
Leszek Rusinowicz 9b1db83eaa Added required changes outside of TARGET_Cypress tree:
1. In drivers/Timer.cpp make sure that hardware timer is initialized outside of critical section.
   This is because on PSoC 6 hardware resources are shared between both cores
   and we have to make sure that the other core is not already using a particular resource.
   This mechanism is based on interprocessor communication taht cannot be handled iside of
   critical section.
2. Added support for post-binary hook function for PSoC 6 targets, so the hex image for M0+ CPU core
   can be merged with M4 core image for the final image.
3. Added possibility to use hook function from exportes, so the M0+ hex image could be included
   in the generated project.
4. Included hex images in the build dependency list, so the update of image is catched by the
   build process.
2018-11-01 20:19:21 +01:00
Mo Chen 2c77c1edd6 Put quotes around include path options
This fixes a compile error when the path has space characters.
2018-10-30 17:15:54 -05:00
Cruz Monrreal 46d717cf18
Merge pull request #8250 from theotherjimmy/fix-7723
Tools: Don't traceback on missing linker script
2018-10-22 11:30:50 -05:00
Cruz Monrreal II b957f602b8 Corrected OFFICILLY_SUPPORTED typo 2018-10-18 11:13:17 -05:00
Jimmy Brisson ec72ce7787 Track supported information within toolchain clasess 2018-10-18 11:10:16 -05:00
Cruz Monrreal a5855e4da5
Merge pull request #8359 from kaidokert/master
Allow overriding build timestamp from env
2018-10-17 08:57:37 -05:00
Cruz Monrreal 43ffe3e985
Merge pull request #8305 from theotherjimmy/fix-microbit-release
Tools: Fix Microbit releases
2018-10-10 08:44:58 -05:00
kert 77f9fb9039 Allow overriding build timestamp from env 2018-10-10 01:38:22 -07:00
Jimmy Brisson a270249aa7 Update remaining default_lib usage in arm compiler 2018-10-09 10:50:02 -05:00
Cruz Monrreal b7cf1abf81
Merge pull request #8039 from c1728p9/stack_size_framework
Add framework for configuring boot stack size
2018-10-08 10:26:16 -05:00
Cruz Monrreal 342d087d47
Merge pull request #8276 from theotherjimmy/consistant-file-notify
tools: Make "file" key in notifications consistant
2018-10-08 10:22:04 -05:00
Martin Kojtal 1af1a4a443
Merge pull request #7876 from cmonr/version-warn-not-err
Tools: Modified version mismatch msg to be warning instead of error
2018-10-04 13:42:00 +02:00
Jimmy Brisson 0e458bd163 Tools: Fix Microbit releases
### Description

I noticed that there was quite a bit missing from the mbed2 release of
the microbit today. That's because the microbit uses ARM by default and
the GCC_ARM small library. The release script was trying to release for
ARM using scan rules for uARM. Turns out we're stuck with 2 configuration
parameters for the same thing: `default_lib` for GCC and `default_toolchain`
for ARM. Dang

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-02 11:23:14 -05:00
Jimmy Brisson 6282b5f0c4 tools: Make "file" key in notifications consistant
### Description

2 calls to `notify.cc_verbose` used the a FileRef object in place of
the file's name. Other calls to `notify.cc_info` would use just the
file name. This PR changes these 2 calls to be consistant with the rest.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-09-27 15:31:35 -05:00
Jimmy Brisson f8f5bc40f6 Tools: Don't traceback on missing linker script
### Description

The `mbed compile` would traceback when no linker script is found.
This PR changes that behavior to make that into a NotSupportedException,
which has decent user behavior.

Fixes #7723

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-09-25 12:52:25 -05:00
Cruz Monrreal caa4279244
Merge pull request #8023 from SiliconLabs/hotfix/nanostack-default-interface
Hotfix for PR #7778 on Silicon Labs targets
2018-09-21 12:50:43 -05:00
Kevin Bracey 0e7eda0749 Remove IAR assembler macros containing quotes
IAR assembler 7.80 has some problems handling difficult macros, leading
to immediate exit with return value -11.

In particular, a URL string has been causing problems, presumably due to
the "//" resembling a comment.

A previous escaping workaround in 0d97803 seemed to work, but the crash
has still been seen with a particular target.

Previous creation of the extended command line file for the IAR
assembler was stripping quotes from macros. This rendered the resulting
definitions for string-containing macros incorrect, which means that we
can assume no assembler code is currently relying on them.

Therefore, as a precautionary measure to avoid the crash, simply remove
all macros containing strings when creating them for IAR. This
apparently clears the crashes seen during testing of
https://github.com/ARMmbed/mbed-os/pull/8023
2018-09-20 15:51:51 +03:00
Martin Kojtal 81d0948c09
Merge pull request #8025 from deepikabhavnani/flag_update
Align to CMSIS defines for Non-Secure
2018-09-19 14:18:41 +02:00
Cruz Monrreal 3da606e586
Merge pull request #8017 from TTornblom/master
IAR: Fix for #7662, only massage the error decode URL for the IAR .xcl
2018-09-17 19:46:12 -05:00
deepikabhavnani ff80e298d2 Align to CMSIS defines for Non-secure
CMSIS updated the __DOMAIN_NS define to DOMAIN_NS. Update the define
in existing code for non-secure part.
2018-09-10 09:25:27 -05:00
Russ Butler 1ead033423 Add framework for configuring boot stack size
Add the target config option "boot-stack-size" which is passed to the
linker as the define "MBED_BOOT_STACK_SIZE" so the linker can
adjust the stack accordingly. On mbed 2 the boot stack becomes the
main stack after boot.  On mbed 5 the boot stack becomes the
ISR stack after boot. Because of these different uses  the stack size
for mbed 2 is set to 4K by default while on mbed 5 it is set to 1k.

Additionally, the NRF5X family requires a larger interrupt stack size
due to the softdevice so the size  is increased to 2k on mbed 5 builds.
2018-09-07 16:31:49 +01:00
TTornblom 0d97803ad8 IAR: Fix for #7662, only massage the error decode URL for the IAR .xcl
file.
2018-09-06 12:16:15 +02:00
Jammu Kekkonen 1a9999708e Fix memory reservation for Softdevice in NRF52_DK 2018-08-31 14:13:55 +03:00
Cruz Monrreal 2e081dc7d0
Merge pull request #7644 from theotherjimmy/components
Tools: Scan for "components"
2018-08-28 17:55:01 -05:00
Cruz Monrreal 14319adf7a
Merge pull request #7792 from deepikabhavnani/fix_m33
Build tool fixes for Musca support
2018-08-28 10:09:28 -05:00
Jimmy Brisson 419761913a Add `COMPONENT_` defines 2018-08-27 11:12:02 -05:00
Jimmy Brisson 79ee1b8e02 Add "components" 2018-08-27 11:12:01 -05:00
Cruz Monrreal 2f8e679183
Merge pull request #7592 from orenc17/remove_uvisor
Remove uVisor from mbed-os
2018-08-25 19:52:24 -05:00
Cruz Monrreal II 09239e3073 Modified version mismatch msg to be warning instead of error 2018-08-23 22:13:00 -05:00
Deepika ed58ff0405 Disabling DSP and FPU for Cortex-M33
Change shared by @Gabor Kertesz

Hard-fault on Musca was because of enabled floating point instructions,
disabling DSP and FPU.
2018-08-23 09:06:20 -05:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Jimmy Brisson 09ea2a3df9 Tools: Use Distcc when specified 2018-08-21 11:38:31 -05:00
deepikabhavnani 63664520c0 Arch and CPU options for linker and Clang are different for Cortex-M33
As per the link below, options for clang and armlink are diferrent for Cortex-M33
armlink --cpu 8-M.Main --import-cmse-lib-out importlib_v1.o
armclang -march=armv8-m.main -mcmse

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0773h/pge1452794854109.html
2018-08-16 13:35:03 -05:00
deepikabhavnani beab422045 -mcpu option not needed for v8M devices
-mcpu option if set for v8M CPU;s it will add DSP feature as default
which is optional. Hence setting just the architecture for Cortex-M23
and Cortex-M33
2018-08-15 13:52:15 -05:00
deepikabhavnani 08b4e34825 Fix build and typo issues with M33 build 2018-08-14 11:44:29 -05:00
Olli-Pekka Puolitaival 2059fed945 Fix building with python 3 2018-08-13 12:46:43 +03:00
Jimmy Brisson 7db537acf6 Fix Microlib compatibility for -t ARM
Missing from common flags:
 * `-D__MICROLIB`
 * `--library_type=microlib`

This patch adds them
2018-08-07 13:21:03 -05:00
Jimmy Brisson 28064f1319 Use hash to determine changes to command files 2018-07-30 10:41:58 -05:00
Cruz Monrreal dcd358f3e7
Merge pull request #7558 from theotherjimmy/tc-arm-v8m
Tools: Select compiler based on arch version
2018-07-26 10:27:21 -05:00
Jimmy Brisson 3f684113b0 Warn with ARMC6 and not v8m 2018-07-20 10:12:56 -05:00
Cruz Monrreal 4bcca894ae
Merge pull request #7061 from TTornblom/master
Tools: Include configuration in ASM
2018-07-20 08:02:44 -05:00
Jimmy Brisson 62538e3bce Filter archives for the arm linker
the other compilers can do it for themselves
2018-07-16 14:11:09 -05:00
Jimmy Brisson 545553b6bc Rewrite test detection to avoid relying on "inc_dirs" 2018-07-16 14:11:08 -05:00
Jimmy Brisson a4cc32067d Add get_file_paths res API and use it 2018-07-16 14:11:08 -05:00
Jimmy Brisson 28dbbd6b3b Correct path usage in linking 2018-07-16 14:11:08 -05:00
Jimmy Brisson 6a87510192 Correct several exporter uses of file_basepath with a dedupe 2018-07-16 14:11:08 -05:00
Jimmy Brisson 7a26cd8da8 Use paths in linking 2018-07-16 14:11:08 -05:00
Jimmy Brisson 0661578054 Use include paths when compiling
We were using include names before
2018-07-16 14:11:08 -05:00
Jimmy Brisson de913e1ea2 Improve resources API to include more use cases 2018-07-16 14:11:08 -05:00
Jimmy Brisson 2d8cf737e4 Move resource scanning into it's own module 2018-07-16 14:10:21 -05:00
Jimmy Brisson ef7b466958 Correct cmse lib creation for the make_gcc_arm 2018-07-12 10:49:26 -05:00
Jimmy Brisson 444d021b0e Correct string usage in version checking 2018-07-10 14:04:26 -05:00
Jens Alfke 5543849ba4 Recognize ".cc" and ".hh" source file extensions
".cc" --> C++ source code
".hh" --> header

This change allows existing source code with this naming
convention (e.g. my company's) to be used in mbed.os projects.
2018-07-06 10:10:22 -07:00
Cruz Monrreal 9c4c630356
Merge pull request #7367 from theotherjimmy/check-arm-component
Tools: Detect Arm Compiler version using Component
2018-07-03 07:35:57 -05:00
Jimmy Brisson 95c33f7807 Include symbols in dumped build profiles
This will make incremental compile more complete, taking device_has and
inheritance hierarchy into account.
2018-06-28 15:05:23 -05:00
Jimmy Brisson 37013fb489 Use Component section for ARM compiler version 2018-06-28 10:51:12 -05:00
Cruz Monrreal dec43922ee
Merge pull request #7247 from theotherjimmy/toolchain-version-check
Tools: Check compiler version
2018-06-27 18:42:49 -05:00
Jimmy Brisson c273de6545 Test and correct GCC version check 2018-06-26 09:25:33 -05:00
Jimmy Brisson c174ca3f85 Test and correct ARMCC version check 2018-06-26 09:15:01 -05:00
Jimmy Brisson f87fab5f33 Use via file for ASM macros in IAR 2018-06-26 08:44:37 -05:00
Jimmy Brisson a775e6992e Refactor via files to use a common method 2018-06-26 08:44:37 -05:00
Jimmy Brisson a855281633 Use preinclude of mbed_config.h in all toolchains 2018-06-26 08:44:37 -05:00
TTornblom dcd17935e3 IAR: Fixed #6670 2018-06-26 08:44:37 -05:00