Commit Graph

92 Commits (d723bf9e55415433e108124ee6d36337feddf1b8)

Author SHA1 Message Date
Lingkai Dong d954841983 memap.py: Allow .a extension for Arm Compiler-generated libraries
The most common extension for static libraries is .a and CMake generates
it with both GCC and Arm toolchains. Mbed CLI 1 generates .ar files with
the Arm Compiler, but since Mbed CLI 2 uses memap.py to generate map
files too, both extensions should be permitted.

This fixes a warning when building greentea tests:

    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    ...

which repeats over 30 times per test.
2021-09-20 16:28:53 +01: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
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
Graham Hammond c223ac99b3 Remove unnecessary change found during over shoulder review 2019-11-25 13:43:58 +00:00
Graham Hammond d2b968142d Updates to *.py in 'tools/' for Python 3 2019-11-21 16:06:59 +00:00
Jimmy Brisson 002a2b17c0 Fix the bug that travis caught 2019-04-09 09:19:41 -05:00
Jimmy Brisson 76226b2f24 Parse section starts beginning with whitespace 2019-04-08 13:32:44 -05:00
Jimmy Brisson 7ceb876e0d Correct all linting errors 2019-04-08 13:32:01 -05:00
Jeroen de Bruijn faac445b34
feat: add support for .obj files in memap 2019-02-26 14:46:19 +01:00
Martin Kojtal 62b5b4644d memap: remove not needed comment prior future import 2019-02-19 09:55:05 +00:00
Martin Kojtal 34cdefc89e tools: fix hashbang 2019-02-18 15:45:33 +00:00
Martin Kojtal c08f51aa36 copyright 2019 fix 2019-02-15 13:37:40 +00:00
Martin Kojtal c8f698ca36 tools: add license headers 2019-02-15 13:32:45 +00:00
Kevin Bracey 983d0d49e4 memap.py: Cope with IAR 8 linker map
IAR 8 linker map puts C++14-style apostrophe digit separators in its
addresses, such as:

     .data   inited  0x2000'1ff0    0x4  mbed_rtx_idle.o [159]

Extend the regex pattern to allow this.
2018-12-05 15:47:32 +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
Cruz Monrreal II ec07e25430 Merge branch 'fix-6258' of ssh://github.com/theotherjimmy/mbed into theotherjimmy-fix-6258 2018-10-12 21:46:33 -05:00
Brian Daniels c12042a4ab Remove references to GCC_CR from the rest of the tools 2018-10-02 10:51:54 -05:00
Jimmy Brisson d8b7b3a24a Tools, memap: Silence warnings that we handled correctly
### Description

Memap will create a bunch of warnings about "Unknown object name" when
parsing a map file created for the RZ_A1H and the GR_Peach. Theses
warnings are sperious; the information in these sections does not belong
to an object file. This PR silences these warnings.

Fixes #6258

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-09-27 10:33:33 -05:00
Cruz Monrreal 48c149b227
Merge pull request #7720 from jeromecoutant/PR_PRETTYTABLE
python scripts : table print with github policy
2018-09-06 22:29:30 -05:00
Brian Daniels b5a187ddb3 Fixing import paths of memap.py when excuted as a script 2018-08-20 09:03:29 -05:00
jeromecoutant a42c73df1b python scripts : table print with github policy 2018-08-07 15:14:27 +02:00
Jimmy Brisson fc97d77b0d Remove file before moving over it
Windows is dumb sometimes
2018-07-27 10:06:11 -05:00
Jimmy Brisson c2642a1c9a Add delta to subtotals 2018-07-24 14:09:55 -05:00
Jimmy Brisson 0e622ded63 Include removed modules in table calulation 2018-07-24 13:55:11 -05:00
Jimmy Brisson 814dbdbe3e Don't trackback on no prior build 2018-07-24 13:42:09 -05:00
Jimmy Brisson 3eea82209e Create a setting for comparing against a fixed build 2018-07-24 11:50:23 -05:00
Jimmy Brisson 7f2eee564c Impl differential memap 2018-07-24 11:40:43 -05:00
Jimmy Brisson e53537c267 Use defaultdict in the other place 2018-07-03 10:03:27 -05:00
Jimmy Brisson 982d2085ef Summarize memory map when --stats-depth is 0 2018-06-29 12:09:53 -05:00
Cruz Monrreal 80dde0b953
Merge pull request #7092 from cmonr/py3-in-windows
Additional fixes for running Python 3 in Windows
2018-06-04 21:45:55 -05:00
Cruz Monrreal II 2abae9e1d1 Modified memap path separator parsing to support Py3.
Had to remove part of test that was incompatible with Py3 on Windows.
2018-06-04 09:21:43 -05:00
Cruz Monrreal II 8b5a7600c4 Encapsulated Windows file separator for proper regex parsing 2018-06-04 09:21:42 -05:00
Jimmy Brisson 1bfc80930f Refactor to remove setdefault calls 2018-04-16 17:28:43 -05:00
Jimmy Brisson 18cf1431bd Move to combined ROM/RAM graphs 2018-04-16 11:40:40 -05:00
Jimmy Brisson 2e40181942 Remove old skip sections without text check 2018-04-16 10:15:18 -05:00
Jimmy Brisson bfceb1050d Implement zoomable html-flamegraph memap output 2018-04-09 16:33:32 -05:00
Christopher Haster 011e018f52 Revert "Added pretty bar printing for compile output"
This reverts commit 471d99c68f.
2018-02-22 22:07:22 -06:00
Jimmy Brisson c93a2bfa4c Python2+3: Use absolute import where possible 2018-02-05 11:07:37 -06:00
Jimmy Brisson 4322bee175 Python2+3: tests passing 2018-02-05 11:04:36 -06:00
Jimmy Brisson 45bdd98a85 Python2+3: tests import correctly 2018-02-05 11:04:36 -06:00
Jimmy Brisson 10a91216f5 Python2+3: The rest of mbed compile 2018-02-05 11:04:01 -06:00
Jimmy Brisson 68737f2762 Python2+3: Things import 2018-02-05 11:03:44 -06:00
Christopher Haster 471d99c68f Added pretty bar printing for compile output
Looks like this:

    Building project mbed-os-prettyoutput (ARCH_PRO, GCC_ARM)
    Scan: .
    Scan: env
    Scan: mbed
    Scan: FEATURE_LWIP
    Text 70.5KB Data 2.72KB BSS 7.43KB                 ROM 73.2KB RAM 10.1KB
    ROM [|||||||                                             ]  73.2KB/512KB
    RAM [||||||||||||||||                                    ]   10.1KB/32KB
    Image: BUILD/ARCH_PRO/GCC_ARM/mbed-os-prettyoutput.bin

If you build a target without a cmsis-pack it looks like this:

    Building project mbed-os-prettyoutput (ARM_BEETLE_SOC, GCC_ARM)
    Scan: .
    Scan: env
    Scan: mbed
    Scan: FEATURE_BLE
    Text 99KB Data 2.84KB BSS 13KB ROM 102KB RAM 15.8KB
    Image: BUILD/ARM_BEETLE_SOC/GCC_ARM/mbed-os-prettyoutput.bin

And the old behaviour of displaying the memap table can be brought back
by passing the --stats-depth parameter
2018-01-25 11:46:23 -06:00
Jimmy Brisson 6a8be65904 Use non-scoped imports in memap 2018-01-02 14:19:00 -06:00
Jimmy Brisson 0c08fabbae Correct Gcc builtin module naming 2018-01-02 13:37:25 -06:00
Jimmy Brisson 527c0a2554 Rework parsing dispatch
Parsing dispatch now uses a metaclass as a Trait and a series of classes
that implement the trait for dispatching parsing. This structure gives
each parser it's own namespace, avoiding tacking on suffixes to each
attribute indicating which parser uses it.
2018-01-02 13:11:38 -06:00
Jimmy Brisson fc9bd60d4c Format memap 2018-01-02 10:43:10 -06:00
Jimmy Brisson 003913b22f Use os.sep and os.join instead of string ops 2018-01-02 10:31:00 -06:00
Jimmy Brisson 23c7af799f Handle multiple args per line in IAR cmd parser 2018-01-02 10:29:53 -06:00
Deepika 6804361d76 Build failed as code section was not included in map.
Fix by Jimmy
2017-12-20 09:49:43 -06:00