Skip to content

Conversation

@romanz
Copy link
Contributor

@romanz romanz commented Sep 11, 2025

Fixes #5526.

Requires trezor/micropython#27.

@github-actions
Copy link

github-actions bot commented Sep 11, 2025

en main(all)

model device_test click_test persistence_test
T2T1 test(all) main(all) test(all) main(all) test(all) main(all)
T3B1 test(all) main(all) test(all) main(all) test(all) main(all)
T3T1 test(all) main(all) test(all) main(all) test(all) main(all)
T3W1 test(all) main(all) test(all) main(all) test(all) main(all)

Latest CI run: 17645830394

@romanz romanz force-pushed the romanz/traceback-upy branch from 4f0db64 to 1684fea Compare September 11, 2025 11:06
@romanz
Copy link
Contributor Author

romanz commented Sep 11, 2025

with PYOPT=0

$ arm-none-eabi-objdump -dC core/build/firmware/firmware.elf | grep mp_obj_exception_add_traceback
 80ac248:	f021 fa9c 	bl	80cd784 <mp_obj_exception_add_traceback>
 80ad50e:	f020 f939 	bl	80cd784 <mp_obj_exception_add_traceback>
080cd784 <mp_obj_exception_add_traceback>:
 80cd78a:	4b24      	ldr	r3, [pc, #144]	@ (80cd81c <mp_obj_exception_add_traceback+0x98>)
 80cd7a0:	bb20      	cbnz	r0, 80cd7ec <mp_obj_exception_add_traceback+0x68>
 80cd7aa:	b9e8      	cbnz	r0, 80cd7e8 <mp_obj_exception_add_traceback+0x64>
 80cd7ac:	4b1c      	ldr	r3, [pc, #112]	@ (80cd820 <mp_obj_exception_add_traceback+0x9c>)
 80cd7b4:	dd0f      	ble.n	80cd7d6 <mp_obj_exception_add_traceback+0x52>
 80cd7d6:	4b11      	ldr	r3, [pc, #68]	@ (80cd81c <mp_obj_exception_add_traceback+0x98>)
 80cd7e2:	d018      	beq.n	80cd816 <mp_obj_exception_add_traceback+0x92>
 80cd7ea:	e7e7      	b.n	80cd7bc <mp_obj_exception_add_traceback+0x38>
 80cd7f4:	dbe5      	blt.n	80cd7c2 <mp_obj_exception_add_traceback+0x3e>
 80cd7f6:	4b0a      	ldr	r3, [pc, #40]	@ (80cd820 <mp_obj_exception_add_traceback+0x9c>)
 80cd7fc:	d0eb      	beq.n	80cd7d6 <mp_obj_exception_add_traceback+0x52>
 80cd80a:	d0e4      	beq.n	80cd7d6 <mp_obj_exception_add_traceback+0x52>
 80cd814:	e7d5      	b.n	80cd7c2 <mp_obj_exception_add_traceback+0x3e>

with PYOPT=1

$ arm-none-eabi-objdump -dC core/build/firmware/firmware.elf | grep mp_obj_exception_add_traceback
<nothing is printed>

@romanz romanz marked this pull request as ready for review September 11, 2025 11:12
@romanz romanz requested review from mmilata and removed request for TychoVrahe September 11, 2025 11:12
@romanz romanz self-assigned this Sep 11, 2025
@romanz romanz added the micropython Python interpreter and runtime that runs Trezor firmware label Sep 11, 2025
@romanz romanz merged commit b5d9ecd into main Sep 14, 2025
249 of 250 checks passed
@romanz romanz deleted the romanz/traceback-upy branch September 14, 2025 03:41
@github-project-automation github-project-automation bot moved this from 🔎 Needs review to 🤝 Needs QA in Firmware Sep 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

micropython Python interpreter and runtime that runs Trezor firmware

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Don't allocate tracebacks on PYOPT=1 builds

3 participants