mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 15:30:55 +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 "sdcard.h"
|
||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
|
|
||||||
|
bool firmware_standalone(void)
|
||||||
|
{
|
||||||
|
extern const uint32_t _flash_start;
|
||||||
|
return _flash_start == 0x0800000;
|
||||||
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
|
||||||
periph_init();
|
periph_init();
|
||||||
|
|
||||||
pendsv_init();
|
pendsv_init();
|
||||||
|
|
||||||
|
if (firmware_standalone()) {
|
||||||
|
display_init();
|
||||||
|
}
|
||||||
|
|
||||||
display_pwm_init();
|
display_pwm_init();
|
||||||
display_orientation(0);
|
display_orientation(0);
|
||||||
display_backlight(255);
|
display_backlight(255);
|
||||||
|
@ -92,6 +92,9 @@ SECTIONS
|
|||||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_flash_start = ORIGIN(FLASH);
|
||||||
|
_flash_end = ORIGIN(FLASH) + LENGTH(FLASH);
|
||||||
|
|
||||||
/* RAM extents for the garbage collector */
|
/* RAM extents for the garbage collector */
|
||||||
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
||||||
_ram_start = ORIGIN(RAM);
|
_ram_start = ORIGIN(RAM);
|
||||||
|
@ -85,6 +85,9 @@ SECTIONS
|
|||||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_flash_start = ORIGIN(FLASH);
|
||||||
|
_flash_end = ORIGIN(FLASH) + LENGTH(FLASH);
|
||||||
|
|
||||||
/* RAM extents for the garbage collector */
|
/* RAM extents for the garbage collector */
|
||||||
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
||||||
_ram_start = ORIGIN(RAM);
|
_ram_start = ORIGIN(RAM);
|
||||||
|
Loading…
Reference in New Issue
Block a user