Commit Graph

55 Commits (5bb3ede8904d2488c60b1d7539dff2edcce87062)

Author SHA1 Message Date
Jimmy Brisson 56ec4677b5 Clean up notifier API usage in compilers 2018-04-26 09:35:47 -05:00
deepikabhavnani b21e93ba32 Generate/Link secure object file
Cortex v8 architecture based devices support secure/non-secure builds.
Secure build should generate the object file/library from elf during link
process which is used by non-secure binary during linking.

--out-implib=file specifies output library in which symbols are exported
--cmse-implib requests libraries mentioned above are secure gateway
libraries

Creation of secure library is done as part of linking process in GCC/ARMC6/IAR
Non-Secure project should add this secure object file as part of the
linking process.
Secure library is named as cmse_lib.o.
2018-02-14 12:48:33 -06:00
Jimmy Brisson b9b4bb5c25 Move IAR flag passing to constructor 2017-09-26 08:59:01 -05:00
Deepika ca1f24cc0e Add -mcmse flag for GCC and improved logic for cpu core 2017-09-11 11:49:28 -05:00
Deepika 9422c351e4 Initial RTX and tools support for Cortex M-23/M-33 devices 2017-09-11 11:43:26 -05:00
Shrikant Tudavekar ddc9e0840a disable -f option for assembly files for IAR 2017-08-25 16:59:21 -05:00
Yuguo Zou 02687b5ec5 A fix to enum issue 2017-06-03 20:14:54 +01:00
Yuguo Zou 53e837bce2 add support for REALTEK_RTL8195AM 2017-06-03 20:14:45 +01:00
Jimmy Brisson 09afe23762 Upgrade OUTPUT_EXT and use it to pick binary type
targets.json contained a key for some targets, `OUTPUT_EXT`, which I
moved to `Target`, the root of all targets. Following on that, the tools
now use this extension provided by `OUTPUT_EXT` to determine the file
type of the output executable.
2017-03-29 16:46:21 -05:00
Jimmy Brisson fbb6f71be8 Ignore build directory from scan resources
This is a bug fix for the following bug (Github issue #437):

If two builds were run specifying a non-default build folder, the second
build would fail to link with duplicate symbols and may not fit on the
device. The root of this problem is that these non-default build folders
are not ignored by scan-resources, and therefore included in the build.

We fix this bug by ignoring the build directory passed into the tools.
2017-03-06 17:10:57 -06:00
Jimmy Brisson c0f27597ec Add redirect support to toolchains
We create an API for generating the linker flags needed to redirect
functions in an application
2017-02-08 17:34:35 -06:00
Brian Daniels 3ad3a9f1d5 Adding fatal error detection to toolchians.
Before the toolchains would ignore error messages that contained the
string "Fatal error". This would lead to a silent failure unless the
compile command was ran with verbose options. This is now fixed.
2017-01-27 12:07:13 +02:00
Brian Daniels 105a9b3ea6 Removing aboslute path to Dlib config for IAR compiler
This fixes an issue where the absolute path causes a file error if the
compiler paths are configured incorrectly. It uses a relative path
instead now (the files appears to be in the default search path).
2016-12-09 12:02:55 -06:00
Sam Grove 761ec4423b Merge pull request #2856 from bridadan/fixing-missed-build-error-prints
[Tools] Making all toolchains print final compiler message
2016-09-30 15:01:20 -05:00
Jimmy Brisson d88852d150 Replace -o with profiles 2016-09-29 10:20:05 -05:00
Jimmy Brisson ceda396e18 Add simple build profiles to toolchains 2016-09-28 17:25:24 -05:00
Brian Daniels 10534019b9 Making all toolchains print final compiler message.
This functionality was already present in the ARM toolchain script, but
this commit adds this across all toolchain scripts. Solves an issue that
cropped up where a build error wasn't being printed unless the verbose
flag was used. This should now print any existing error messages that have
been printed when the compiler output is being parsed.
2016-09-28 14:42:35 -05:00
Sam Grove 0c0455bf3f Merge pull request #2745 from pan-/disable_global_objects_destruction
Disable global objects destruction
2016-09-22 00:48:08 -05:00
Vincent Coubard 2f0b772c77 Disable destruction of global C++ objects when IAR is used.
This behavior is realized by enabling the flag --no_static_destruction
when the compilerin the invoked.
2016-09-19 11:59:24 +01:00
Brian Daniels ba5ab753b1 Fixing missing import for os.path.exists 2016-09-17 21:12:47 -05:00
Sam Grove 663fdb796f Merge pull request #2721 from theotherjimmy/profile-documentation
tools - Add documentation about profiles to the toolcahins
2016-09-16 17:38:13 -05:00
Sam Grove a6f4b58405 Merge pull request #2675 from sarahmarshy/toolchain_path_check
Revise checking toolchain path
2016-09-16 17:31:41 -05:00
Jimmy Brisson 924d242b39 Add documentation about profiles to the toolcahins 2016-09-15 15:03:10 -05:00
Jimmy Brisson 00d2a45b91 Generalize make exporters for all toolchains 2016-09-15 11:42:52 -05:00
Sarah Marsh ab92a5ace2 Toolchain check generic in mbedToolchain 2016-09-13 13:59:11 -05:00
Sarah Marsh 8b74c5b3c7 Docstrings. Empty executable search path handling. 2016-09-13 12:06:01 -05:00
Sarah Marsh 61dee45dca Revise checking toolchain path 2016-09-12 18:54:39 -05:00
Sarah Marsh cd229bacc3 Allow users to set armcc and iccarm in path.
Raise exceptin instead of exit.
Corrected error for arm-none-eabi-gcc/g++ set in path.
2016-08-17 09:14:05 -05:00
Sarah Marsh 1445886844 Readable error when toolchain paths not set.
Fixes #2360.

New error:
[Error] Toolchain path does not exist for IAR.
Current value: /default/path/that/doesnt/exist
(System exit before any build system calls)
2016-08-10 11:52:45 -05:00
Mihail Stoyanov 88564a9ac3 Differentiate ASM and CXX symbols as they are not treated the same in ARMCC and IAR compilers 2016-08-04 18:19:08 +01:00
Mihail Stoyanov ad87f9da34 Document code and mark which methods are used by the online build system 2016-07-19 11:16:05 +01:00
Mihail Stoyanov 74b7f9e923 mbed Online Build System support:
* added/improved global chroot support
* added RESPONSE_FILES flag to support optional response files (on linux the cmd param length is 2 megabytes). Default True
* added unified handling for archive and link response file (similar to includes)
* added COMPILE_C_AS_CPP flag to support compiling of c files as cpp. Default False
* added mbedToolchain.init() for post __init__ hooks
* added caching to mbedToolchain.need_update() to reduce IO hits
* added support to identify compiler warning/error column (supports ARMCC, GCC and IAR). Errors/warnings now report file@line,col
* added global TOOLCHAIN_PATHS which allows overriding/changing of the toolchain paths. Also simplified ARM-related paths
* added target.json to mbed library release (by @0xc0170)* migrated compile_worker() to utils.py for lightweight thread initialization
* improved run_cmd() performance by removing unnecessary check about the command being executed (should be checked once in the relevant toolchain instead)
* removed remnants of Goanna support (should be reimplemented as hooks to compile/link/archive instead)
* fixes for Python 2.7 compatibility (by @0xc0170)
* fixes for Exporters (by @0xc0170)
2016-07-19 11:14:42 +01:00
0xc0170 359d33cc16 Revert part of the FPU change
We keep target.core names, it defines if CPU contains FPU, as it's common - Cortex M4F/M7F.
We add Cortex M7FD for double precision FPU.
2016-07-11 10:39:23 +01:00
Olaf Hagendorf 4fe41d4edd fpu with single/double precision - removing redundancy
- removing redundancy as discussed in PR #2087:
 - in target.json the core option can have only this values : "Cortex-M0", "Cortex-M0+", "Cortex-M1", "Cortex-M3", "Cortex-M4", "Cortex-M7", "Cortex-A9" - Cortex-M4F and Cortex-M7F removed
 - in target.json an additional fpu option with values: "single" and "double" can be used
- build and export scripts are changed to handle this

- tested (compiling, running on hardware) with nucleo_f767 (cortex-m7 with double precision fpu), nucleo_f746 (cortex-m7 with single precision fpu), nucleo_f446 and nucleo_l467 (cortex-m4 with single precision fpu), teensy31 (cortex-m4 without fpu - only build test), nucleo_l073 (cortex-m0)
- singletest results are added to PR #2087 comments
2016-07-04 22:08:31 +02:00
Jimmy Brisson 8e11fa2071 Undelete defines from IAR 2016-06-27 14:36:35 -05:00
Jimmy Brisson 4746beb256 Switch to = style for preincludes
relpaces the --preinclude mbed_config.h with --preinclude=mbed_config.h
2016-06-27 14:06:42 -05:00
Jimmy Brisson 5532fb8697 Export command line for including mbed_conf.h from toolchains 2016-06-27 14:06:34 -05:00
Bogdan Marinescu b4e8cf655d Fixed config-related options for the IAR assembler
The IAR assembler doesn't accept '--preinclude', but it accepts -D.
This commit changes the way the config-related macros are propagated
to the IAR assembler to use '-D' instead of '--preinclude'. This is
the only change related to functionality, the others are small,
backward compatible changes to the config code to make passing arguments
to the toolchain instances easier.

Tested by compiled blinky with IAR, GCC_ARM and ARM for K64F.
2016-06-27 15:54:38 +03:00
Sam Grove 667d49ed8f Merge pull request #1985 from kjbracey-arm/iar_vlas
Turn on C99 VLAs in IAR
2016-06-24 16:13:22 -05:00
Kevin Bracey 80a03e1787 Turn on C99 VLAs in IAR
IAR defaults to C99 mode, but doesn't enable VLAs by default. Enable them
to make it more conformant.

We don't have much if any code using actual variable-length arrays, but
variably-modified types are occasionally used. The same switch controls
both.

(VLAs were actually already enabled in most of the project export
templates, but not the build script).
2016-06-23 09:34:12 +03:00
Martin Kojtal 1e18ea230a Merge pull request #1957 from mbedmicro/config_headers
Configuration in header files - step 1
2016-06-16 18:47:15 +02:00
Bogdan Marinescu a164224acf Changed prefix file name to mbed_conf.h
Also changed some function names to make it clear that the prefix
headers feature is only used for config.
2016-06-16 17:01:41 +03:00
Bogdan Marinescu 85eca37d29 Added toolchain support for configuration in prefix headers
This commit uses the previously introduced feature of generating
configuration data as a C header file rather than as command line macro
definitions. Each toolchain was modified to use prefix headers if
requested, and build_api.py was modified to set up the toolchain's
prefix header content using the data generated by the config system.

Tested by compiling blinky for GCC and ARMCC. I'm having a few issues
with my IAR license currently, but both ARMCC and IAR use the same
`--preinclude` option for prefix headers, so this shouldn't be an issue.

Note that at the moment all exporters still use the previous
configuration data mechanism (individual macro definitions as opposed to
a prefix header). Exporters will be updated in one or more PRs that will
follow.
2016-06-16 16:13:50 +03:00
0xc0170 c16c75f2af iar - fix flags for cmd and exporters
Exporters and cmd do not share all flags, some asm and c flags are not the same (cpu, fpu)
2016-06-15 21:04:48 +01:00
Mihail Stoyanov d0db5c94e5 Removed IAR --vla flag which breaks compatibility with IAR Workbench 2016-06-15 00:06:43 +01:00
Sam Grove 7d0060aa7b Revert "Fix iar exporter - flags duplication and consolidations" 2016-06-14 23:31:57 +01:00
0xc0170 69c3da581d iar - flags consolidation
- vla flag is not compatible with c++ (not supported), it generates an error
in the IDE. Therefore we remove it
- common flags - add dlib and thum to the common flags.
- cpu flag is for only runtime cmd, IDE sets it via defined MCU, not required.
2016-06-14 16:19:39 +01:00
Mihail Stoyanov 3fa9ed79a5 Fixed flag for IAR 2016-06-14 04:42:45 +01:00
0xc0170 88054fa959 IAR - add ld flags to link hook 2016-06-13 16:02:50 +01:00
Jimmy Brisson a4baaf8d5c Move IAR linker flags into the DEFAULT_FLAGS dict 2016-06-13 16:02:47 +01:00