-
-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model R embedded implementation #2243
Conversation
aac84f2
to
50c87a5
Compare
Fixed style issues & force pushed |
Implemented firmware install confirmation via buttons d60ecb2 |
d60ecb2
to
5ab2acc
Compare
please rebase on current master, merging the base branch did something bad to this PR |
core/embed/bootloader/main.c
Outdated
#include "touch.h" | ||
#endif | ||
#if defined TREZOR_MODEL_R || defined TREZOR_MODEL_1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw we don't need to check TREZOR_MODEL_1
here because this code will never run as T1 bootloader.
but it's not breaking anything so 🤷♀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 572cc5b and 2e8dd0f. Though we still have model 1 variant in bootloader SConscript.
However, this breaks the compilation of bootloader for model 1 variant. Since bootloader is part of build_all and build_embed, this also breaks. Which makes me wanna drop the commits. Or i can change these particular conditionals to not throw "Unknown Trezor model" errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can change these particular conditionals to not throw "Unknown Trezor model" errors.
that seems like the best option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I'm wondering if we could somehow noop-ize bootloader build for T1. Like, Sconscript.bootloader
would just print "not building for T1" instead of doing anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be achieved with this placed at the beginning of sconscript, seems like a better choice then running dummy compilation:
if TREZOR_MODEL in ('1', ):
# skip bootloader build
env = Environment()
def build_bootloader(target,source,env):
print(f'Bootloader: nothing to build for Model {TREZOR_MODEL}')
program_bin = env.Command(
target='bootloader.bin',
source=None,
action=build_bootloader
)
Return()
We can include this also in boardloader and bootloader_ci to skip those too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 2ba1b65
5ab2acc
to
9c00be3
Compare
rebased onto master & force pushed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I did not review the display driver (display-stm32_R.h
) in too much detail.
@hiviah could you please take a look on that part specifically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left couple of questions / suggestions ...
Now thinking more about changes in
This approach has the following advantages:
|
Implemented in 55b5a47 The render looks maybe a bit better, but its not a big margin and still likely not good enough for production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, looked at the display driver more in detail, looks sane, though I couldn't test it on HW.
@TychoVrahe please squash, rebase, fix style checks etc. |
please add a changelog entry, something like Added: basic Trezor Model R hardware support. |
5c3c686
to
7985c2e
Compare
7985c2e
to
57c692f
Compare
…t of the models as noop.
57c692f
to
6c84fbf
Compare
Added changelog entries, squashed (still some separate commits that make sense to me, let me know if further squashing is required), force pushed. |
T1 core build is now broken, please fix |
fixed in 718be20 |
everything seems to pass now so please squash the last fixup and let's get this merged |
718be20
to
68994a5
Compare
squashed |
🎉 |
Implemented basic Model R functionality:
(firmware is not implemented for R, works partially when fed model type as 'T' via QSTR, but still for example crashes when trying to create wallet, not sure why, maybe missing touch screen causes problems)
Built on top of #2230