feat(core): allow for model R in firmware build

As model R will run on the same computational hardware as model T,
memory_R.ld is just a symbolic link to memory_T.ld.

[no changelog]
pull/2243/head
grdddj 2 years ago committed by matejcik
parent 8e1b5a969c
commit 12da7f301d

@ -26,13 +26,13 @@ g_header:
. = . + 8 // reserved
. = . + 512 // hash1 ... hash16
#if defined TREZOR_MODEL_T
// model T header specifics
#if !defined TREZOR_MODEL_1
// trezor-core header style
. = . + 415 // reserved
.byte 0 // sigmask
. = . + 64 // sig
#elif defined TREZOR_MODEL_1
// model 1 header specifics
#else
// model 1 compatibility header
. = . + 64 // sig1
. = . + 64 // sig2
. = . + 64 // sig3
@ -41,8 +41,6 @@ g_header:
.byte 0 // sigindex3
. = . + 220 // reserved
. = . + 65 // reserved
#else
#error Unknown Trezor model
#endif
g_header_end:

@ -65,7 +65,7 @@ int main(void) {
#endif
// reinitialize HAL for Trezor One
#if defined TREZOR_MODEL_1
#if defined TREZOR_MODEL_1 || defined TREZOR_MODEL_R
HAL_Init();
#endif
@ -86,7 +86,7 @@ int main(void) {
// Init peripherals
pendsv_init();
#if defined TREZOR_MODEL_1
#if defined TREZOR_MODEL_1 || defined TREZOR_MODEL_R
display_init();
button_init();
#endif

@ -48,7 +48,7 @@ reset_handler:
// according to "ARM Cortex-M Programming Guide to Memory Barrier Instructions" Application Note 321, section 4.7:
// "If it is not necessary to ensure that a pended interrupt is recognized immediately before
// subsequent operations, it is not necessary to insert a memory barrier instruction."
#if defined TREZOR_MODEL_T
#if defined TREZOR_MODEL_T || defined TREZOR_MODEL_R
cpsie f
#elif defined TREZOR_MODEL_1
cpsie if

Loading…
Cancel
Save