同时编译多个版本

This commit is contained in:
wu58430 2024-01-10 20:05:46 +08:00
parent ba2b7f8ec6
commit 9c3ae5dd24
5 changed files with 170 additions and 130 deletions

View file

@ -20,25 +20,11 @@
</configurations> </configurations>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="修正MDC联系人地址"> <list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="修复信道名显示">
<change afterPath="$PROJECT_DIR$/bsp/dp32g030/timer.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/driver/timer.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Makefile" beforeDir="false" afterPath="$PROJECT_DIR$/Makefile" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Makefile" beforeDir="false" afterPath="$PROJECT_DIR$/Makefile" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-caa285142236f184f75e.json" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/version.c" beforeDir="false" afterPath="$PROJECT_DIR$/version.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/index-2024-01-04T12-24-34-0342.json" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/win_make.bat" beforeDir="false" afterPath="$PROJECT_DIR$/win_make.bat" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/target-uv_k5_firmware_custom_0_17-Debug-793164c62e57d652e20e.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/DependInfo.cmake" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/DependInfo.cmake" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/build.make" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/build.make" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/cmake_clean.cmake" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/cmake_clean.cmake" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/objects1" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/objects1" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/progress.make" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/progress.make" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/Makefile" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/Makefile" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/uv_k5_firmware_custom_0_17.cbp" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/uv_k5_firmware_custom_0_17.cbp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/main.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/start.S" beforeDir="false" afterPath="$PROJECT_DIR$/start.S" afterDir="false" />
<change beforePath="$PROJECT_DIR$/写频脚本/picture.py" beforeDir="false" afterPath="$PROJECT_DIR$/写频脚本/picture.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -87,27 +73,27 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;, "ASKED_ADD_EXTERNAL_FILES": "true",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;, "RunOnceActivity.cidr.known.project.marker": "true",
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;, "SHARE_PROJECT_CONFIGURATION_FILES": "true",
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;, "WebServerToolWindowFactoryState": "false",
&quot;cf.first.check.clang-format&quot;: &quot;false&quot;, "cf.first.check.clang-format": "false",
&quot;cidr.known.project.marker&quot;: &quot;true&quot;, "cidr.known.project.marker": "true",
&quot;last_opened_file_path&quot;: &quot;C:/Users/RUPC/Desktop/UV-K6/uv-k5-firmware-chinese&quot;, "last_opened_file_path": "C:/Users/RUPC/Desktop/UV-K6/uv-k5-firmware-chinese/Makefile",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "node.js.detected.package.tslint": "true",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;, "nodejs_package_manager_path": "npm",
&quot;settings.editor.selected.configurable&quot;: &quot;language.cpp.clang-tidy&quot;, "settings.editor.selected.configurable": "language.cpp.clang-tidy",
&quot;structure.view.defaults.are.configured&quot;: &quot;true&quot;, "structure.view.defaults.are.configured": "true",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "vue.rearranger.settings.migration": "true"
} }
}</component> }]]></component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\RUPC\Desktop\UV-K6\uv-k5-firmware-chinese" /> <recent name="C:\Users\RUPC\Desktop\UV-K6\uv-k5-firmware-chinese" />
@ -117,18 +103,19 @@
<recent name="C:\Users\RUPC\Desktop\UV-K6\uv-k5-firmware-chinese\app" /> <recent name="C:\Users\RUPC\Desktop\UV-K6\uv-k5-firmware-chinese\app" />
</key> </key>
</component> </component>
<component name="RunManager" selected="Makefile 目标.build"> <component name="RunManager" selected="Makefile 目标.full">
<configuration default="true" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true">
<method v="2">
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
</method>
</configuration>
<configuration name="all" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true"> <configuration name="all" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true">
<makefile filename="$PROJECT_DIR$/Makefile" target="all" workingDirectory="" arguments=""> <makefile filename="$PROJECT_DIR$/Makefile" target="all" workingDirectory="" arguments="">
<envs /> <envs />
</makefile> </makefile>
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="both" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
<makefile filename="C:\Users\RUPC\Desktop\UV-K6\uv-k5-firmware-chinese\Makefile" target="both" workingDirectory="" arguments="">
<envs />
</makefile>
<method v="2" />
</configuration>
<configuration name="build" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true"> <configuration name="build" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true">
<makefile filename="$PROJECT_DIR$/Makefile" target="build" workingDirectory="" arguments=""> <makefile filename="$PROJECT_DIR$/Makefile" target="build" workingDirectory="" arguments="">
<envs /> <envs />
@ -141,14 +128,14 @@
</makefile> </makefile>
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="debug" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true"> <configuration name="flash" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true">
<makefile filename="$PROJECT_DIR$/Makefile" target="debug" workingDirectory="" arguments=""> <makefile filename="$PROJECT_DIR$/Makefile" target="flash" workingDirectory="" arguments="">
<envs /> <envs />
</makefile> </makefile>
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="flash" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true"> <configuration name="full" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true">
<makefile filename="$PROJECT_DIR$/Makefile" target="flash" workingDirectory="" arguments=""> <makefile filename="$PROJECT_DIR$/Makefile" target="full" workingDirectory="" arguments="">
<envs /> <envs />
</makefile> </makefile>
<method v="2" /> <method v="2" />
@ -199,7 +186,8 @@
<method v="2" /> <method v="2" />
</configuration> </configuration>
<list> <list>
<item itemvalue="Makefile 目标.debug" /> <item itemvalue="Makefile 目标.both" />
<item itemvalue="Makefile 目标.full" />
<item itemvalue="Makefile 目标.build" /> <item itemvalue="Makefile 目标.build" />
<item itemvalue="Makefile 目标.clean" /> <item itemvalue="Makefile 目标.clean" />
<item itemvalue="Makefile 目标.all" /> <item itemvalue="Makefile 目标.all" />
@ -210,11 +198,11 @@
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Makefile 目标.full" />
<item itemvalue="Makefile 目标.all" />
<item itemvalue="Makefile 目标.build" /> <item itemvalue="Makefile 目标.build" />
<item itemvalue="Makefile 目标.flash" /> <item itemvalue="Makefile 目标.flash" />
<item itemvalue="Makefile 目标.all" />
<item itemvalue="Makefile 目标.clean" /> <item itemvalue="Makefile 目标.clean" />
<item itemvalue="Makefile 目标.debug" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
@ -288,62 +276,12 @@
<workItem from="1704681883948" duration="331000" /> <workItem from="1704681883948" duration="331000" />
<workItem from="1704682476299" duration="8000" /> <workItem from="1704682476299" duration="8000" />
<workItem from="1704716322305" duration="3309000" /> <workItem from="1704716322305" duration="3309000" />
</task> <workItem from="1704795916550" duration="1050000" />
<task id="LOCAL-00059" summary="写频"> <workItem from="1704811085499" duration="2000" />
<created>1701739409050</created> <workItem from="1704853919857" duration="595000" />
<option name="number" value="00059" /> <workItem from="1704856873722" duration="3844000" />
<option name="presentableId" value="LOCAL-00059" /> <workItem from="1704864846118" duration="988000" />
<option name="project" value="LOCAL" /> <workItem from="1704875852857" duration="8575000" />
<updated>1701739409050</updated>
</task>
<task id="LOCAL-00060" summary="写频">
<created>1701739895017</created>
<option name="number" value="00060" />
<option name="presentableId" value="LOCAL-00060" />
<option name="project" value="LOCAL" />
<updated>1701739895017</updated>
</task>
<task id="LOCAL-00061" summary="写频">
<created>1701740303236</created>
<option name="number" value="00061" />
<option name="presentableId" value="LOCAL-00061" />
<option name="project" value="LOCAL" />
<updated>1701740303236</updated>
</task>
<task id="LOCAL-00062" summary="写频">
<created>1701740447231</created>
<option name="number" value="00062" />
<option name="presentableId" value="LOCAL-00062" />
<option name="project" value="LOCAL" />
<updated>1701740447231</updated>
</task>
<task id="LOCAL-00063" summary="写频">
<created>1701740770876</created>
<option name="number" value="00063" />
<option name="presentableId" value="LOCAL-00063" />
<option name="project" value="LOCAL" />
<updated>1701740770876</updated>
</task>
<task id="LOCAL-00064" summary="写频">
<created>1701755444295</created>
<option name="number" value="00064" />
<option name="presentableId" value="LOCAL-00064" />
<option name="project" value="LOCAL" />
<updated>1701755444295</updated>
</task>
<task id="LOCAL-00065" summary="am-fix">
<created>1701769945196</created>
<option name="number" value="00065" />
<option name="presentableId" value="LOCAL-00065" />
<option name="project" value="LOCAL" />
<updated>1701769945196</updated>
</task>
<task id="LOCAL-00066" summary="mdc side beep">
<created>1701775483012</created>
<option name="number" value="00066" />
<option name="presentableId" value="LOCAL-00066" />
<option name="project" value="LOCAL" />
<updated>1701775483012</updated>
</task> </task>
<task id="LOCAL-00067" summary="106 MDC crc fix"> <task id="LOCAL-00067" summary="106 MDC crc fix">
<created>1701778784894</created> <created>1701778784894</created>
@ -632,7 +570,63 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1704451720350</updated> <updated>1704451720350</updated>
</task> </task>
<option name="localTasksCounter" value="108" /> <task id="LOCAL-00108" summary="MDC ID地址改为0X1FFD~0X1FFE">
<created>1704876242671</created>
<option name="number" value="00108" />
<option name="presentableId" value="LOCAL-00108" />
<option name="project" value="LOCAL" />
<updated>1704876242672</updated>
</task>
<task id="LOCAL-00109" summary="适配2*2Mb Eerpom">
<created>1704876272339</created>
<option name="number" value="00109" />
<option name="presentableId" value="LOCAL-00109" />
<option name="project" value="LOCAL" />
<updated>1704876272339</updated>
</task>
<task id="LOCAL-00110" summary="TEST">
<created>1704876285410</created>
<option name="number" value="00110" />
<option name="presentableId" value="LOCAL-00110" />
<option name="project" value="LOCAL" />
<updated>1704876285410</updated>
</task>
<task id="LOCAL-00111" summary="适配2*2Mb Eerpom">
<created>1704876296069</created>
<option name="number" value="00111" />
<option name="presentableId" value="LOCAL-00111" />
<option name="project" value="LOCAL" />
<updated>1704876296069</updated>
</task>
<task id="LOCAL-00112" summary="修改ENABLE_SQUELCH_MORE_SENSITIVE 选项">
<created>1704876392887</created>
<option name="number" value="00112" />
<option name="presentableId" value="LOCAL-00112" />
<option name="project" value="LOCAL" />
<updated>1704876392887</updated>
</task>
<task id="LOCAL-00113" summary="MDC ID地址改回原来的">
<created>1704877354792</created>
<option name="number" value="00113" />
<option name="presentableId" value="LOCAL-00113" />
<option name="project" value="LOCAL" />
<updated>1704877354792</updated>
</task>
<task id="LOCAL-00114" summary="DTMF CALL延时存疑">
<created>1704879331739</created>
<option name="number" value="00114" />
<option name="presentableId" value="LOCAL-00114" />
<option name="project" value="LOCAL" />
<updated>1704879331739</updated>
</task>
<task id="LOCAL-00115" summary="修复信道名显示">
<created>1704887484602</created>
<option name="number" value="00115" />
<option name="presentableId" value="LOCAL-00115" />
<option name="project" value="LOCAL" />
<updated>1704887484602</updated>
</task>
<option name="localTasksCounter" value="116" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@ -659,13 +653,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="am-fix" />
<MESSAGE value="mdc side beep" />
<MESSAGE value="106 MDC crc fix" />
<MESSAGE value="fix EEPROM" />
<MESSAGE value="dtmf显示" />
<MESSAGE value="fix https://github.com/losehu/uv-k5-firmware-chinese/issues/15" />
<MESSAGE value="增加开机画面" />
<MESSAGE value="关闭MDC1200信息显示" /> <MESSAGE value="关闭MDC1200信息显示" />
<MESSAGE value="Makefile" /> <MESSAGE value="Makefile" />
<MESSAGE value="readme add" /> <MESSAGE value="readme add" />
@ -684,7 +671,14 @@
<MESSAGE value="简化EEPROM驱动逻辑&#10;改为STLINK-SWD烧录" /> <MESSAGE value="简化EEPROM驱动逻辑&#10;改为STLINK-SWD烧录" />
<MESSAGE value="赞助更新" /> <MESSAGE value="赞助更新" />
<MESSAGE value="减少eeprom延时" /> <MESSAGE value="减少eeprom延时" />
<option name="LAST_COMMIT_MESSAGE" value="减少eeprom延时" /> <MESSAGE value="MDC ID地址改为0X1FFD~0X1FFE" />
<MESSAGE value="TEST" />
<MESSAGE value="适配2*2Mb Eerpom" />
<MESSAGE value="修改ENABLE_SQUELCH_MORE_SENSITIVE 选项" />
<MESSAGE value="MDC ID地址改回原来的" />
<MESSAGE value="DTMF CALL延时存疑" />
<MESSAGE value="修复信道名显示" />
<option name="LAST_COMMIT_MESSAGE" value="修复信道名显示" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>

View file

@ -47,16 +47,43 @@ ENABLE_MDC1200 ?= 1
ENABLE_MDC1200_SHOW_OP_ARG ?= 1 ENABLE_MDC1200_SHOW_OP_ARG ?= 1
ENABLE_MDC1200_SIDE_BEEP ?= 0 ENABLE_MDC1200_SIDE_BEEP ?= 0
ENABLE_MDC1200_CONTACT ?= 1 ENABLE_MDC1200_CONTACT ?= 1
ENABLE_CHINESE_FULL = 4
ENABLE_UART_RW_BK_REGS ?= 0 ENABLE_UART_RW_BK_REGS ?= 0
ENABLE_AUDIO_BAR_DEFAULT ?=1 ENABLE_AUDIO_BAR_DEFAULT ?=1
ENABLE_EEPROM_4M ?=1 ENABLE_EEPROM_4M ?=1
ENABLE_CHINESE_FULL = 4
# ---- DEBUGGING ---- # ---- DEBUGGING ----
ENABLE_AM_FIX_SHOW_DATA ?= 0 ENABLE_AM_FIX_SHOW_DATA ?= 0
ENABLE_AGC_SHOW_DATA ?= 0 ENABLE_AGC_SHOW_DATA ?= 0
ENABLE_TIMER ?= 0 ENABLE_TIMER ?= 0
############################################################# #############################################################
PACKED_FILE_SUFFIX = LOSEHU115
ifeq ($(ENABLE_CHINESE_FULL),1)
$(info font1)
PACKED_FILE_SUFFIX = font1
endif
ifeq ($(ENABLE_CHINESE_FULL),2)
$(info font2)
PACKED_FILE_SUFFIX = font2
endif
ifeq ($(ENABLE_CHINESE_FULL),3)
$(info font3)
PACKED_FILE_SUFFIX = font3
endif
ifeq ($(ENABLE_CHINESE_FULL),4)
$(info K)
PACKED_FILE_SUFFIX := $(PACKED_FILE_SUFFIX)K
endif
ifeq ($(ENABLE_CHINESE_FULL),0)
$(info Normal)
endif
OPENOCD = openocd-win/bin/openocd.exe OPENOCD = openocd-win/bin/openocd.exe
TARGET = firmware TARGET = firmware
@ -258,6 +285,9 @@ endif
CFLAGS += -Wextra CFLAGS += -Wextra
#CFLAGS += -Wpedantic #CFLAGS += -Wpedantic
# 设置PACKED_FILE_SUFFIX根据ENABLE_CHINESE_FULL的值设置不同的后缀
CFLAGS += -DENABLE_CHINESE_FULL=$(ENABLE_CHINESE_FULL)
CFLAGS += -DPACKED_FILE_SUFFIX=\"$(PACKED_FILE_SUFFIX)\"
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
CFLAGS += -DAUTHOR_STRING=\"$(AUTHOR_STRING)\" -DVERSION_STRING=\"$(VERSION_STRING)\" CFLAGS += -DAUTHOR_STRING=\"$(AUTHOR_STRING)\" -DVERSION_STRING=\"$(VERSION_STRING)\"
@ -273,7 +303,6 @@ endif
ifeq ($(ENABLE_MDC1200_CONTACT),1) ifeq ($(ENABLE_MDC1200_CONTACT),1)
CFLAGS += -DENABLE_MDC1200_CONTACT CFLAGS += -DENABLE_MDC1200_CONTACT
endif endif
CFLAGS += -DENABLE_CHINESE_FULL=$(ENABLE_CHINESE_FULL)
ifeq ($(ENABLE_AUDIO_BAR_DEFAULT),1) ifeq ($(ENABLE_AUDIO_BAR_DEFAULT),1)
CFLAGS += -DENABLE_AUDIO_BAR_DEFAULT CFLAGS += -DENABLE_AUDIO_BAR_DEFAULT
endif endif
@ -438,7 +467,6 @@ ifdef MY_PYTHON
HAS_CRCMOD := $(shell $(MY_PYTHON) -c "import crcmod" 2>&1) HAS_CRCMOD := $(shell $(MY_PYTHON) -c "import crcmod" 2>&1)
endif endif
build:clean $(TARGET) build:clean $(TARGET)
$(OBJCOPY) -O binary $(TARGET) $(TARGET).bin $(OBJCOPY) -O binary $(TARGET) $(TARGET).bin
ifndef MY_PYTHON ifndef MY_PYTHON
@ -451,11 +479,25 @@ else ifneq (,$(HAS_CRCMOD))
$(info !!!!!!!! run: pip install crcmod) $(info !!!!!!!! run: pip install crcmod)
$(info ) $(info )
else else
-$(MY_PYTHON) fw-pack.py $(TARGET).bin $(AUTHOR_STRING) $(TARGET).packed.bin -$(MY_PYTHON) fw-pack.py $(TARGET).bin $(AUTHOR_STRING) $(PACKED_FILE_SUFFIX).bin
endif endif
$(SIZE) $(TARGET) $(SIZE) $(TARGET)
all: clean build flash
make clean full:
$(MAKE) build ENABLE_CHINESE_FULL=0
$(MAKE) build ENABLE_CHINESE_FULL=1
$(MAKE) build ENABLE_CHINESE_FULL=2
$(MAKE) build ENABLE_CHINESE_FULL=3
$(MAKE) build ENABLE_CHINESE_FULL=4
both:
$(MAKE) build ENABLE_CHINESE_FULL=0
$(MAKE) build ENABLE_CHINESE_FULL=4
all:
$(MAKE) build
$(MAKE) flash
debug: debug:
$(OPENOCD) -c "bindto 0.0.0.0" -f interface/stlink.cfg -f dp32g030.cfg $(OPENOCD) -c "bindto 0.0.0.0" -f interface/stlink.cfg -f dp32g030.cfg
@ -480,5 +522,5 @@ bsp/dp32g030/%.h: hardware/dp32g030/%.def
-include $(DEPS) -include $(DEPS)
clean: clean:
$(RM) $(call FixPath, $(TARGET).bin $(TARGET).packed.bin $(TARGET) $(OBJS) $(DEPS)) $(RM) $(call FixPath, $(TARGET).bin $(PACKED_FILE_SUFFIX).bin $(TARGET) $(OBJS) $(DEPS))

View file

@ -1,5 +1,5 @@
@echo off @echo off
call clean.bat call clean.bat
docker build -t uvk5 . docker build -t uvk5 .
docker run -v %CD%\compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp firmware* compiled-firmware/" docker run -v %CD%\compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp *.bin compiled-firmware/"
pause pause

View file

@ -4,7 +4,7 @@
#ifdef GIT_HASH #ifdef GIT_HASH
#define VER GIT_HASH #define VER GIT_HASH
#else #else
#define VER "114" #define VER "11"
#endif #endif
@ -13,9 +13,13 @@
const char Version[] = "OEFW-"VER; const char Version[] = "OEFW-"VER;
const char UART_Version[] = "UV-K5 Firmware, Open Edition, OEFW-"VER"\r\n"; const char UART_Version[] = "UV-K5 Firmware, Open Edition, OEFW-"VER"\r\n";
#else #else
#if ENABLE_CHINESE_FULL !=4 //#if ENABLE_CHINESE_FULL !=4
const char Version[] = "LOSEHU"VER; //const char Version[] = "LOSEHU"VER;
#else //#else
const char Version[] = "LOSEHU"VER"K"; //const char Version[] = "LOSEHU"VER"K";
#endif //#endif
const char Version[] = PACKED_FILE_SUFFIX;
#endif #endif

View file

@ -29,7 +29,7 @@
:: Do the compile :: Do the compile
:: ::
make clean make clean
make make full
:: pyinstaller --onefile ./MDC_WRITE/main.py :: pyinstaller --onefile ./MDC_WRITE/main.py
:: If you have python installed, you can create a 'packed' .bin from the compiled firmware.bin file. :: If you have python installed, you can create a 'packed' .bin from the compiled firmware.bin file.