mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-12-17 09:33:57 -05:00
tkey-libs: Optimize for size
Optimize tkey-libs for size to fit firmware in ROM
This commit is contained in:
parent
353d7e9f50
commit
1be5140850
2 changed files with 12 additions and 2 deletions
12
README.md
12
README.md
|
|
@ -122,7 +122,17 @@ official version tag.
|
||||||
|
|
||||||
Easiest is probably to just remove the tkey-libs directory and then
|
Easiest is probably to just remove the tkey-libs directory and then
|
||||||
git clone the desired tag. Use the entire repo, but remove the .-files
|
git clone the desired tag. Use the entire repo, but remove the .-files
|
||||||
like `.git`, `.github`, et cetera.
|
like `.git`, `.github`, et cetera. Something like:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rm -rf tkey-libs
|
||||||
|
$ git clone git@github.com:tillitis/tkey-libs.git
|
||||||
|
$ cd tkey-libs
|
||||||
|
$ git checkout fw-3
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that you need to change the optimization flag in the tkey-libs'
|
||||||
|
Makefile to `-Os`.
|
||||||
|
|
||||||
## Measured boot
|
## Measured boot
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ INCLUDE=include
|
||||||
# either of them. You don't need to recompile tkey-libs.
|
# either of them. You don't need to recompile tkey-libs.
|
||||||
|
|
||||||
CFLAGS = -target riscv32-unknown-none-elf -march=rv32iczmmul -mabi=ilp32 \
|
CFLAGS = -target riscv32-unknown-none-elf -march=rv32iczmmul -mabi=ilp32 \
|
||||||
-mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common \
|
-mcmodel=medany -static -std=gnu99 -Os -ffast-math -fno-common \
|
||||||
-fno-builtin-printf -fno-builtin-putchar -nostdlib -mno-relax -flto \
|
-fno-builtin-printf -fno-builtin-putchar -nostdlib -mno-relax -flto \
|
||||||
-Wall -Werror=implicit-function-declaration \
|
-Wall -Werror=implicit-function-declaration \
|
||||||
-I $(INCLUDE) -I .
|
-I $(INCLUDE) -I .
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue