1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-30 01:01:00 +00:00
Commit Graph

4232 Commits

Author SHA1 Message Date
obrusvit
15967a312b fix(core): explicitly delete keyboard layout
- seems that keyboard LayoutObj was not properly deallocated resulting
in MemoryError. Fix by calling the dunder `del` method explicitly fixes
the issue
- the problem was on Model T (Bolt), but applying it for all layouts to
prevent similar problem
2025-01-27 23:43:33 +01:00
tychovrahe
8bad0c8675 fix(core): fix flashing old display content on model T
[no changelog]
2025-01-24 21:59:01 +01:00
Andrew Kozlik
27ed1fd49e fix(core): Fix displayed batch number in prodtest.
[no changelog]
2025-01-23 16:48:00 +01:00
tychovrahe
69a61e98e0 feat(core): adjust codec_v1 to work with differently sized RX and TX packets
[no changelog]
2025-01-23 16:46:12 +01:00
tychovrahe
a682555574 fix(core): add missing interrupt disable to NRF driver
[no changelog]
2025-01-23 16:46:12 +01:00
tychovrahe
e8eb48cd0d chore(core): add T3W1 production keys vendorheaders
[no changelog]
2025-01-23 15:42:56 +01:00
tychovrahe
5fd773757c fix(core): fix fading issues 2025-01-23 15:24:00 +01:00
tychovrahe
a5809c872e feat(core): add support for setting BLE name from Trezor firmware
[no changelog]
2025-01-23 13:27:59 +01:00
Ioan Bizău
5a13b4560d fix(core): get rid of colon in some TS5 descriptions
[no changelog]
2025-01-23 12:46:54 +01:00
Ioan Bizău
e99beaf486 refactor(core): merge confirm_blob and confirm_value
[no changelog]
2025-01-23 12:46:54 +01:00
tychovrahe
885c5b96d9 refactor(core/rust): move bindgen macros used for tests to model folder
[no changelog]
2025-01-23 10:22:00 +01:00
tychovrahe
bdc054235c refactor(core): define model-specific include files in site-scons
[no changelog]
2025-01-23 10:22:00 +01:00
tychovrahe
26bde15429 refactor(core): extract model specific definitions from Makefile
[no changelog]
2025-01-23 10:22:00 +01:00
cepetr
a920b92ad3 fix(core): fix gfx_bitblt initialization
[no changelog]
2025-01-22 17:21:41 +01:00
Roman Zeyde
e78f6d2d6d fix(core): fix a few "unused" Rust warnings
[no changelog]
2025-01-22 15:09:08 +02:00
Martin Milata
ae853bb821 Merge branch 'release/25.01' 2025-01-22 12:14:10 +01:00
Roman Zeyde
b9c98dba30 feat(core): allow splitting/merging translations for Crowdin
This way, each layout could be translated independently.

[no changelog]
2025-01-22 12:46:50 +02:00
Roman Zeyde
1dae795a94 feat(core): support per-layout untranslated text strings
[no changelog]
2025-01-22 10:41:35 +02:00
Roman Zeyde
8bccc7fd0a chore(core): resort translation JSONs by keys
Done by:
```
cd core/translations
python ./cli.py merge ??.json
```

[no changelog]
2025-01-22 10:41:35 +02:00
Roman Zeyde
7ee1259aaa refactor(core): use layout name for translation font keys
It would simplify `TranslationsDir.load_lang` method.

[no changelog]
2025-01-22 10:41:35 +02:00
Roman Zeyde
e9aca68612 docs: make sure changelog fragments end with a period
Also, run `generate-changelog.py` over prodtest changelog.

[no changelog]
2025-01-20 14:54:27 +02:00
obrusvit
00740b560c refactor(core): consistent naming of UI layouts
- follow-up on 862c987779
- layout_bolt stays the same
- layout_samson -> layout_caesar
- layout_quicksilver -> layout_delizia
- use super for importing rust modules in layout code

[no changelog]
2025-01-20 12:29:24 +01:00
Ioan Bizău
30e88f4641 fix(core/ui): make button press cancel current hold 2025-01-17 13:04:56 +01:00
matejcik
38e362cd5b fix(core): improve ButtonRequest.name in backup confirmation
[no changelog]
2025-01-17 11:28:12 +01:00
matejcik
8b6d8e7572 fix(all): make more protobuf fields required
[no changelog]
2025-01-17 11:28:12 +01:00
Ioan Bizău
dd3bf253f8 fix(core): disallow canceling on uncancelable pages 2025-01-16 13:54:13 +01:00
tychovrahe
8207b9ffe5 feat(core): add BLE to t3w1 board
[no changelog]
2025-01-14 09:15:12 +01:00
tychovrahe
b2a4db1463 feat(core): expose BLE functionality to micropython
[no changelog]
2025-01-14 09:15:12 +01:00
tychovrahe
8ca51be020 feat(core): expose BLE functionality to rust
[no changelog]
2025-01-14 09:15:12 +01:00
tychovrahe
3fae6b23cf feat(core:): introduce BLE driver
[no changelog]
2025-01-14 09:15:12 +01:00
tychovrahe
34e033fd4e fix(core): fix wrong RSOD color on some older Model T devices 2025-01-14 08:21:37 +01:00
kopecdav
b726e1e203 fix(core/prodtest): add missing source file for revA0
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
280b1e9b79 fix(core): reset peripherals in emergency mode
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
2426e637b3 feat(core): introduce optiga deinit and suspending
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
80e2cea2b5 feat(core): improve button driver init/deinit
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
fc2f9c5949 feat(core): add powerctl_suspend syscall
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
f3793fd8c4 fix(core): panic on invalid syscall number
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
63fe21b6cb feat(core): improve dma2d/gfx_bitblt init/deinit
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
3165443dfe feat(core): improve t3w1 display driver init/deinit
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
1f3e640dd9 feat(core): add display_init return value
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
47f618c640 feat(core): decrease t3w1 backlight pwm frequency
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
7a603b8717 feat(core): improve haptic driver peripherals init/deinit
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
a881401e4d feat(core): improve pwm backlight driver peripherals init/deinit
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
22f132c935 fix(core): fix suspending to STOP2 mode
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
4fda1c4dfb feat(core): introduce USE_USB feature
[no changelog]
2025-01-14 07:52:15 +01:00
cepetr
27e37de695 fix(core): fix incorrect macro name
[no changelog]
2025-01-13 19:03:28 +01:00
tychovrahe
eef2f4113f refactor(core): improve USB events handling, more extensible implementation
[no changelog]
2025-01-13 18:46:11 +01:00
tychovrahe
e4f4985584 refactor(core): split polling can_read and reading from USB
[no changelog]
2025-01-13 17:42:30 +01:00
Martin Milata
dadff32f39 build(core): use internal model names everywhere
TREZOR_MODEL=T and TREZOR_MODEL=R

no longer work, please use

  TREZOR_MODEL=T2T1 and TREZOR_MODEL=T2B1

[no changelog]
2025-01-13 16:24:35 +01:00
Lukas Bielesch
1ef62aaf0b fix(core): rework 'too many PIN attempts' RSOD
Also, allow multi-line title in `model_samson` `ErrorScreen`.

Co-authored-by: Roman Zeyde <roman.zeyde@satoshilabs.com>
2025-01-10 13:31:00 +01:00
Roman Zeyde
849af38f5e refactor(core): remove an unused member from ErrorScreen
Also, rename `ErrorScreen::place` argument to `_bounds`,
similarly to how it's done in `model_quicksilver` and `model_bolt`.
2025-01-10 13:31:00 +01:00
tychovrahe
43721ab396 feat(core/prodtest): add RGB LED test
[no changelog]
2025-01-10 11:32:49 +01:00
obrusvit
862c987779 refactor(core): consistent naming of UI layouts
- UI layouts name changes:
  - model_tt -> layout_bolt
  - model_tr -> layout_samson
  - model_mercury -> layout_quicksilver
- rust features `model_xyz` freed for different use, now it's
`layout_xyz`
- input_flow function names are based on UI layout and not internal
model name (i.e. quicksilver instead of t3t1)
- directory names and commentary changed accordingly

[no changelog]
2025-01-09 22:57:14 +01:00
Martin Milata
57fa995b28 chore(core): include signed translations for 2.8.7 2025-01-09 14:49:04 +01:00
tychovrahe
22ab7e98f5 perf(core): optimize LTDC-DSI ram usage by properly utilizing LTDC window
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
1c59442f89 feat(core): use lx250a2401a display panel on T3W1
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
b97390a73a refactor(core): make display resolution constants global, board specific
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
6e2486a2e2 feat(core): add LX250A2401A panel to ltdc_dsi display driver
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
33bb7ef410 fix(core): increase framebuffer section size on U5G models
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
d235ed3d3d fix(core): properly limit the display area used in application (ltdc_dsi driver)
[no changelog]

wip: use only part of display area
2025-01-06 11:42:40 +01:00
tychovrahe
36d0ce79f9 refactor(core): use function to get GFXMMU LUT in ltdc_dsi driver
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
b76a2161a1 fix(core): fix terminal background for unaligned display size
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
973d4ab2b2 fix(core): make TT UI homescreen respect screen size
[no changelog]
2025-01-06 11:42:40 +01:00
tychovrahe
2d051ffefd fix(core): fix jpeg size parsing
[no changelog]
2025-01-06 11:42:40 +01:00
Martin Milata
8a254aa8ea chore(core): add signed bootloader 2.1.8 for T2T1, T2B1 2025-01-03 19:47:34 +01:00
Martin Milata
f2aeea159f docs(core/prodtest): changelog for 0.2.12 2025-01-03 17:35:34 +01:00
Martin Milata
e02fd0b698 docs(core): changelog for 2.8.7 2025-01-03 17:30:08 +01:00
kopecdav
35c0ada42b refactor(core/prodtest): Put patch_and_update function to separate source file 2025-01-03 16:30:14 +01:00
kopecdav
4c312aabfe feat(core/prodtest): Add stwlc38 update from host feature [no changelog] 2025-01-03 16:30:14 +01:00
Martin Milata
f2718b60be Merge branch 'release/24.12' 2025-01-03 15:08:09 +01:00
tychovrahe
20aad3ef8d feat(core/prodtest): change resolution of TOUCH_POWER command parameter to milliseconds. 2025-01-03 14:29:20 +01:00
matejcik
897f5b355f fix(core/ui): fix a bug causing marquee on model TR to not start 2025-01-03 14:24:32 +01:00
matejcik
e0b4cab2db fix(core): retry creation of homescreen layout
For reasons unknown, a previous homescreen layout can sometimes survive
a GC cycle in main's unimport loop. Two homescreen layouts can't exist
simultaneously, so creating a new one would fail.

It _seems_ that after restarting the session, the homescreen object
still exists but is not reachable anymore, so a second GC cycle properly
disposes of it.

So what we do is simply catch the possible MemoryError, invoke GC
explicitly, and try again.
2025-01-03 14:15:14 +01:00
matejcik
e424fd8d3b refactor(core): make imagebuffer allocation fallible 2025-01-03 14:15:14 +01:00
Andrew Kozlik
83a96f7a5a feat(core): Randomize SCM_REVISION address in firmware
[no changelog]
2025-01-03 10:23:41 +01:00
Ondřej Vejpustek
1a62cc8a59 fix(core): fix serialization of signatures and witnesses in multisig
[no changelog]
2025-01-02 15:07:25 +01:00
Andrew Kozlik
01a1f479a0 feat(core): Implement entropy check workflow in ResetDevice. 2025-01-02 13:44:36 +01:00
Andrew Kozlik
df97d8d958 feat(common): Add messages for entropy check workflow.
[no changelog]
2025-01-02 13:44:36 +01:00
tychovrahe
c26d9f4227 chore(core): increase size of assets area for U5G models
[no changelog]
2025-01-02 11:42:00 +01:00
tychovrahe
04a1b3943f chore(core): re-balance distribution in flash on F4 models
[no changelog]
2025-01-02 11:41:48 +01:00
tychovrahe
594445c1f9 fix(core): TS5 - wait for frame to appear on display before raising backlight
[no changelog]
2025-01-02 11:41:33 +01:00
Martin Milata
2f20cba314 docs(core): fix changelog 2024-12-19 13:00:31 +01:00
obrusvit
e9ecbbc5e8 refactor(core): consistent use of confirm_address
- use `confirm_address` trait fn in both `confirm_output` and
`confirm_address` layout functions

[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
7e1f160dba refactor(core): consistent naming for UI traits
[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
0e1696b3ed chore(core): cleanup warnings and clippy errors
[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
9caf540e16 refactor(core): remove trezorui2 module
- also remove "check" scripts which seem outdated

[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
ad9618c282 refactor(core): cleanup layout.rs
- last functions of all models moved out
- imports formatted
- tests moved

[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
dd9ac038d0 refactor(core): port functions to FirmwareUI
- keyboards
- standalone functions
  - disable_animations
  - check_homescreen_format
- confirm_action
- selectors
- confirm_firmware_update
- show_homescreen/lockscreen
- confirm_homescreen
- confirm_homescreen of mercury changed according to Figma
- set_brightness
- show_wait_text
- show_progress
- request_number
- show_checklist
- show_mismatch
- confirm_reset
- tutorial
- confirm_coinjoin
- confirm_modify_output/fee
- show_group_share_success
- show_remaining_shares
- show_success/warning/error/danger
- show_simple
- continue_recovery
  - confirm_recovery of model_t and model_r merged with
flow_continue_recovery of mercury into a continue_recovery_homepage
trait function, parameters renamed to be more descriptive
- show_share_words moved and refactored
  - model_t version was moved from using plain Paragraph to a dedicated
component `ShareWords` so that it's consistent with other models. This
allowed to move formatting to Rust and allowed the trait function to
have `words` parameter of type `Vec<TString, 33>`
  - model_r ShareWords::render slightly refactored to be consistent with
the new model_t version
  - mercury uses a unique version. The reason is that mercury SwipeFlow
contains also the initial screen with instructions and prompt screen at
the end.
- confirm_with_info
- show_info_with_cancel
- confirm_blob
- confirm_value
- confirm_properties
- confirm_more
- confirm_address
- prompt_backub
- confirm_emphasized
- show_address_details
- confirm_summary
- TR removed:
  - confirm_output_address and confirm_output_amount replaced with
confirm_blob. UI diff is minimal.
  - confirm_joint_total, replaced a TR-specific function with a generic
`confirm_properties` with no UI changes
- confirm_multiple_pages_texts
  - the function is TR specific and is used only in confirm_set_new_pin,
it would be better to use something different
- remaining mercury flows with no counterpart
  - confirm_blob_intro
  - flow_confirm_set_new_pin
  - flow_confirm_output
  - flow_get_address

[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
b2c6b09bfc feat(core): introduce FirmwareUI trait
- the commit introduces a trait defining high level UI building blocks,
common for all models.
- trezorui_api module exposes these functions to MicroPython world.
- `show_info` is implemented as a first function.

[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
091a0e8550 feat(core): introduce trezorui_api
- the new module is the place for type definitions of the interface
between rust and micropython world.
- the new module will replace `trezorui2` with `trezorui_api`

[no changelog]
2024-12-19 00:09:20 +01:00
obrusvit
78cce0ba04 fix(core): font generator padding
[no changelog]
2024-12-16 13:54:27 +01:00
obrusvit
5d1401ef4f refactor(core): safe iface for get_glyph_data
[no changelog]
2024-12-16 13:54:27 +01:00
obrusvit
5a9c8c81ae refactor(core): remove UTF-8 support from C
- re-implement some fonts handling functions in Rust and delete them
from C
- C code only needs to handle ASCII characters

[no changelog]
2024-12-16 13:54:27 +01:00
obrusvit
0c4225491b refactor(core): change gen_font.py and regen fonts
Change to the new structures and preserve manual changes. This commit
also removes duplicated definition of nonprintable glyph for _UPPER
fonts.

[no changelog]
2024-12-16 13:54:27 +01:00
obrusvit
db0e8e8421 refactor(core): simplify font handling
This commit removes the usage of macros for font data definitions.
Instead, it includes data as const structs of newly introduced
font_info_t type.

[no changelog]

refactor(core): use font_id_t instead of plain int

[no changelog]
2024-12-16 13:54:27 +01:00
obrusvit
b5ea26eb7a refactor(core): separate concerns of FONT macros
Introduce a new flag `_NAME` for each font and reduce the usage of
`_ENABLE` flag to purely compilation guard.

[no changelog]
2024-12-16 13:54:27 +01:00
cepetr
e196413bb7 feat(core): initialize powerclt in boardloader
[no changelog]
2024-12-13 17:24:03 +01:00
tychovrahe
3bc13b5707 refactor(core): switch DISC2 display driver to universal LTDC DSI implementation
[no changelog]
2024-12-13 17:24:03 +01:00
tychovrahe
03a296f815 feat(core): display driver for T3W1
[no changelog]
2024-12-13 17:24:03 +01:00
tychovrahe
dac6c17f73 refactor(core): extract framebuffer queue for reuse
[no changelog]
2024-12-13 17:24:03 +01:00