mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
firmware: use -Os except for crypto/nanopb parts
This commit is contained in:
parent
757ab636e7
commit
2c56c4de1b
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user