Both ram and rom reports print their outputs in the console
and publish their reports in json.
footprint is wrapper to generate both reports but it is currently
not printing their outputs in the console nor given any feedback to
the user that those reports were generated.
Change it to behave like the others reports allowing the user to see them
and / or redirect to a file if they want.
Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
Add support for TF-M and BL2 image size reports.
This adds the following targets when TF-M or BL2 is enabled:
tfm_rom_report, tfm_ram_report, tfm_footprint
bl2_rom_report, bl2_ram_report, bl2_footprint
Example:
west build -t tfm_rom_report
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add a tree node to group files under WORKSPACE so that
they won't be shown with full path. The WORKSPACE is
usually the same as WEST_TOPDIR unless ZEPHYR_WORKSPACE
is defined during build.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The parameter can be used to limit the ram and rom reports to a
certain depth. The resulting graphs with depths of e.g. 3 or 4 are
visually easier to grasp.
Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
Colorama needs to be initialized, and for colors to display correctly on
Windows one needs to use the `USES_TERMINAL` option in CMake.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
...instead of GNU binutils to extract DWARF information.
This is now a bit more portable across OS and toolchain.
One bouns is that this nows with on qemu_x86_64.
A few differences are:
() z_mrsh_* which are aliases to handler_no_syscalls() are now
dropped as they are mapped to the same address, so that they
are not counted multiple times.
() Static functions and variables with same names should now be
attributed to the correct source files instead of being
accumulated into the same symbol of one file (e.g. multiple
thread_entry() in kernel tests).
() The totals for ROM and RAM are calculated from the
corresponding sections. Previous script includes the debug
sections as total ROM size which is not entirely correct.
Fixes#22996
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Poke-a-hole (pahole) is an object-file analysis tool to find the size of
the data structures, and the holes caused due to aligning the data
elements to the word-size of the CPU by the compiler.
http://git.kernel.org/cgit/devel/pahole/pahole.git
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
puncover is a footprint and stack analysis tool in python, see
https://github.com/HBehrens/puncover
Add custom target puncover which launches puncover with the right
options.
Launch for example with:
west build -b frdm_k64f samples/hello_world/ -t puncover
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To facilitate extending the generated reports without having to
patch this file, leverage generator-expression so that
dependencies can be added to the 'zephyr_property_target' target.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some boards do not generate .bin files by default, this file is however
needed when generating ram/rom reports, so in case it is not present,
create it.
Fixes#5784
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead of accessing the environment variable ZEPHYR_BASE every time we
require accessing the source code root, use an intermediate variable
that has OS path separators correctly set to '/' to avoid issues on
Windows.
Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External
applications using that will need to change to use the new ZEPHYR_BASE
variable.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
size_report was using the environment variables NM and OBJDUMP to find
it's toolchain dependencies. It is not clear how well this will work
on different platforms; OSX, Windows. So we now pass the paths of
these dependencies from the build system to the script.
PS: This ensures that size_report uses the cross-compiler's GNU bin
tool instead of the host GNU bin tools. This is presumably beneficial
as it has been required for other GNU bin tools like GDB.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.
Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.
This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.
For users that just want to continue their work with minimal
disruption the following should suffice:
Install CMake 3.8.2+
Port any out-of-tree Makefiles to CMake.
Learn the absolute minimum about the new command line interface:
$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ cd build
$ make
PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>