diff --git a/Makefile b/Makefile index e592c16..9db78e8 100644 --- a/Makefile +++ b/Makefile @@ -157,6 +157,7 @@ endif ifeq ($(ENABLE_SPECTRUM_NUNU), 1) OBJS += app/spectrumnunu.o endif + ifeq ($(ENABLE_UART),1) OBJS += app/uart.o endif @@ -184,6 +185,9 @@ endif ifeq ($(ENABLE_MESSENGER),1) OBJS += ui/messenger.o endif +ifeq ($(ENABLE_LIVESEEK_MHZ_KEYPAD),1) +OBJS += app/ceccommon.o +endif OBJS += ui/helper.o OBJS += ui/inputbox.o OBJS += ui/lock.o @@ -199,10 +203,6 @@ OBJS += apps/scanlist.o OBJS += version.o OBJS += main.o -ifeq ($(ENABLE_LIVESEEK_MHZ_KEYPAD),1) -OBJS += ceccommon.o -endif - ifeq ($(OS),Windows_NT) TOP := $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) RM = del /Q diff --git a/ceccommon.c b/app/ceccommon.c similarity index 99% rename from ceccommon.c rename to app/ceccommon.c index 39c77da..a03d983 100644 --- a/ceccommon.c +++ b/app/ceccommon.c @@ -31,7 +31,7 @@ TADC_RANGE CW_KEY_ADC[3]; //================================= For Reduce Use Memory ==================== //gMR_ChannelAttributes[207]; -> function -//resize to 7 byte and Move to ceccommon.c +//resize to 7 byte and Move to app/ceccommon.c uint16_t CEC_GetRssi() { int _wait_count = 0; @@ -116,6 +116,7 @@ void DrawFrequencySmall(uint32_t _frequency, int _startX, int _Length, int _line UI_PrintStringSmall(strBuff, _startX, 0, _lineNumber); } + void DrawCommBuffToSpectrum(void) { //Low Value diff --git a/ceccommon.h b/app/ceccommon.h similarity index 99% rename from ceccommon.h rename to app/ceccommon.h index 675c5bf..9d877a4 100644 --- a/ceccommon.h +++ b/app/ceccommon.h @@ -20,7 +20,6 @@ #ifndef CEC_COMMON_H #define CEC_COMMON_H - #include #include #include @@ -44,7 +43,8 @@ #include "ui/main.h" #include "font.h" #include "functions.h" -#include "app/app.h" +#include "app.h" + #define _MAX_READ_CH_ATTRIBUTES 7 #define COMBUFF_USE_SEEK_RSSI 01 diff --git a/app/main.c b/app/main.c index 9b2702f..cb34c76 100644 --- a/app/main.c +++ b/app/main.c @@ -48,8 +48,7 @@ #include "ui/inputbox.h" #include "ui/ui.h" #ifdef ENABLE_LIVESEEK_MHZ_KEYPAD -#include "ceccommon.h" -#include "app/chFrScanner.h" +#include "app/ceccommon.h" #endif static void SwitchActiveVFO() { diff --git a/app/menu.c b/app/menu.c index e30134e..e5a6fa1 100644 --- a/app/menu.c +++ b/app/menu.c @@ -44,7 +44,7 @@ #include "ui/menu.h" #include "ui/ui.h" #ifdef ENABLE_LIVESEEK_MHZ_KEYPAD -#include "ceccommon.h" +#include "app/ceccommon.h" #endif /*#ifndef ARRAY_SIZE diff --git a/board.c b/board.c index 42bd798..3049618 100644 --- a/board.c +++ b/board.c @@ -44,7 +44,7 @@ #include "sram-overlay.h" #endif #ifdef ENABLE_LIVESEEK_MHZ_KEYPAD -#include "ceccommon.h" +#include "app/ceccommon.h" #endif static const uint32_t gDefaultFrequencyTable[5] = { diff --git a/compile-with-docker.sh b/compile-with-docker.sh index 6e19518..028f6e9 100755 --- a/compile-with-docker.sh +++ b/compile-with-docker.sh @@ -1,3 +1,3 @@ #!/bin/sh docker build -t uvk5 . -docker run --rm -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/" \ No newline at end of file +docker run --rm -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp firmware* compiled-firmware/" \ No newline at end of file diff --git a/compiled-firmware/firmware.ld b/compiled-firmware/firmware.ld deleted file mode 100644 index c00d2ba..0000000 --- a/compiled-firmware/firmware.ld +++ /dev/null @@ -1,79 +0,0 @@ -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/main.c b/main.c index 22bd944..f6007c5 100644 --- a/main.c +++ b/main.c @@ -52,7 +52,7 @@ #include "driver/eeprom.h" #ifdef ENABLE_LIVESEEK_MHZ_KEYPAD -#include "ceccommon.h" +#include "app/ceccommon.h" #endif void _putchar(char c) { diff --git a/settings.c b/settings.c index 0f84fc8..66f6ec0 100644 --- a/settings.c +++ b/settings.c @@ -25,7 +25,7 @@ #include "misc.h" #include "settings.h" #ifdef ENABLE_LIVESEEK_MHZ_KEYPAD -#include "ceccommon.h" +#include "app/ceccommon.h" #endif EEPROM_Config_t gEeprom; diff --git a/ui/main.c b/ui/main.c index ea544de..467013e 100644 --- a/ui/main.c +++ b/ui/main.c @@ -33,7 +33,7 @@ #include "../ui/rssi.h" #include "../ui/ui.h" #ifdef ENABLE_LIVESEEK_MHZ_KEYPAD -#include "ceccommon.h" +#include "app/ceccommon.h" #endif #include