1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

firmware: use -Os except for crypto/nanopb parts

This commit is contained in:
Pavol Rusnak 2018-05-02 13:15:12 +01:00
parent 757ab636e7
commit 2c56c4de1b
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 11 additions and 2 deletions

View File

@ -82,6 +82,13 @@ OBJS += ../vendor/nanopb/pb_encode.o
OBJS += protob/messages.pb.o
OBJS += protob/types.pb.o
OPTFLAGS ?= -Os
../vendor/trezor-crypto/%.o: OPTFLAGS = -O3
../vendor/trezor-crypto/aes/%.o: OPTFLAGS = -O3
../vendor/trezor-crypto/ed25519-donna/%.o: OPTFLAGS = -O3
../vendor/nanopb/%.o: OPTFLAGS = -O3
include ../Makefile.include
DEBUG_LINK ?= 0

View File

@ -1717,7 +1717,8 @@ void fsm_msgDebugLinkMemoryWrite(DebugLinkMemoryWrite *msg)
memcpy(&word, msg->memory.bytes + i, 4);
flash_write32(msg->address + i, word);
}
svc_flash_lock();
uint32_t dummy = svc_flash_lock();
(void)dummy;
} else {
#if !EMULATOR
memcpy((void *) msg->address, msg->memory.bytes, length);
@ -1729,6 +1730,7 @@ void fsm_msgDebugLinkFlashErase(DebugLinkFlashErase *msg)
{
svc_flash_unlock();
svc_flash_erase_sector(msg->sector);
svc_flash_lock();
uint32_t dummy = svc_flash_lock();
(void)dummy;
}
#endif