From b21826fe297e08df9b7df13e0564df2a91429646 Mon Sep 17 00:00:00 2001 From: LolloDev Date: Tue, 9 Jan 2024 16:23:08 +0000 Subject: [PATCH] Finally get liveseek to work? @joaquimorg --- app/ceccommon.c | 2 + compiled-firmware/firmware.ld | 79 +++++++++++++++++++++++++++++++++++ ui/helper.c | 2 +- 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 compiled-firmware/firmware.ld diff --git a/app/ceccommon.c b/app/ceccommon.c index a03d983..7225d13 100644 --- a/app/ceccommon.c +++ b/app/ceccommon.c @@ -16,6 +16,8 @@ #include "ceccommon.h" +#include "ui/helper.h" +#include "ui/ui.h" typedef struct { diff --git a/compiled-firmware/firmware.ld b/compiled-firmware/firmware.ld new file mode 100644 index 0000000..c00d2ba --- /dev/null +++ b/compiled-firmware/firmware.ld @@ -0,0 +1,79 @@ +ENTRY(HandlerReset) + +_estack = 0x20004000; /* end of 16K RAM */ + +_Min_Heap_Size = 0; /* required amount of heap */ +_Min_Stack_Size = 0x80; /* required amount of stack */ + +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 60K + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K +} + +SECTIONS +{ + /* Program code */ + .text : + { + . = ALIGN(4); + *(.text.isr) /* .text sections of code */ + *(.text) /* .text sections of code */ + *(.text*) /* .text* sections of code */ + *(.rodata) /* .rodata sections */ + *(.rodata*) /* .rodata* sections */ + *(.glue_7) /* Glue arm to thumb code */ + *(.glue_7t) /* Glue thumb to arm code */ + *(.eh_frame) + + KEEP(*(.fini)) + . = ALIGN(4); + _etext = .; /* global symbols at end */ + } >FLASH + + /* Used by startup code */ + + . = ALIGN(4); + + flash_data_start = .; + + .data : + { + . = ALIGN(4); + sram_data_start = .; + *(.sramtext) + *(.srambss) + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* Global symbol at data end */ + } >RAM AT> FLASH + + sram_data_end = .; + + /* Uninitialized data */ + . = ALIGN(4); + .bss : + { + _sbss = .; /* Global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* Global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* Check that there is enough RAM */ + ._user_heap_stack : + { + . = ALIGN(4); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(4); + } >RAM +} + diff --git a/ui/helper.c b/ui/helper.c index a8c1c7e..143e70b 100644 --- a/ui/helper.c +++ b/ui/helper.c @@ -276,7 +276,7 @@ bool UI_NoChannelName(char *channelName) { return channelName[0] < 32 || channelName[0] > 127; } -#ifdef ENABLE_MESSENGER +#if defined(ENABLE_MESSENGER) || defined(ENABLE_LIVESEEK_MHZ_KEYPAD) void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black) {