The introduction of pretty-bar had broken the handling of
"mbed compile"'s "--stats-depth" argument. No matter what one gave
as parameter to it, the result output is just using the default 2.
Fix the logic in build_api.
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
Build api used to build cmsis separately (how mbed 2 is being build). This is
currently not how cmsis is being defined. As there target dependencies in some
cases, we should include paths from targets when building cmsis
If map file parsing fails then memap_instance is set to None. To
prevent a traceback when parsing fails check if this is None before
trying to access any of its fields.
Removed heap/stack from report
Add --stats-depth option to mbed compile
Fix minor issues identified in review
Fix bug when parsing armcc libs
Fix code style
Fix minor issues on existing tests
Fix memap for automated TESTS
Fix stats-depth parameter for tests
I accidentally broke only uARM mbed 2 builds. Here is the story: When
scanning for resources, toolchains look for any `TOOLCHAIN_<classname>`
folders to include. These `<classname>`s mostly match the name passed in
on the command line with one exception: `uARM` on the command line maps
to `ARM_MICRO` the class. This would not be a problem except for the bug
that I introduced in a prior commit. The bug is that the mbed2 library
builds will use the name passed in on the command line to construct
`TOOLCHAIN_<cli-name>`. This will not match when scanning.
I fixed it by translating the `<cli-name>` into the `<classname>`.
An earlier patch in this series relies on the assumption that all
toolchain construction goes through `prepare_toolchain`. This is still
not the case. The only remaining user of the `mbedToolchain` object that
does not go through `prepare_toolchain` is the static analysis scanner.
It's basically dead-code at this point. I say we remove it. So this
patch removes it.
The prior patch in this series makes the assumption that any building
will go through `build_api.prepare_toolchain`. This was not a valid
assumption for the mbed2 build process. So, instead of maintaining 2
ways of using the toolchain classes, I elected to unify on
`prepare_toolchain`.
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.
To enable a boot-loader style application, override
"targets.bootloader_exec" or "targets.restrict_size" on a particular
target. These parameters are a bin or hex file, and an integer, in bytes,
respectively. If either override is present, then an application region
is created after the boot-loader region, when "targets.bootloader_exec"
is present, and before post-application, when "targets.restric_size" is
present. The size of the boot-loader region is read from the file
provided in the configuration.
Before, the get_config function was checking the equality of a set and a
list. However the list's equality depends on order, so this change casts
it to set to prevent an infinite loop.