Commit Graph

20 Commits (f29c5b22a1bf2f285dad6ebd1b0a6991a2e68d00)

Author SHA1 Message Date
Deepika 255661e55b Adding debugger awarness with Keil MDK
Main thread in Mbed OS is statically allocated and was not available in call
stack of Keil MDK. The RTX5 kernel requires statically allocated thread
information objects that are placed into a specific section to enable RTOS
thread awareness in Keil MDK. This fix is to keep main thread in specific
section of memory.
2019-01-15 12:04:39 -06:00
Jimmy Brisson b1b69d2d60 Compatibilize ArmC6 with ArmC5-built archives
### Description

Arm compiler 5 builds with "short" enums and "short" wchars. This means
that C/C++ enums will be packed into the smallest power of 2 number of
bytes by the compiler and the `wchar_t` is 2 bytes. Arm compiler 6
defaults to packing enums into 4 bytes and `wchar_t` is 4 bytes.

Further, Arm Compiler 5's `-O0` (no optimizations) bulids will actually
do some amount of optimizing, similar to Arm Compiler 6's `-O1`. I have
switched the debug profile to `-O1` for maximum compatibility with our
prior behavior.

NOTE: "Compatibilize" is a word

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-11-19 11:43:05 -06:00
Janne Kiiskila f1795e3418 IOTCORE-389 - bring back legacy alignment for Arm C6
Quite a few of the scatter files are not (yet) aligned to 8-byte
boundaries and therefore the removal of legacy alignment feature
(which is under deprecation warning, but it actually not YET
deprecated) broke quite a few builds to this error:

Error: L6244E: Exec region RW_IRAM1 address (0x200001ac) not aligned on a 8 byte boundary.

We must bring this option now back to fix the builds.

This option to ld (--legacyalign) can only be removed once all of
the scatter files have been fixed.
2018-09-06 01:04:38 +03:00
deepikabhavnani 37a5646372 Remove deprecated linker options
Resolved below warnings
Warning: L3912W: Option 'legacyalign' is deprecated.
Warning: L3912W: Option 'no_strict_wchar_size' is deprecated.
Warning: L3912W: Option 'no_strict_enum_size' is deprecated.
2018-08-16 18:14:14 -05:00
Jimmy Brisson 5f8aa893ca Partial revert of "CMSIS/RTX: Adapt Mbed OS to CMSIS/RTX device support scheme" 2018-07-11 13:49:57 +01:00
Cruz Monrreal f11d0f3be7
Merge pull request #7261 from kjbracey-arm/iar-jump-warning
IAR: Suppress C "bypasses initialization" warning
2018-06-19 21:46:14 -05:00
Kevin Bracey 81ed8014cd IAR: Suppress C "bypasses initialization" warning
By default IAR generates "transfer of control bypasses initialization"
warnings for C code - it's a legal construct that frequently occurs when
doing Linux-style "goto error". Many occurrences in Nanostack.

Suppress the warning for C only, to align with GCC and ARMCC. Have to
take care not to put it in the "common" section, as this would suppress
it for C++, where it actually is illegal.
2018-06-19 15:54:28 +03:00
Jimmy Brisson 7f0e7ce722 Add show full path option to armc6 linker
### Description
Full paths in the map file are required to have correct memap parsing.
This PR adds the option `--show_full_path` to ARMC6 in every profile.
This option only affects the map file output, so it's safe to add.
2018-06-07 11:44:03 -05:00
Bartek Szatkowski 07aad3c862 CMSIS/RTX: Adapt Mbed OS to CMSIS/RTX device support scheme 2018-05-14 12:18:21 +01:00
Jimmy Brisson 0f15633d37 Work around Arm Compiler 6 stdvector perfomance cliff 2018-02-28 14:46:03 -06:00
Seppo Takalo 0d6f760c16 Add minimal debug info to release and develop profiles.
This allows minimal debugging and allows tools like
mbed-os-linker-report to work properly.

Because debugging info is kept in .elf file and not flashed to device
there is no side effects to flash sizes.
2017-12-14 17:18:31 +02:00
Bartek Szatkowski 2ea01ac8a9 Enabled restrict keyword for IAR 2017-11-10 09:53:42 +00:00
Jimmy Brisson 8c54c4efa8 Display full paths in armlink output 2017-09-18 16:40:52 -05:00
Jimmy Brisson bd7f320387 Emit dependency information with ARMC6
Which allows it to be parsed
2017-09-14 16:17:44 -05:00
Jimmy Brisson 23aafbfe6c Optimize space usage on builds
by not creating gigantic exception nonsense
2017-09-11 14:45:21 -05:00
Jimmy Brisson d72f6dbfe4 Disable MULADDC assembly
It's not supported in ARMC6
2017-09-11 13:20:33 -05:00
Jimmy Brisson 98b4768434 Initial toolchain class for ARMC6
While ARMC6 does use the same linker (armlink) as ARM Compiler 5, it
is not compatible.

The reason for this incompatibility are twofold:
 * armlink may invoke the C preprocessor by adding a shebang
   (`#!`) to the top of their input files.
 * ARMC6 and ARMC5 differ in how you invoke the preprocessor:
   * ARMC5: `#! armcc -E`
   * ARMC6: `#! armclang -E`

This forces the tools to rewrite the shebang if it's wrong.

This does not yet handle dependencies properly
2017-09-11 13:17:54 -05:00
Niklas Hauser 8fb74f42d2 uVisor: Wrap _memalign_r and _calloc_r 2017-06-04 14:41:59 +01:00
Tony Wu 72589dfef3 tools - turn off page alignment of sections
By default, ld sets page alignment of sections to 0x8000, which bloats
up elf file size. This behavior is unnecessary for MCU.

Example:

1. page alignment on

mbed.elf file size 144936

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x008000 0x00000000 0x00000000 0x00400 0x00400 R   0x8000
  LOAD           0x008400 0x00000400 0x00000400 0x00010 0x00010 R   0x8000
  LOAD           0x008410 0x00000410 0x00000410 0x0ab3c 0x0ab3c RWE 0x8000
  LOAD           0x018000 0x20000000 0x0000af4c 0x008d0 0x008d0 RW  0x8000
  LOAD           0x01b81c 0x0000b81c 0x0000b81c 0x00000 0x00004 RW  0x8000
  LOAD           0x020000 0x1fff0000 0x1fff0000 0x00000 0x00400 RW  0x8000
  LOAD           0x0188d0 0x200008d0 0x200008d0 0x00000 0x08860 RW  0x8000

2. page alignment off

mbed.elf file size 91792

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000114 0x00000000 0x00000000 0x00400 0x00400 R   0x4
  LOAD           0x000514 0x00000400 0x00000400 0x00010 0x00010 R   0x1
  LOAD           0x000528 0x00000410 0x00000410 0x0ab3c 0x0ab3c RWE 0x8
  LOAD           0x00b068 0x20000000 0x0000af4c 0x008d0 0x008d0 RW  0x8
  LOAD           0x00b938 0x0000b81c 0x0000b81c 0x00000 0x00004 RW  0x1
  LOAD           0x00b938 0x1fff0000 0x1fff0000 0x00000 0x00400 RW  0x1
  LOAD           0x00b938 0x200008d0 0x200008d0 0x00000 0x08860 RW  0x8

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-03-29 05:48:30 +08:00
Bartek Szatkowski 40d3b22785 Build: Rework build profiles
Rename small.json to release.json, default.json to develop.json and make
it the default profile.
2017-02-07 11:41:16 +00:00