From 706fcdd03509566ed4f73b493d47b2e12f51cf4f Mon Sep 17 00:00:00 2001 From: HalfSweet <60973476+HalfSweet@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:12:41 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9BAir40?= =?UTF-8?q?1=E7=9A=84=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99=20(#91)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update: 更新Air401驱动库 * fix: 修复重复定义的宏定义警告 --- platform.txt | 2 +- system/AIR401xx/air401xx_hal_conf_default.h | 31 +++++++++++++++------ system/Air401-Drivers | 2 +- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/platform.txt b/platform.txt index db9369c..501d7b9 100644 --- a/platform.txt +++ b/platform.txt @@ -1,5 +1,5 @@ name=Air MCU -version=0.6.0 +version=0.6.1 ## compiler variables 编译器的路径 compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/ diff --git a/system/AIR401xx/air401xx_hal_conf_default.h b/system/AIR401xx/air401xx_hal_conf_default.h index fff7c0f..eec2c17 100644 --- a/system/AIR401xx/air401xx_hal_conf_default.h +++ b/system/AIR401xx/air401xx_hal_conf_default.h @@ -100,15 +100,28 @@ /* ########################### System Configuration ######################### */ /** * @brief This is the HAL system configuration section - */ -#define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ -#define PRIORITY_HIGHEST 0 -#define PRIORITY_HIGH 1 -#define PRIORITY_LOW 2 -#define PRIORITY_LOWEST 3 -#define TICK_INT_PRIORITY ((uint32_t)PRIORITY_LOWEST) /*!< tick interrupt priority (lowest by default) */ -#define USE_RTOS 0 -#define PREFETCH_ENABLE 0 + */ +#if !defined(VDD_VALUE) +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0U +#endif +#if !defined (PREFETCH_ENABLE) +#define PREFETCH_ENABLE 1U +#endif +#if !defined (INSTRUCTION_CACHE_ENABLE) +#define INSTRUCTION_CACHE_ENABLE 0U +#endif +#if !defined (DATA_CACHE_ENABLE) +#define DATA_CACHE_ENABLE 0U +#endif +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U +#endif /* ########################## Assert Selection ############################## */ /** diff --git a/system/Air401-Drivers b/system/Air401-Drivers index 53e0115..fed7914 160000 --- a/system/Air401-Drivers +++ b/system/Air401-Drivers @@ -1 +1 @@ -Subproject commit 53e0115557a76d9a2fcc3c4456c48c0615deef7f +Subproject commit fed7914074af4a36bab7b026b8261f9dbcb80994 From 5b63a36f81a5d83730a34602199024912fee7a80 Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Mon, 27 Nov 2023 18:34:23 +0800 Subject: [PATCH 02/12] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=BA=93=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/Air001-Drivers | 2 +- system/Air401-Drivers | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/Air001-Drivers b/system/Air001-Drivers index 1699715..206622b 160000 --- a/system/Air001-Drivers +++ b/system/Air001-Drivers @@ -1 +1 @@ -Subproject commit 1699715eb2ab49ecac0979cc1de4cce0a9b44fcf +Subproject commit 206622bb5ce800eba3ad4ef73cbacb4839cfd019 diff --git a/system/Air401-Drivers b/system/Air401-Drivers index fed7914..dd46a95 160000 --- a/system/Air401-Drivers +++ b/system/Air401-Drivers @@ -1 +1 @@ -Subproject commit fed7914074af4a36bab7b026b8261f9dbcb80994 +Subproject commit dd46a957ee2abeb754649160a36a696b1db40df6 From 2719d0adabdd00d8b2b81da1bac4e1d3095ab004 Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Mon, 27 Nov 2023 18:41:33 +0800 Subject: [PATCH 03/12] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=BA=93=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/Air401-Drivers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Air401-Drivers b/system/Air401-Drivers index dd46a95..0cf8a05 160000 --- a/system/Air401-Drivers +++ b/system/Air401-Drivers @@ -1 +1 @@ -Subproject commit dd46a957ee2abeb754649160a36a696b1db40df6 +Subproject commit 0cf8a0570359c026722593f48a5f3fe32f592d0c From d91d2a6855b05c7476b8a5cbd82781479b7647c3 Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Mon, 27 Nov 2023 19:35:31 +0800 Subject: [PATCH 04/12] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4c662a..4d762f4 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ AirMCU 是一个由社区推动,旨在适配上海合宙通信有限公司的 | MCU 系列 | 是否支持 | 详细链接 | | :-------: | :------: | :-----------------: | | Air001 | ✅ | | -| Air32F103 | 🔨 | | +| Air32F103 | ✅ | | +| Air401 | ✅ | | 有关开发板的更多资料,请查看所述链接中的开发板内容。 From 8ff470b2894901991e2a1ee929d1a771a89095ee Mon Sep 17 00:00:00 2001 From: chenxuuu Date: Thu, 7 Dec 2023 13:32:19 +0800 Subject: [PATCH 05/12] =?UTF-8?q?add:=20issue=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue.yml | 18 ------------------ .github/workflows/issue_check.yml | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/issue.yml create mode 100644 .github/workflows/issue_check.yml diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml deleted file mode 100644 index 5a3c212..0000000 --- a/.github/workflows/issue.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: issue - -on: - issues: - types: [opened, edited] - -jobs: - auto_close_issues: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Automatically close issues that don't follow the issue template - uses: lucasbento/auto-close-issues@v1.0.2 - with: - github-token: ${{ secrets.ISSUE_TOKEN }} - issue-close-message: "@${issue.user.login}: 你好! :wave:\n\n因为你没有按模板新建issue,所以此issue已被自动关闭!请重新按issue模板新建issue" # optional property - closed-issues-label: "🙁 未按模板新建issue" # optional property diff --git a/.github/workflows/issue_check.yml b/.github/workflows/issue_check.yml new file mode 100644 index 0000000..0a34b0f --- /dev/null +++ b/.github/workflows/issue_check.yml @@ -0,0 +1,23 @@ +name: issue_check + +on: + issues: + types: [opened] + +jobs: + ssh: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: prepare software + run: | + pip install PyGithub + cd .. + wget https://raw.githubusercontent.com/chenxuuu/action/main/scripts/issue_check.py + - name: check issue + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_URL: ${{ github.event.issue.html_url }} + run: | + cd .. + python issue_check.py From 15f75389385e465fd9b5c44a0047e9b1dc0066c7 Mon Sep 17 00:00:00 2001 From: chenxuuu Date: Wed, 13 Dec 2023 10:37:39 +0800 Subject: [PATCH 06/12] =?UTF-8?q?fix:=20token=E6=8D=A2=E6=88=90=E6=9C=89?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_check.yml b/.github/workflows/issue_check.yml index 0a34b0f..93642ca 100644 --- a/.github/workflows/issue_check.yml +++ b/.github/workflows/issue_check.yml @@ -16,7 +16,7 @@ jobs: wget https://raw.githubusercontent.com/chenxuuu/action/main/scripts/issue_check.py - name: check issue env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ISSUE_CHECK_TOKEN }} ISSUE_URL: ${{ github.event.issue.html_url }} run: | cd .. From 955d3ba9edd33b70867e664e75738d38c74bd1f8 Mon Sep 17 00:00:00 2001 From: chenxuuu Date: Wed, 13 Dec 2023 16:45:56 +0800 Subject: [PATCH 07/12] =?UTF-8?q?add:=20=E6=89=8B=E5=8A=A8=E6=A3=80?= =?UTF-8?q?=E6=9F=A5issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue_check.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue_check.yml b/.github/workflows/issue_check.yml index 93642ca..bd0bba3 100644 --- a/.github/workflows/issue_check.yml +++ b/.github/workflows/issue_check.yml @@ -3,9 +3,15 @@ name: issue_check on: issues: types: [opened] + workflow_dispatch: + inputs: + issue_url: + description: 'issue url' + required: true + default: 'https://github.com/[user]/[repo]/issues/[id]' jobs: - ssh: + issue_check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,6 +24,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.ISSUE_CHECK_TOKEN }} ISSUE_URL: ${{ github.event.issue.html_url }} + ISSUE_URL_INPUT: ${{ github.event.inputs.issue_url }} run: | cd .. python issue_check.py From 72223712242df650d9d05dc40b7d6af553fe9a07 Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Sun, 31 Dec 2023 23:10:45 +0800 Subject: [PATCH 08/12] =?UTF-8?q?update:=20ISP=E4=BD=BF=E7=94=A8AirISP-nex?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform.txt b/platform.txt index 501d7b9..1e34b8e 100644 --- a/platform.txt +++ b/platform.txt @@ -1,5 +1,5 @@ name=Air MCU -version=0.6.1 +version=0.6.3 ## compiler variables 编译器的路径 compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/ @@ -167,9 +167,9 @@ recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* ## ## AirISP ## -tools.AirISP.path={runtime.tools.AirISP.path} -tools.AirISP.cmd=AirISP -tools.AirISP.cmd.windows=AirISP.exe +tools.AirISP.path={runtime.tools.AirISP-next.path} +tools.AirISP.cmd=AirISP-next +tools.AirISP.cmd.windows=AirISP-next.exe ## Upload Sketch ## ------------- From a3cad55305d01cc1984eb7f57060799b851c84dd Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Mon, 1 Jan 2024 00:07:09 +0800 Subject: [PATCH 09/12] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 1e34b8e..d70ea4a 100644 --- a/platform.txt +++ b/platform.txt @@ -167,7 +167,7 @@ recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* ## ## AirISP ## -tools.AirISP.path={runtime.tools.AirISP-next.path} +tools.AirISP.path={runtime.tools.AirISP.path} tools.AirISP.cmd=AirISP-next tools.AirISP.cmd.windows=AirISP-next.exe From 0a0ea97c2f7a47c1bb8e36040f5719621a6e3d4f Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Mon, 1 Jan 2024 00:13:33 +0800 Subject: [PATCH 10/12] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform.txt b/platform.txt index d70ea4a..9076add 100644 --- a/platform.txt +++ b/platform.txt @@ -176,14 +176,14 @@ tools.AirISP.cmd.windows=AirISP-next.exe tools.AirISP.upload.protocol=serial tools.AirISP.upload.params.verbose= tools.AirISP.upload.params.quiet= -tools.AirISP.upload.pattern_args=--chip "auto" --port "{serial.port}" --baud {upload.speed} --before {upload.boot} --after hard_reset write_flash -e -p 0x08000000 "{build.path}/{build.project_name}.bin" +tools.AirISP.upload.pattern_args=--chip "auto" --port "{serial.port}" --baud {upload.speed} --before {upload.boot} --after hard_reset write_flash -e 0x08000000 "{build.path}/{build.project_name}.hex" tools.AirISP.upload.pattern="{path}/{cmd}" {upload.pattern_args} ## Program Application ## ------------------- tools.AirISP.program.params.verbose= tools.AirISP.program.params.quiet= -tools.AirISP.program.pattern_args=--chip "auto" --port "{serial.port}" --baud {upload.speed} --before {upload.boot} --after hard_reset write_flash -e -p 0x08000000 "{build.path}/{build.project_name}.bin" +tools.AirISP.program.pattern_args=--chip "auto" --port "{serial.port}" --baud {upload.speed} --before {upload.boot} --after hard_reset write_flash -e 0x08000000 "{build.path}/{build.project_name}.hex" tools.AirISP.program.pattern="{path}/{cmd}" {program.pattern_args} ## Erase Chip (before burning the bootloader) From fd99de947b2b648f5f21724057fa0b02d05d9a00 Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Sun, 28 Jan 2024 21:59:32 +0800 Subject: [PATCH 11/12] =?UTF-8?q?fix:=20=E6=97=B6=E9=92=9F=E6=BA=90?= =?UTF-8?q?=E5=AE=8F=E5=AE=9A=E4=B9=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards.txt | 30 +++++++-------- variants/AIR001/AIR001_DEV/generic_clock.c | 45 ---------------------- variants/AIR401/AIR401_DEV/generic_clock.c | 41 +------------------- 3 files changed, 16 insertions(+), 100 deletions(-) diff --git a/boards.txt b/boards.txt index df8b11f..1f35841 100644 --- a/boards.txt +++ b/boards.txt @@ -66,48 +66,48 @@ Air001Dev.menu.UploadSpeed.1200.upload.speed=1200 # HSI/HSE选择和主频 Air001Dev.menu.ClockSourceAndFrequency.HSI4M_HCLK4M=HSI 4Mhz, HCLK 4Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSI4M_HCLK4M.build.temp=-D{build.series}_HSI_4M_HCLK_4M +Air001Dev.menu.ClockSourceAndFrequency.HSI4M_HCLK4M.build.temp=-D{build.series}_HSI_4M_HCLK_4M -DHSI_VALUE=4000000 Air001Dev.menu.ClockSourceAndFrequency.HSI4M_HCLK4M.build.f_cpu=4000000L Air001Dev.menu.ClockSourceAndFrequency.HSI8M_HCLK8M=HSI 8Mhz, HCLK 8Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSI8M_HCLK8M.build.temp=-D{build.series}_HSI_8M_HCLK_8M +Air001Dev.menu.ClockSourceAndFrequency.HSI8M_HCLK8M.build.temp=-D{build.series}_HSI_8M_HCLK_8M -DHSI_VALUE=8000000 Air001Dev.menu.ClockSourceAndFrequency.HSI8M_HCLK8M.build.f_cpu=8000000L Air001Dev.menu.ClockSourceAndFrequency.HSI16M_HCLK16M=HSI 16Mhz, HCLK 16Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSI16M_HCLK16M.build.temp=-D{build.series}_HSI_16M_HCLK_16M +Air001Dev.menu.ClockSourceAndFrequency.HSI16M_HCLK16M.build.temp=-D{build.series}_HSI_16M_HCLK_16M -DHSI_VALUE=16000000 Air001Dev.menu.ClockSourceAndFrequency.HSI16M_HCLK16M.build.f_cpu=16000000L Air001Dev.menu.ClockSourceAndFrequency.HSI22_12M_HCLK22_12M=HSI 22.12Mhz, HCLK 22.12Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSI22_12M_HCLK22_12M.build.temp=-D{build.series}_HSI_22_12M_HCLK_22_12M +Air001Dev.menu.ClockSourceAndFrequency.HSI22_12M_HCLK22_12M.build.temp=-D{build.series}_HSI_22_12M_HCLK_22_12M -DHSI_VALUE=22120000 Air001Dev.menu.ClockSourceAndFrequency.HSI22_12M_HCLK22_12M.build.f_cpu=22120000L Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M=HSI 24Mhz, HCLK 24Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.temp=-D{build.series}_HSI_24M_HCLK_24M +Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.temp=-D{build.series}_HSI_24M_HCLK_24M -DHSI_VALUE=24000000 Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.f_cpu=24000000L Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK48M=HSI 24Mhz, HCLK 48Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK48M.build.temp=-D{build.series}_HSI_24M_HCLK_48M +Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK48M.build.temp=-D{build.series}_HSI_24M_HCLK_48M -DHSI_VALUE=24000000 Air001Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK48M.build.f_cpu=48000000L Air001Dev.menu.ClockSourceAndFrequency.HSE8M_HCLK8M=HSE 8Mhz, HCLK 8Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSE8M_HCLK8M.build.temp=-D{build.series}_HSE_8M_HCLK_8M +Air001Dev.menu.ClockSourceAndFrequency.HSE8M_HCLK8M.build.temp=-D{build.series}_HSE_8M_HCLK_8M -DHSE_VALUE=8000000 Air001Dev.menu.ClockSourceAndFrequency.HSE8M_HCLK8M.build.f_cpu=8000000L Air001Dev.menu.ClockSourceAndFrequency.HSE16M_HCLK16M=HSE 16Mhz, HCLK 16Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSE16M_HCLK16M.build.temp=-D{build.series}_HSE_16M_HCLK_16M +Air001Dev.menu.ClockSourceAndFrequency.HSE16M_HCLK16M.build.temp=-D{build.series}_HSE_16M_HCLK_16M -DHSE_VALUE=16000000 Air001Dev.menu.ClockSourceAndFrequency.HSE16M_HCLK16M.build.f_cpu=16000000L Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M=HSE 24Mhz, HCLK 24Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.temp=-D{build.series}_HSE_24M_HCLK_24M +Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.temp=-D{build.series}_HSE_24M_HCLK_24M -DHSE_VALUE=24000000 Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.f_cpu=24000000L Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK48M=HSE 24Mhz, HCLK 48Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK48M.build.temp=-D{build.series}_HSE_24M_HCLK_48M +Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK48M.build.temp=-D{build.series}_HSE_24M_HCLK_48M -DHSE_VALUE=24000000 Air001Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK48M.build.f_cpu=48000000L Air001Dev.menu.ClockSourceAndFrequency.HSE32M_HCLK32M=HSE 32Mhz, HCLK 32Mhz -Air001Dev.menu.ClockSourceAndFrequency.HSE32M_HCLK32M.build.temp=-D{build.series}_HSE_32M_HCLK_32M +Air001Dev.menu.ClockSourceAndFrequency.HSE32M_HCLK32M.build.temp=-D{build.series}_HSE_32M_HCLK_32M -DHSE_VALUE=32000000 Air001Dev.menu.ClockSourceAndFrequency.HSE32M_HCLK32M.build.f_cpu=32000000L Air001Dev.menu.LowSpeedClockSource.None=None @@ -218,11 +218,11 @@ Air401Dev.menu.UploadSpeed.1200.upload.speed=1200 # HSI/HSE选择和主频 Air401Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M=HSI 24Mhz, HCLK 24Mhz -Air401Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.temp=-D{build.series}_HSI_24M_HCLK_24M +Air401Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.temp=-D{build.series}_HSI_24M_HCLK_24M -DHSI_VALUE=24000000 Air401Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.f_cpu=24000000L Air401Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M=HSE 24Mhz, HCLK 24Mhz -Air401Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.temp=-D{build.series}_HSE_24M_HCLK_24M +Air401Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.temp=-D{build.series}_HSE_24M_HCLK_24M -DHSE_VALUE=24000000 Air401Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.f_cpu=24000000L Air401Dev.menu.LowSpeedClockSource.None=None @@ -330,10 +330,10 @@ Air32F103xx.menu.UploadSpeed.1200=1200 Air32F103xx.menu.UploadSpeed.1200.upload.speed=1200 Air32F103xx.menu.ClockSoure.HSE8M=HSE (8Mhz) -Air32F103xx.menu.ClockSoure.HSE8M.build.ClockSoureTemp=-DUSE_HSE +Air32F103xx.menu.ClockSoure.HSE8M.build.ClockSoureTemp=-DUSE_HSE -DHSE_VALUE=8000000 Air32F103xx.menu.ClockSoure.HSE8M.build.ClockSoure=8000000L Air32F103xx.menu.ClockSoure.HSE16M=HSE (16Mhz) -Air32F103xx.menu.ClockSoure.HSE16M.build.ClockSoureTemp=-DUSE_HSE +Air32F103xx.menu.ClockSoure.HSE16M.build.ClockSoureTemp=-DUSE_HSE -DHSE_VALUE=16000000 Air32F103xx.menu.ClockSoure.HSE16M.build.ClockSoure=16000000L Air32F103xx.menu.ClockSoure.HSI8M=HSI (8Mhz) Air32F103xx.menu.ClockSoure.HSI8M.build.ClockSoureTemp=-DUSE_HSI diff --git a/variants/AIR001/AIR001_DEV/generic_clock.c b/variants/AIR001/AIR001_DEV/generic_clock.c index 80c3720..43d867e 100644 --- a/variants/AIR001/AIR001_DEV/generic_clock.c +++ b/variants/AIR001/AIR001_DEV/generic_clock.c @@ -38,10 +38,6 @@ WEAK void SystemClock_Config(void) #endif #if defined(AIR001xx_HSI_4M_HCLK_4M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 4000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -67,10 +63,6 @@ WEAK void SystemClock_Config(void) Error_Handler(); } #elif defined(AIR001xx_HSI_8M_HCLK_8M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 8000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -97,10 +89,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_16M_HCLK_16M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 16000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -127,10 +115,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_22_12M_HCLK_22_12M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 22120000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -157,10 +141,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_24M_HCLK_24M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 24000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -187,10 +167,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_24M_HCLK_48M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 24000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -217,10 +193,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_8M_HCLK_8M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 8000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; /* 开启HSI */ @@ -248,10 +220,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_16M_HCLK_16M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 16000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; /* 开启HSI */ @@ -279,10 +247,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_24M_HCLK_24M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 24000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; @@ -310,10 +274,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_32M_HCLK_32M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 32000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; @@ -341,11 +301,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_24M_HCLK_48M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 24000000U - /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; diff --git a/variants/AIR401/AIR401_DEV/generic_clock.c b/variants/AIR401/AIR401_DEV/generic_clock.c index a8600d3..b3c0869 100644 --- a/variants/AIR401/AIR401_DEV/generic_clock.c +++ b/variants/AIR401/AIR401_DEV/generic_clock.c @@ -38,10 +38,6 @@ WEAK void SystemClock_Config(void) #endif #if defined(AIR001xx_HSI_4M_HCLK_4M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 4000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -67,10 +63,6 @@ WEAK void SystemClock_Config(void) Error_Handler(); } #elif defined(AIR001xx_HSI_8M_HCLK_8M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 8000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -97,10 +89,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_16M_HCLK_16M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 16000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -127,10 +115,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_22_12M_HCLK_22_12M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 22120000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -157,10 +141,7 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_24M_HCLK_24M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 24000000U + /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -187,10 +168,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSI_24M_HCLK_48M) -#ifdef HSI_VALUE -#undef HSI_VALUE -#endif -#define HSI_VALUE 24000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; /* 开启HSI */ @@ -248,10 +225,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_16M_HCLK_16M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 16000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; /* 开启HSI */ @@ -279,10 +252,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_24M_HCLK_24M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 24000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; @@ -310,10 +279,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_32M_HCLK_32M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 32000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ RCC_OscInitStruct.HSIState = RCC_HSI_OFF; @@ -341,10 +306,6 @@ WEAK void SystemClock_Config(void) } #elif defined(AIR001xx_HSE_24M_HCLK_48M) -#ifdef HSE_VALUE -#undef HSE_VALUE -#endif -#define HSE_VALUE 24000000U /* 振荡器配置 */ RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE; /* 选择RCC振荡器为HSE */ From 0e97a0fad2ac5b4fb298439842f03596e9d9d225 Mon Sep 17 00:00:00 2001 From: chenxuuu Date: Tue, 19 Mar 2024 09:59:37 +0800 Subject: [PATCH 12/12] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E4=B8=8B?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 9076add..8d14f84 100644 --- a/platform.txt +++ b/platform.txt @@ -1,5 +1,5 @@ name=Air MCU -version=0.6.3 +version=0.6.4 ## compiler variables 编译器的路径 compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/