mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
firmware: init display when used in standalone (firmware0) mode
This commit is contained in:
parent
43e8b85700
commit
cfe9c73c78
@ -21,12 +21,22 @@
|
||||
#include "sdcard.h"
|
||||
#include "touch.h"
|
||||
|
||||
bool firmware_standalone(void)
|
||||
{
|
||||
extern const uint32_t _flash_start;
|
||||
return _flash_start == 0x0800000;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
|
||||
periph_init();
|
||||
|
||||
pendsv_init();
|
||||
|
||||
if (firmware_standalone()) {
|
||||
display_init();
|
||||
}
|
||||
|
||||
display_pwm_init();
|
||||
display_orientation(0);
|
||||
display_backlight(255);
|
||||
|
@ -92,6 +92,9 @@ SECTIONS
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
}
|
||||
|
||||
_flash_start = ORIGIN(FLASH);
|
||||
_flash_end = ORIGIN(FLASH) + LENGTH(FLASH);
|
||||
|
||||
/* RAM extents for the garbage collector */
|
||||
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
||||
_ram_start = ORIGIN(RAM);
|
||||
|
@ -85,6 +85,9 @@ SECTIONS
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
}
|
||||
|
||||
_flash_start = ORIGIN(FLASH);
|
||||
_flash_end = ORIGIN(FLASH) + LENGTH(FLASH);
|
||||
|
||||
/* RAM extents for the garbage collector */
|
||||
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
||||
_ram_start = ORIGIN(RAM);
|
||||
|
Loading…
Reference in New Issue
Block a user