mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-30 04:38:44 +00:00
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]
This commit is contained in:
parent
8e1b5a969c
commit
12da7f301d
@ -26,13 +26,13 @@ g_header:
|
|||||||
. = . + 8 // reserved
|
. = . + 8 // reserved
|
||||||
. = . + 512 // hash1 ... hash16
|
. = . + 512 // hash1 ... hash16
|
||||||
|
|
||||||
#if defined TREZOR_MODEL_T
|
#if !defined TREZOR_MODEL_1
|
||||||
// model T header specifics
|
// trezor-core header style
|
||||||
. = . + 415 // reserved
|
. = . + 415 // reserved
|
||||||
.byte 0 // sigmask
|
.byte 0 // sigmask
|
||||||
. = . + 64 // sig
|
. = . + 64 // sig
|
||||||
#elif defined TREZOR_MODEL_1
|
#else
|
||||||
// model 1 header specifics
|
// model 1 compatibility header
|
||||||
. = . + 64 // sig1
|
. = . + 64 // sig1
|
||||||
. = . + 64 // sig2
|
. = . + 64 // sig2
|
||||||
. = . + 64 // sig3
|
. = . + 64 // sig3
|
||||||
@ -41,8 +41,6 @@ g_header:
|
|||||||
.byte 0 // sigindex3
|
.byte 0 // sigindex3
|
||||||
. = . + 220 // reserved
|
. = . + 220 // reserved
|
||||||
. = . + 65 // reserved
|
. = . + 65 // reserved
|
||||||
#else
|
|
||||||
#error Unknown Trezor model
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_header_end:
|
g_header_end:
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// reinitialize HAL for Trezor One
|
// reinitialize HAL for Trezor One
|
||||||
#if defined TREZOR_MODEL_1
|
#if defined TREZOR_MODEL_1 || defined TREZOR_MODEL_R
|
||||||
HAL_Init();
|
HAL_Init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ int main(void) {
|
|||||||
// Init peripherals
|
// Init peripherals
|
||||||
pendsv_init();
|
pendsv_init();
|
||||||
|
|
||||||
#if defined TREZOR_MODEL_1
|
#if defined TREZOR_MODEL_1 || defined TREZOR_MODEL_R
|
||||||
display_init();
|
display_init();
|
||||||
button_init();
|
button_init();
|
||||||
#endif
|
#endif
|
||||||
|
1
core/embed/firmware/memory_R.ld
Symbolic link
1
core/embed/firmware/memory_R.ld
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
memory_T.ld
|
@ -48,7 +48,7 @@ reset_handler:
|
|||||||
// according to "ARM Cortex-M Programming Guide to Memory Barrier Instructions" Application Note 321, section 4.7:
|
// 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
|
// "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."
|
// 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
|
cpsie f
|
||||||
#elif defined TREZOR_MODEL_1
|
#elif defined TREZOR_MODEL_1
|
||||||
cpsie if
|
cpsie if
|
||||||
|
Loading…
Reference in New Issue
Block a user