Commit Graph

17 Commits

Author SHA1 Message Date
Hanno Becker
a1f3c521e7 Add --build-only option to baremetal.sh --ram
This option builds the library, tests and example programs
in a minimally modified baremetal.h configuration (modifications
from baremetal_test.h) but doesn't execute any tests.
2019-07-30 16:56:25 +02:00
Hanno Becker
0a4c78f7c2 Add --debug option to baremetal.sh 2019-07-25 15:49:17 +01:00
Manuel Pégourié-Gonnard
7ee1d4838f Merge remote-tracking branch 'restricted/pr/607' into baremetal-proposed
* restricted/pr/607:
  baremetal: Use Oz when building with armclang
2019-07-03 10:26:29 +02:00
Hanno Becker
3b876acff4 Adapt baremetal.h and baremetal.sh 2019-07-02 16:42:45 +01:00
Jaeden Amero
691aa961b1 baremetal: Use Oz when building with armclang
Oz is allowed to make size optimizations that make the code slower,
where Os isn't. Optimize with Oz, as we care more about having a small
code footprint than having fast code.
2019-07-01 11:21:36 +01:00
Simon Butcher
f2ef573f2b Merge remote-tracking branch 'origin/pr/598' into baremetal 2019-06-18 15:00:02 +01:00
Manuel Pégourié-Gonnard
070f107a61 Add --check option to scripts/baremetal.sh
Only effective together with --rom, makes two changes:
- abort in case of build warnings
- skip writing statistics

The goal is to make sure we build cleanly in the configuration used for
measuring code size, with all the compilers we use, both because we care about
that configuration and those compilers, and because any warnings would cast a
shadow on the code size measurements.

Currently the build fails with armc5 due to a pre-existing warning in PK, this
will be fixed in the next commit.

The next commit will also add an all.sh component to make sure we have no
regression in the future. (Which is the motivation for --check skipping
statistics: an all.sh component should probably not leave files around.)

While at it, fix two things:

1. The call to gcc --version was redundant with the echo line below
2. WARNING_CFLAGS shouldn't be overriden with armclang, as it would remove the
-Wall -Wextra and any directory-specific warning (such as
-Wdeclaration-after-statement in library). It's meant to be overriden only
with compilers that don't accept the default value (namely armc5 here).
2019-06-18 11:28:59 +02:00
Hanno Becker
7cc9ca876f baremetal.sh: Print code-size summary
This commit modifies `scripts/baremetal.sh` to print the total code-size
of the SSL, X.509 and Crypto libraries are runs of

- ./scripts/baremetal.sh --rom --gcc
- ./scripts/baremetal.sh --rom --armc5
- ./scripts/baremetal.sh --rom --armc6

This eases quick investigation of the effect of changes on code-size.
2019-06-07 16:50:20 +01:00
Hanno Becker
4ce06047e1 Enable use of CID in baremetal configuration and test script 2019-05-17 10:20:41 +01:00
Hanno Becker
7f6e808212 Remove uninitialized variable error in baremetal.sh 2019-04-03 13:48:09 +01:00
Hanno Becker
b4d8fab27e Rename generate_codesize_stats.sh to extract_codesize_stats.sh 2019-04-03 13:46:27 +01:00
Hanno Becker
1373724166 Add static callgraph output to baremetal.sh --ram --stack 2019-04-03 12:17:20 +01:00
Hanno Becker
c7c20817dc Measure stack usage in baremetal script
So far, `baremetal.sh --ram --stack` ran `callgrind` to extract
a call stack in an example run of ssl_client2 and ssl_server2.
This, however, needs to be complemented with per-function stack
usage to be able to extract the maximum stack usage.

This commit adds `-fstack-usage` to the CFLAGS used when building
the library in `baremetal.sh --ram` runs, which generates *.su
files indicating the stack usage of individual functions.
2019-04-03 12:04:26 +01:00
Hanno Becker
7a097859c5 Correct usage instructions for baremetal script 2019-04-03 11:55:40 +01:00
Hanno Becker
a778959572 Don't ignore I/O and ECP heap usage in baremetal script 2019-04-03 11:31:54 +01:00
Hanno Becker
5541e4ecde Add usage instructions to baremetal heap+stack usage function 2019-04-03 11:31:43 +01:00
Hanno Becker
43fa8d645b Add scripts to build, test and measure baremetal configuration 2019-03-21 15:09:41 +00:00