mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-23 04:52:01 +00:00
wip: focus session
This commit is contained in:
parent
19b3e9b845
commit
2f492adbc0
@ -287,7 +287,7 @@ build_unix: templates ## build unix port
|
|||||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/trezor-emu-core $(UNIX_PORT_OPTS) \
|
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/trezor-emu-core $(UNIX_PORT_OPTS) \
|
||||||
TREZOR_MODEL="$(TREZOR_MODEL)" CMAKELISTS="$(CMAKELISTS)" THP="$(THP)" \
|
TREZOR_MODEL="$(TREZOR_MODEL)" CMAKELISTS="$(CMAKELISTS)" THP="$(THP)" \
|
||||||
PYOPT="0" BITCOIN_ONLY="$(BITCOIN_ONLY)" TREZOR_EMULATOR_ASAN="$(ADDRESS_SANITIZER)" \
|
PYOPT="0" BITCOIN_ONLY="$(BITCOIN_ONLY)" TREZOR_EMULATOR_ASAN="$(ADDRESS_SANITIZER)" \
|
||||||
NEW_RENDERING="$(NEW_RENDERING)"
|
NEW_RENDERING="$(NEW_RENDERING)" TREZOR_MEMPERF="$(TREZOR_MEMPERF)"
|
||||||
|
|
||||||
build_unix_frozen: templates build_cross ## build unix port with frozen modules
|
build_unix_frozen: templates build_cross ## build unix port with frozen modules
|
||||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/trezor-emu-core $(UNIX_PORT_OPTS) \
|
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/trezor-emu-core $(UNIX_PORT_OPTS) \
|
||||||
|
@ -527,7 +527,7 @@ if ARGUMENTS.get('TREZOR_EMULATOR_DEBUGGABLE', '0') == '1':
|
|||||||
|
|
||||||
if ARGUMENTS.get('TREZOR_MEMPERF', '0') == '1':
|
if ARGUMENTS.get('TREZOR_MEMPERF', '0') == '1':
|
||||||
CPPDEFINES_MOD += [
|
CPPDEFINES_MOD += [
|
||||||
('MICROPY_TREZOR_MEMPERF', '\(1\)')
|
('MICROPY_TREZOR_MEMPERF', '1')
|
||||||
]
|
]
|
||||||
|
|
||||||
env.Replace(
|
env.Replace(
|
||||||
|
@ -64,6 +64,9 @@ async def handle_received_message(
|
|||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
log.debug(__name__, "handle_received_message")
|
log.debug(__name__, "handle_received_message")
|
||||||
|
import micropython
|
||||||
|
micropython.mem_info()
|
||||||
|
print(micropython.alloc_count())
|
||||||
ctrl_byte, _, payload_length = ustruct.unpack(">BHH", message_buffer)
|
ctrl_byte, _, payload_length = ustruct.unpack(">BHH", message_buffer)
|
||||||
message_length = payload_length + INIT_HEADER_LENGTH
|
message_length = payload_length + INIT_HEADER_LENGTH
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ class Emulator:
|
|||||||
return os.environ.copy()
|
return os.environ.copy()
|
||||||
|
|
||||||
def _get_transport(self) -> UdpTransport:
|
def _get_transport(self) -> UdpTransport:
|
||||||
return UdpTransport(f"127.0.0.1:{self.port}")
|
return UdpTransport(f"127.0.0.1:{self.port}", skip_protocol_detection=True)
|
||||||
|
|
||||||
def wait_until_ready(self, timeout: float = EMULATOR_WAIT_TIME) -> None:
|
def wait_until_ready(self, timeout: float = EMULATOR_WAIT_TIME) -> None:
|
||||||
assert self.process is not None, "Emulator not started"
|
assert self.process is not None, "Emulator not started"
|
||||||
|
Loading…
Reference in New Issue
Block a user