firmware: init display when used in standalone (firmware0) mode

pull/25/head
Pavol Rusnak 7 years ago
parent 43e8b85700
commit cfe9c73c78
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -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…
Cancel
Save