diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c9cd9123227..8d746a759ca 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -20,6 +20,7 @@ /bsp/maxim @supperthomas *arduino* @mysterywolf +*.attach @mysterywolf /components/libc/ @mysterywolf /components/dfs/dfs_v2/ @BernardXiong diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt new file mode 100644 index 00000000000..345dcda8f5a --- /dev/null +++ b/.github/actions/spelling/allow.txt @@ -0,0 +1 @@ +github diff --git a/.github/actions/spelling/only.txt b/.github/actions/spelling/only.txt new file mode 100644 index 00000000000..024b8d4fdc8 --- /dev/null +++ b/.github/actions/spelling/only.txt @@ -0,0 +1 @@ +^documentation/.* diff --git a/.github/workflows/action_tools.yml b/.github/workflows/action_tools.yml index f5afc17a563..92fe4c45227 100644 --- a/.github/workflows/action_tools.yml +++ b/.github/workflows/action_tools.yml @@ -40,7 +40,7 @@ jobs: env: TEST_BSP_ROOT: bsp/stm32/stm32f407-atk-explorer steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Tools shell: bash diff --git a/.github/workflows/action_utest.yml b/.github/workflows/action_utest.yml index a346b2388e8..99690a6e488 100644 --- a/.github/workflows/action_utest.yml +++ b/.github/workflows/action_utest.yml @@ -55,7 +55,7 @@ jobs: TEST_CONFIG_FILE: ${{ matrix.legs.CONFIG_FILE }} TEST_SD_FILE: ${{ matrix.legs.SD_FILE }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Tools shell: bash diff --git a/.github/workflows/bsp_buildings.yml b/.github/workflows/bsp_buildings.yml index 6c378923516..8ed79ff66b0 100644 --- a/.github/workflows/bsp_buildings.yml +++ b/.github/workflows/bsp_buildings.yml @@ -50,8 +50,8 @@ jobs: - "at91/at91sam9260" - "wch/arm/ch32f103c8-core" - "wch/arm/ch32f203r-evt" - - "synwit/swm320" - - "synwit/swm341" + - "synwit/swm320-mini" + - "synwit/swm341-mini" - "beaglebone" - "zynqmp-r5-axu4ev" - "at32/at32f402-start" @@ -125,6 +125,7 @@ jobs: - "stm32/stm32f407-atk-explorer" - "stm32/stm32f407-robomaster-c" - "stm32/stm32f407-st-discovery" + - "stm32/stm32f407-rt-spark" - "stm32/stm32f410-st-nucleo" - "stm32/stm32f411-atk-nano" - "stm32/stm32f411-st-nucleo" @@ -154,6 +155,7 @@ jobs: - "stm32/stm32g491-st-nucleo" - "stm32/stm32g474-st-nucleo" - "stm32/stm32h563-st-nucleo" + - "stm32/stm32h503-st-nucleo" - "stm32/stm32h743-armfly-v7" - "stm32/stm32h743-atk-apollo" - "stm32/stm32h743-openmv-h7plus" @@ -317,7 +319,7 @@ jobs: SUB_RTT_BSP: - "x86" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: @@ -420,19 +422,4 @@ jobs: SRTT_BSP: ${{ join(matrix.legs.SUB_RTT_BSP, ',') }} run: | source ~/.env/env.sh - failed=0 - count=0 - for bsp in $(echo $SRTT_BSP | tr ',' '\n'); do - count=$((count+1)) - echo "::group::Compiling BSP: ==$count=== $bsp ====" - echo bsp/$bsp - ls bsp/$bsp/Kconfig && scons -C bsp/$bsp --pyconfig-silent - pushd bsp/$bsp && pkgs --update && popd - scons -C bsp/$bsp -j$(nproc) --debug=time | tee output.log || \ - { total_time=$(grep "Total command execution time" output.log | awk '{print $5}'); \ - failed=$((failed+1)) ; echo "::endgroup::" ; echo "::error::build $bsp failed" ; \ - echo "- ❌ build $bsp failed in $total_time seconds " >> $GITHUB_STEP_SUMMARY ; } && \ - { total_time=$(grep "Total command execution time" output.log | awk '{print $5}'); \ - echo "- ✅ build $bsp success in $total_time seconds " >> $GITHUB_STEP_SUMMARY ; echo "::endgroup::" ; } - done - exit $failed + python tools/ci/bsp_buildings.py diff --git a/.github/workflows/compile_bsp_with_drivers.yml b/.github/workflows/compile_bsp_with_drivers.yml index b3e5221c00c..634eab49bb0 100644 --- a/.github/workflows/compile_bsp_with_drivers.yml +++ b/.github/workflows/compile_bsp_with_drivers.yml @@ -37,7 +37,7 @@ jobs: name: BSP Compilation with More Drivers steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index 5066003a2ba..f86d331e407 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest name: doxygen_doc generate steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'recursive' - name: Install Tools diff --git a/.github/workflows/file_check.yml b/.github/workflows/file_check.yml index ed6a61788b5..2959db7e585 100644 --- a/.github/workflows/file_check.yml +++ b/.github/workflows/file_check.yml @@ -15,7 +15,7 @@ jobs: name: Scan code format and license if: github.repository_owner == 'RT-Thread' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/.github/workflows/manual_dist.yml b/.github/workflows/manual_dist.yml index 205eb151cef..875e8412d92 100644 --- a/.github/workflows/manual_dist.yml +++ b/.github/workflows/manual_dist.yml @@ -77,7 +77,7 @@ jobs: runs-on: ubuntu-latest name: ${{ github.event.inputs.bsp_options }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/.github/workflows/manual_trigger_scons_STM32_all.yml b/.github/workflows/manual_trigger_scons_STM32_all.yml index dbb773f54cf..ee99da365de 100644 --- a/.github/workflows/manual_trigger_scons_STM32_all.yml +++ b/.github/workflows/manual_trigger_scons_STM32_all.yml @@ -127,7 +127,7 @@ jobs: steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/.github/workflows/manual_trigger_scons_except_STM32_all.yml b/.github/workflows/manual_trigger_scons_except_STM32_all.yml index 7d839c2a476..66152955fbd 100644 --- a/.github/workflows/manual_trigger_scons_except_STM32_all.yml +++ b/.github/workflows/manual_trigger_scons_except_STM32_all.yml @@ -238,8 +238,8 @@ jobs: - {RTT_BSP_NAME: "smartfusion2", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "smartfusion2"} - {RTT_BSP_NAME: "sparkfun-redv", RTT_TOOL_CHAIN: "sourcery-riscv64-unknown-elf", RTT_BSP: "sparkfun-redv"} #- {RTT_BSP_NAME: "synopsys_boards", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "synopsys/boards"} #不支持的toolchain - - {RTT_BSP_NAME: "synwit_swm320", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "synwit/swm320"} - - {RTT_BSP_NAME: "synwit_swm341", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "synwit/swm341"} + - {RTT_BSP_NAME: "synwit_swm320-mini", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "synwit/swm320-mini"} + - {RTT_BSP_NAME: "synwit_swm341-mini", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "synwit/swm341-mini"} #- {RTT_BSP_NAME: "tae32f5300", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "tae32f5300"} #musl toolchain 未支持 #- {RTT_BSP_NAME: "taihu", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "taihu"} #powerpc-eabi-gcc 未支持 #- {RTT_BSP_NAME: "thead-smart", RTT_TOOL_CHAIN: "sourcery-riscv64-unknown-elf", RTT_BSP: "thead-smart"} #menuconfig有问题 @@ -268,7 +268,7 @@ jobs: - {RTT_BSP_NAME: "zynqmp-r5-axu4ev", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "zynqmp-r5-axu4ev"} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/.github/workflows/manual_trigger_scons_fail_bsp_all.yml b/.github/workflows/manual_trigger_scons_fail_bsp_all.yml index f2ef5ceb636..8ad5188b239 100644 --- a/.github/workflows/manual_trigger_scons_fail_bsp_all.yml +++ b/.github/workflows/manual_trigger_scons_fail_bsp_all.yml @@ -102,7 +102,7 @@ jobs: - {RTT_BSP_NAME: "yichip_yc3122-pos", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "yichip/yc3122-pos"} #编译问题 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml new file mode 100644 index 00000000000..af0942c2783 --- /dev/null +++ b/.github/workflows/spell_check.yml @@ -0,0 +1,39 @@ +name: Check Spelling + +on: + push: + branches: + - master + paths: + - 'documentation/**' + pull_request: + branches: + - master + paths: + - 'documentation/**' +jobs: + spelling: + name: Check Spelling + runs-on: ubuntu-latest + if: github.repository_owner == 'RT-Thread' + steps: + - name: output ignore words info + run: | + echo "> If any words shown as incorrect are spelled correctly, please add them to .github/actions/spelling/allow.txt." >> $GITHUB_STEP_SUMMARY + - name: check spelling + id: spelling + uses: check-spelling/check-spelling@v0.0.20 + with: + checkout: true + check_file_names: 0 + only_check_changed_files: 1 + post_comment: 0 + extra_dictionaries: + cspell:en_US/src/en_US.txt + cspell:software-terms/softwareTerms.txt + cspell:python/python.txt + cspell:cpp/cpp.txt + check_extra_dictionaries: '' + - name: output Success info + run: | + echo "✅ Check spelling success." >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/static_code_analysis.yml b/.github/workflows/static_code_analysis.yml index 4a222cc7e01..025e458517d 100644 --- a/.github/workflows/static_code_analysis.yml +++ b/.github/workflows/static_code_analysis.yml @@ -15,7 +15,7 @@ jobs: name: Static code analysis if: github.repository_owner == 'RT-Thread' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: diff --git a/bsp/raspberry-pico/Kconfig b/bsp/raspberry-pico/Kconfig index 2dce6c344b6..a88ee42a257 100644 --- a/bsp/raspberry-pico/Kconfig +++ b/bsp/raspberry-pico/Kconfig @@ -44,6 +44,18 @@ menu "Onboard Peripheral Drivers" default y endif + config BSP_USING_ARDUINO + bool "Compatible with Arduino Ecosystem (RTduino)" + select PKG_USING_RTDUINO + select BSP_USING_UART0 + select BSP_UART0_TX_PIN_0 + select BSP_UART0_RX_PIN_1 + select BSP_USING_UART1 + select BSP_UART1_TX_PIN_8 + select BSP_UART1_RX_PIN_9 + select BSP_USING_GPIO + default n + config BSP_USING_ON_CHIP_FLASH bool "Enable On-Chip FLASH" select FAL_DEBUG_CONFIG @@ -372,14 +384,32 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM0" default n if BSP_USING_PWM0 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM0 + default BSP_PWM0_A_PIN_0 + config BSP_PWM0_A_PIN_0 + bool "0" + config BSP_PWM0_A_PIN_16 + bool "16" + endchoice config BSP_PWM0_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 0 + int + default 0 if BSP_PWM0_A_PIN_0 + default 16 if BSP_PWM0_A_PIN_16 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM0 + default BSP_PWM0_B_PIN_1 + config BSP_PWM0_B_PIN_1 + bool "1" + config BSP_PWM0_B_PIN_17 + bool "17" + endchoice config BSP_PWM0_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 1 + int + default 1 if BSP_PWM0_B_PIN_1 + default 17 if BSP_PWM0_B_PIN_17 config BSP_PWM0_A_ALL bool "pwm slice use all A pin" default n @@ -392,14 +422,32 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM1" default n if BSP_USING_PWM1 - config BSP_PWM_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 2 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM1 + default BSP_PWM1_A_PIN_2 + config BSP_PWM1_A_PIN_2 + bool "2" + config BSP_PWM1_A_PIN_18 + bool "18" + endchoice + config BSP_PWM1_A_PIN + int + default 2 if BSP_PWM1_A_PIN_2 + default 18 if BSP_PWM1_A_PIN_18 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM1 + default BSP_PWM1_B_PIN_3 + config BSP_PWM1_B_PIN_3 + bool "3" + config BSP_PWM1_B_PIN_19 + bool "19" + endchoice config BSP_PWM1_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 3 + int + default 3 if BSP_PWM1_B_PIN_3 + default 19 if BSP_PWM1_B_PIN_19 config BSP_PWM1_A_ALL bool "pwm slice use all A pin" default n @@ -412,14 +460,32 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM2" default n if BSP_USING_PWM2 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM2 + default BSP_PWM2_A_PIN_4 + config BSP_PWM2_A_PIN_4 + bool "4" + config BSP_PWM2_A_PIN_20 + bool "20" + endchoice config BSP_PWM2_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 4 + int + default 4 if BSP_PWM2_A_PIN_4 + default 20 if BSP_PWM2_A_PIN_20 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM2 + default BSP_PWM2_B_PIN_5 + config BSP_PWM2_B_PIN_5 + bool "5" + config BSP_PWM2_B_PIN_21 + bool "21" + endchoice config BSP_PWM2_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 5 + int + default 5 if BSP_PWM2_B_PIN_5 + default 21 if BSP_PWM2_B_PIN_21 config BSP_PWM2_A_ALL bool "pwm slice use all A pin" default n @@ -432,14 +498,32 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM3" default n if BSP_USING_PWM3 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM3 + default BSP_PWM3_A_PIN_6 + config BSP_PWM3_A_PIN_6 + bool "6" + config BSP_PWM3_A_PIN_22 + bool "22" + endchoice config BSP_PWM3_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 6 + int + default 6 if BSP_PWM3_A_PIN_6 + default 22 if BSP_PWM3_A_PIN_22 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM3 + default BSP_PWM3_B_PIN_7 + config BSP_PWM3_B_PIN_7 + bool "7" + config BSP_PWM3_B_PIN_23 + bool "23" + endchoice config BSP_PWM3_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 7 + int + default 7 if BSP_PWM3_B_PIN_7 + default 23 if BSP_PWM3_B_PIN_23 config BSP_PWM3_A_ALL bool "pwm slice use all A pin" default n @@ -452,14 +536,32 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM4" default n if BSP_USING_PWM4 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM4 + default BSP_PWM4_A_PIN_8 + config BSP_PWM4_A_PIN_8 + bool "8" + config BSP_PWM4_A_PIN_24 + bool "24" + endchoice config BSP_PWM4_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 8 + int + default 8 if BSP_PWM4_A_PIN_8 + default 24 if BSP_PWM4_A_PIN_24 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM4 + default BSP_PWM4_B_PIN_9 + config BSP_PWM4_B_PIN_9 + bool "9" + config BSP_PWM4_B_PIN_25 + bool "25" + endchoice config BSP_PWM4_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 9 + int + default 9 if BSP_PWM4_B_PIN_9 + default 25 if BSP_PWM4_B_PIN_25 config BSP_PWM4_A_ALL bool "pwm slice use all A pin" default n @@ -472,14 +574,32 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM5" default n if BSP_USING_PWM5 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM5 + default BSP_PWM5_A_PIN_10 + config BSP_PWM5_A_PIN_10 + bool "10" + config BSP_PWM5_A_PIN_26 + bool "26" + endchoice config BSP_PWM5_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 10 + int + default 10 if BSP_PWM5_A_PIN_10 + default 26 if BSP_PWM5_A_PIN_26 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM5 + default BSP_PWM5_B_PIN_11 + config BSP_PWM5_B_PIN_11 + bool "11" + config BSP_PWM5_B_PIN_27 + bool "27" + endchoice config BSP_PWM5_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 11 + int + default 10 if BSP_PWM5_B_PIN_10 + default 27 if BSP_PWM5_B_PIN_27 config BSP_PWM5_A_ALL bool "pwm slice use all A pin" default n @@ -492,14 +612,32 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM6" default n if BSP_USING_PWM6 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM6 + default BSP_PWM6_A_PIN_12 + config BSP_PWM6_A_PIN_12 + bool "12" + config BSP_PWM6_A_PIN_28 + bool "28" + endchoice config BSP_PWM6_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 12 + int + default 12 if BSP_PWM6_A_PIN_12 + default 28 if BSP_PWM6_A_PIN_28 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM6 + default BSP_PWM6_B_PIN_13 + config BSP_PWM6_B_PIN_13 + bool "13" + config BSP_PWM6_B_PIN_29 + bool "29" + endchoice config BSP_PWM6_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 13 + int + default 13 if BSP_PWM6_B_PIN_13 + default 29 if BSP_PWM6_B_PIN_29 config BSP_PWM6_A_ALL bool "pwm slice use all A pin" default n @@ -512,14 +650,26 @@ menu "On-chip Peripheral Drivers" bool "Enable PWM7" default n if BSP_USING_PWM7 + choice + prompt "pwm slice A pin number (GP)" + depends on BSP_USING_PWM7 + default BSP_PWM7_A_PIN_14 + config BSP_PWM7_A_PIN_14 + bool "14" + endchoice config BSP_PWM7_A_PIN - int "pwm slice A pin number (GP)" - range 0 29 - default 14 + int + default 14 if BSP_PWM7_A_PIN_14 + choice + prompt "pwm slice B pin number (GP)" + depends on BSP_USING_PWM7 + default BSP_PWM7_B_PIN_15 + config BSP_PWM7_B_PIN_15 + bool "15" + endchoice config BSP_PWM7_B_PIN - int "pwm slice B pin number (GP)" - range 0 29 - default 15 + int + default 15 if BSP_PWM7_B_PIN_15 endif endif diff --git a/bsp/raspberry-pico/SConstruct b/bsp/raspberry-pico/SConstruct index bb72242f849..49b94d7c60e 100644 --- a/bsp/raspberry-pico/SConstruct +++ b/bsp/raspberry-pico/SConstruct @@ -16,7 +16,7 @@ DefaultEnvironment(tools=[]) env = Environment(tools = ['mingw'], AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, - CXX = rtconfig.CXX, + CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, AR = rtconfig.AR, ARFLAGS = '-rc', LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) diff --git a/bsp/raspberry-pico/applications/SConscript b/bsp/raspberry-pico/applications/SConscript index 496584a1ae4..e1c7fa59962 100644 --- a/bsp/raspberry-pico/applications/SConscript +++ b/bsp/raspberry-pico/applications/SConscript @@ -1,9 +1,12 @@ from building import * import os -cwd = GetCurrentDir() -src = ['main.c'] +cwd = GetCurrentDir() CPPPATH = [cwd] +src = Glob('*.c') + +if GetDepend(['PKG_USING_RTDUINO']) and not GetDepend(['RTDUINO_NO_SETUP_LOOP']): + src += ['arduino_main.cpp'] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/raspberry-pico/applications/arduino_main.cpp b/bsp/raspberry-pico/applications/arduino_main.cpp new file mode 100644 index 00000000000..d04447ae443 --- /dev/null +++ b/bsp/raspberry-pico/applications/arduino_main.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-11-27 ShichengChu first version + */ + +#include + +void setup(void) +{ + /* put your setup code here, to run once: */ + Serial.begin(); +} + +void loop(void) +{ + /* put your main code here, to run repeatedly: */ + Serial.println("Hello Arduino!"); + delay(800); +} diff --git a/bsp/raspberry-pico/applications/arduino_pinout/README.md b/bsp/raspberry-pico/applications/arduino_pinout/README.md new file mode 100644 index 00000000000..60e936910dc --- /dev/null +++ b/bsp/raspberry-pico/applications/arduino_pinout/README.md @@ -0,0 +1,54 @@ +# xxx 开发板的Arduino生态兼容说明 + +## 1 RTduino - RT-Thread的Arduino生态兼容层 + +xxx 开发板已经完整适配了[RTduino软件包](https://github.com/RTduino/RTduino),即RT-Thread的Arduino生态兼容层。用户可以按照Arduino的编程习惯来操作该BSP,并且可以使用大量Arduino社区丰富的库,是对RT-Thread生态的极大增强。更多信息,请参见[RTduino软件包说明文档](https://github.com/RTduino/RTduino)。 + +### 1.1 如何开启针对本BSP的Arduino生态兼容层 + +Env 工具下敲入 menuconfig 命令,或者 RT-Thread Studio IDE 下选择 RT-Thread Settings: + +```Kconfig +Hardware Drivers Config ---> + Onboard Peripheral Drivers ---> + [*] Compatible with Arduino Ecosystem (RTduino) +``` + +## 2 Arduino引脚排布 + +更多引脚布局相关信息参见 [pins_arduino.c](pins_arduino.c) 和 [pins_arduino.h](pins_arduino.h)。 + +![xxx-pinout](xxx-pinout.jpg) +| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 | +| ------------------- | --------- | ---- | ------------------------------------------------------------------------- | +| 0 (D0) | P | 是/否 | Serial-TX,默认被RT-Thread的UART设备框架uart1接管 | +| 1 (D1) | P | 是/否 | Serial-RX,默认被RT-Thread的UART设备框架uart1接管 | +| 2 (D2) | P | 是/否 | | +| 3 (D3) | P | 是/否 | | +| 4 (D4) | P | 是/否 | | +| 5 (D5) | P | 是/否 | | +| 6 (D6) | P | 是/否 | | +| 7 (D7) | P | 是/否 | | +| 8 (D8) | P | 是/否 | Serial2-TX,默认被RT-Thread的UART设备框架uart2接管 | +| 9 (D9) | P | 是/否 | Serial2-RX,默认被RT-Thread的UART设备框架uart2接管 | +| 10 (D10) | P | 是/否 | | +| 11 (D11) | P | 是/否 | | +| 12 (D12) | P | 是/否 | | +| 13 (D13) | P | 是/否 | | +| 14 (D14) | P | 是/否 | | +| 15 (D15) | P | 是/否 | | +| 16 (D16) | P | 是/否 | | +| 17 (D17) | P | 是/否 | | +| 18 (D18) | P | 是/否 | | +| 19 (D19) | P | 是/否 | | +| 20 (D20) | P | 是/否 | | +| 21 (D21) | P | 是/否 | | +| 22 (D22) | P | 是/否 | | +| 23 (D23) | P | 是/否 | 板载用户LED | +| 24 (D24) | P | 是/否 | | +| 25 (D25) | P | 是/否 | | + +> 注意: +> +> 1. xxxxxxxxx +> 2. xxxxxxxxx diff --git a/bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/Sconscript b/bsp/raspberry-pico/applications/arduino_pinout/SConscript similarity index 100% rename from bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/Sconscript rename to bsp/raspberry-pico/applications/arduino_pinout/SConscript diff --git a/bsp/raspberry-pico/applications/arduino_pinout/pins_arduino.c b/bsp/raspberry-pico/applications/arduino_pinout/pins_arduino.c new file mode 100644 index 00000000000..2bd98a1340c --- /dev/null +++ b/bsp/raspberry-pico/applications/arduino_pinout/pins_arduino.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-11-27 ShichengChu first version + */ + +#include +#include +#include "pins_arduino.h" + +/* + * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} + * [] means optional + * Digital pins must NOT give the device name and channel. + * Analog pins MUST give the device name and channel(ADC, PWM or DAC). + * Arduino Pin must keep in sequence. + */ +const pin_map_t pin_map_table[]= +{ + {D0, 0, "uart1"}, /* Serial-TX */ + {D1, 1, "uart1"}, /* Serial-RX */ + {D2, 2}, + {D3, 3}, + {D4, 4}, + {D5, 5}, + {D6, 6}, + {D7, 7}, + {D8, 8, "uart2"}, /* Serial2-TX */ + {D9, 9, "uart2"}, /* Serial2-RX */ + {D10, 10}, + {D11, 11}, + {D12, 12}, + {D13, 13}, + {D14, 14}, + {D15, 15}, + {D16, 16}, + {D17, 17}, + {D18, 18}, + {D19, 19}, + {D20, 20}, + {D21, 21}, + {D22, 22}, + {D23, 25}, /* LED_BUILTIN */ + {D24, 26}, + {D25, 27}, +}; diff --git a/bsp/raspberry-pico/applications/arduino_pinout/pins_arduino.h b/bsp/raspberry-pico/applications/arduino_pinout/pins_arduino.h new file mode 100644 index 00000000000..6d412fb4937 --- /dev/null +++ b/bsp/raspberry-pico/applications/arduino_pinout/pins_arduino.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-11-27 ShichengChu first version + */ + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +/* pins alias. Must keep in sequence */ +#define D0 (0) +#define D1 (1) +#define D2 (2) +#define D3 (3) +#define D4 (4) +#define D5 (5) +#define D6 (6) +#define D7 (7) +#define D8 (8) +#define D9 (9) +#define D10 (10) +#define D11 (11) +#define D12 (12) +#define D13 (13) +#define D14 (14) +#define D15 (15) +#define D16 (16) +#define D17 (17) +#define D18 (18) +#define D19 (19) +#define D20 (20) +#define D21 (21) +#define D22 (22) +#define D23 (23) +#define D24 (24) +#define D25 (25) + +#define F_CPU 133000000L /* CPU:133MHz */ + +#define LED_BUILTIN D23 /* Default Built-in LED */ + +/* Serial2 : P-TX P-RX */ +#define RTDUINO_SERIAL2_DEVICE_NAME "uart2" + +#endif /* Pins_Arduino_h */ diff --git a/bsp/raspberry-pico/link.ld b/bsp/raspberry-pico/link.ld index f073344f2c7..d997d973d52 100644 --- a/bsp/raspberry-pico/link.ld +++ b/bsp/raspberry-pico/link.ld @@ -87,6 +87,8 @@ SECTIONS __rt_init_start = .; KEEP(*(SORT(.rti_fn*))) __rt_init_end = .; + + . = ALIGN(4); /* Pull all c'tors into .text */ *crtbegin.o(.ctors) @@ -102,7 +104,15 @@ SECTIONS *(.dtors) *(.eh_frame*) + + PROVIDE(__ctors_start__ = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array)) + PROVIDE(__ctors_end__ = .); + . = ALIGN(4); + + _etext = .; } > FLASH .rodata : { diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_config.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_config.h index 817dee0247c..0c488d87b28 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_config.h +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_config.h @@ -13,7 +13,7 @@ #define __DRV_CONFIG_H__ #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.h b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.h index db7ff45c1b1..2d35e3bb5eb 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.h +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_eth.h @@ -33,15 +33,13 @@ /* The PHY auto-negotiate advertise register */ #define PHY_AUTONEG_ADVERTISE_REG 0x04U - -#ifdef PHY_USING_LAN8720A +#if defined(PHY_USING_LAN8720A) || defined(PHY_USING_LAN8742A) /* The PHY interrupt source flag register. */ #define PHY_INTERRUPT_FLAG_REG 0x1DU /* The PHY interrupt mask register. */ #define PHY_INTERRUPT_MASK_REG 0x1EU #define PHY_LINK_DOWN_MASK (1<<4) #define PHY_AUTO_NEGO_COMPLETE_MASK (1<<6) - /* The PHY status register. */ #define PHY_Status_REG 0x1FU #define PHY_10M_MASK (1<<2) @@ -83,24 +81,21 @@ /* The PHY interrupt mask register. */ #define PHY_INTERRUPT_MASK_REG 0x12U #define PHY_INT_MASK (1<<5) -#endif -#ifdef PHY_USING_LAN8742A +#elif defined(PHY_USING_YT8512C) /* The PHY interrupt source flag register. */ -#define PHY_INTERRUPT_FLAG_REG 0x1DU +#define PHY_INTERRUPT_FLAG_REG 0x13U /* The PHY interrupt mask register. */ -#define PHY_INTERRUPT_MASK_REG 0x1EU -#define PHY_LINK_DOWN_MASK (1<<4) -#define PHY_AUTO_NEGO_COMPLETE_MASK (1<<6) - +#define PHY_INTERRUPT_MASK_REG 0x12U +/* The PHY auto nego and link change mask. */ +#define PHY_INT_MASK (1<<15)|(3<<10) /* The PHY status register. */ -#define PHY_Status_REG 0x1FU -#define PHY_10M_MASK (1<<2) -#define PHY_100M_MASK (1<<3) -#define PHY_FULL_DUPLEX_MASK (1<<4) -#define PHY_Status_SPEED_10M(sr) ((sr) & PHY_10M_MASK) +#define PHY_Status_REG 0x11U +#define PHY_100M_MASK (1<<14) +#define PHY_FULL_DUPLEX_MASK (1<<13) +#define PHY_Status_SPEED_10M(sr) (!PHY_Status_SPEED_100M(sr)) #define PHY_Status_SPEED_100M(sr) ((sr) & PHY_100M_MASK) #define PHY_Status_FULL_DUPLEX(sr) ((sr) & PHY_FULL_DUPLEX_MASK) -#endif /* PHY_USING_LAN8742A */ +#endif /* defined(PHY_USING_LAN8720A) || defined(PHY_USING_LAN8742A) */ #endif /* __DRV_ETH_H__ */ diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f0.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f0.c index c4d379a60eb..4189a2fefae 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f0.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f0.c @@ -8,11 +8,13 @@ * 2018-12-22 zylx first version */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f1.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f1.c index fba79826cc2..7672c9d5756 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f1.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f1.c @@ -10,11 +10,13 @@ * */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f2.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f2.c index adf828169a4..351505d6b23 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f2.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f2.c @@ -8,11 +8,13 @@ * 2018-12-5 SummerGift first version */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f4.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f4.c index 1c662633939..d219f8afcbf 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f4.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f4.c @@ -8,11 +8,13 @@ * 2018-12-5 SummerGift first version */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f7.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f7.c index 27d8c93848d..82fae794a5c 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f7.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f7.c @@ -11,11 +11,13 @@ * 2021-8-11 CX fix the sector calculation error bug */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_g0.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_g0.c index f15231893a7..1733e5727ae 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_g0.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_g0.c @@ -8,11 +8,13 @@ * 2020-06-27 NU-LL first version */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_h7.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_h7.c index 76b8fded37b..7690f97c15a 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_h7.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_h7.c @@ -12,11 +12,13 @@ * 2021-3-3 zhuyf233 fix some bugs */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_l4.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_l4.c index ef944eebf3f..c12ecce8715 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_l4.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_l4.c @@ -8,11 +8,13 @@ * 2018-12-5 SummerGift first version */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_wb.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_wb.c index 1d7243f1797..e8924f494f4 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_wb.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_wb.c @@ -8,11 +8,13 @@ * 2020-10-14 Dozingfiretruck first version */ -#include "board.h" +#include +#include #ifdef BSP_USING_ON_CHIP_FLASH #include "drv_config.h" #include "drv_flash.h" +#include #if defined(RT_USING_FAL) #include "fal.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.c index fae3841a6f7..ad186e3bcd1 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_soft_spi.c @@ -8,6 +8,7 @@ * 2022-6-14 solar first version */ #include +#include #include "drv_soft_spi.h" #include "drv_config.h" diff --git a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.c b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.c index 629109fd8dc..d61fb2751e6 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.c +++ b/bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.c @@ -11,6 +11,7 @@ * 2020-10-14 Dozingfiretruck Porting for stm32wbxx * 2020-11-18 leizhixiong add STM32H7 series support * 2023-08-21 Donocean fix the MCU crash when using timer6 + * 2023-12-24 Meco Man add TIMx existing check */ #include @@ -20,6 +21,64 @@ #define LOG_TAG "drv.tim" #include +#if defined(BSP_USING_TIM1) && !defined(TIM1) +#error "timer1 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM1" +#endif +#if defined(BSP_USING_TIM2) && !defined(TIM2) +#error "timer2 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM2" +#endif +#if defined(BSP_USING_TIM3) && !defined(TIM3) +#error "timer3 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM3" +#endif +#if defined(BSP_USING_TIM4) && !defined(TIM4) +#error "timer4 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM4" +#endif +#if defined(BSP_USING_TIM5) && !defined(TIM5) +#error "timer5 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM5" +#endif +#if defined(BSP_USING_TIM6) && !defined(TIM6) +#error "timer6 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM6" +#endif +#if defined(BSP_USING_TIM7) && !defined(TIM7) +#error "timer7 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM7" +#endif +#if defined(BSP_USING_TIM8) && !defined(TIM8) +#error "timer8 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM8" +#endif +#if defined(BSP_USING_TIM9) && !defined(TIM9) +#error "timer9 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM9" +#endif +#if defined(BSP_USING_TIM10) && !defined(TIM10) +#error "timer10 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM10" +#endif +#if defined(BSP_USING_TIM11) && !defined(TIM11) +#error "timer11 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM11" +#endif +#if defined(BSP_USING_TIM12) && !defined(TIM12) +#error "timer12 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM12" +#endif +#if defined(BSP_USING_TIM13) && !defined(TIM13) +#error "timer13 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM13" +#endif +#if defined(BSP_USING_TIM14) && !defined(TIM14) +#error "timer14 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM14" +#endif +#if defined(BSP_USING_TIM15) && !defined(TIM15) +#error "timer15 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM15" +#endif +#if defined(BSP_USING_TIM16) && !defined(TIM16) +#error "timer16 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM16" +#endif +#if defined(BSP_USING_TIM17) && !defined(TIM17) +#error "timer17 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM17" +#endif +#if defined(BSP_USING_TIM18) && !defined(TIM18) +#error "timer18 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM18" +#endif +#if defined(BSP_USING_TIM19) && !defined(TIM19) +#error "timer19 doesn't exist in this STM32 series, but you enabled the BSP_USING_TIM19" +#endif + /* APBx timer clocks frequency doubler state related to APB1CLKDivider value */ void stm32_tim_pclkx_doubler_get(rt_uint32_t *pclk1_doubler, rt_uint32_t *pclk2_doubler) { @@ -450,22 +509,65 @@ static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg) stm32_tim_pclkx_doubler_get(&pclk1_doubler, &pclk2_doubler); #if defined(SOC_SERIES_STM32F2) || defined(SOC_SERIES_STM32F4) || defined(SOC_SERIES_STM32F7) - if (tim->Instance == TIM1 || tim->Instance == TIM8 || tim->Instance == TIM9 || tim->Instance == TIM10 || tim->Instance == TIM11) + if (0 +#ifdef TIM1 + || tim->Instance == TIM1 +#endif /* TIM1 */ +#ifdef TIM8 + || tim->Instance == TIM8 +#endif /* TIM8 */ +#ifdef TIM9 + || tim->Instance == TIM9 +#endif /* TIM9 */ +#ifdef TIM10 + || tim->Instance == TIM10 +#endif /* TIM10 */ +#ifdef TIM11 + || tim->Instance == TIM11 +#endif /* TIM11 */ + ) #elif defined(SOC_SERIES_STM32L4) || defined(SOC_SERIES_STM32G4) - if (tim->Instance == TIM15 || tim->Instance == TIM16 || tim->Instance == TIM17) + if (0 +#ifdef TIM15 + || tim->Instance == TIM15 +#endif /* TIM15 */ +#ifdef TIM16 + || tim->Instance == TIM16 +#endif /* TIM16 */ +#ifdef TIM17 + || tim->Instance == TIM17 +#endif /* TIM17 */ + ) #elif defined(SOC_SERIES_STM32WB) - if (tim->Instance == TIM16 || tim->Instance == TIM17) + if (0 +#ifdef TIM16 + || tim->Instance == TIM16 +#endif /* TIM16 */ +#ifdef TIM17 + || tim->Instance == TIM17 +#endif /* TIM17 */ + ) #elif defined(SOC_SERIES_STM32MP1) - if(tim->Instance == TIM14 || tim->Instance == TIM16 || tim->Instance == TIM17) + if(0 +#ifdef TIM14 + || tim->Instance == TIM14 +#endif /* TIM14 */ +#ifdef TIM16 + || tim->Instance == TIM16 +#endif /* TIM16 */ +#ifdef TIM17 + || tim->Instance == TIM17 +#endif /* TIM17 */ + ) #elif defined(SOC_SERIES_STM32F1) || defined(SOC_SERIES_STM32F0) || defined(SOC_SERIES_STM32G0) || defined(SOC_SERIES_STM32H7) if (0) #else #error "This driver has not supported this series yet!" -#endif +#endif /* defined(SOC_SERIES_STM32F2) || defined(SOC_SERIES_STM32F4) || defined(SOC_SERIES_STM32F7) */ { #if !defined(SOC_SERIES_STM32F0) && !defined(SOC_SERIES_STM32G0) val = HAL_RCC_GetPCLK2Freq() * pclk2_doubler / freq; -#endif +#endif /* !defined(SOC_SERIES_STM32F0) && !defined(SOC_SERIES_STM32G0) */ } else { diff --git a/bsp/stm32/stm32f072-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f072-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f072-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f072-st-nucleo/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f072-st-nucleo/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f072-st-nucleo/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f072-st-nucleo/Kconfig b/bsp/stm32/stm32f072-st-nucleo/Kconfig index d778e1c8055..6a26b5f00ec 100644 --- a/bsp/stm32/stm32f072-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f072-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32F072RB select RT_USING_USER_MAIN default y +config BOARD_STM32F072_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f072-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f072-st-nucleo/applications/arduino_pinout/pins_arduino.c index b402b3e5e82..f5d266ae57b 100644 --- a/bsp/stm32/stm32f072-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f072-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f091-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f091-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f091-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f091-st-nucleo/Kconfig b/bsp/stm32/stm32f091-st-nucleo/Kconfig index 41aaf93bd5c..89c8c9ac10b 100644 --- a/bsp/stm32/stm32f091-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f091-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32F091RC select RT_USING_USER_MAIN default y +config BOARD_STM32F091_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f103-100ask-mini/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-100ask-mini/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-100ask-mini/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-100ask-pro/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-100ask-pro/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-100ask-pro/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-atk-nano/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-atk-nano/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-atk-nano/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-atk-warshipv3/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-atk-warshipv3/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-atk-warshipv3/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f103-blue-pill/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f103-blue-pill/applications/arduino_pinout/pins_arduino.c index 84fc3c2984c..267d7d9e294 100644 --- a/bsp/stm32/stm32f103-blue-pill/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f103-blue-pill/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f103-dofly-M3S/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-dofly-M3S/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-dofly-M3S/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-dofly-lyc8/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-dofly-lyc8/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-dofly-lyc8/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-fire-arbitrary/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-fire-arbitrary/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-fire-arbitrary/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-gizwits-gokitv21/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-gizwits-gokitv21/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-gizwits-gokitv21/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-hw100k-ibox/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-hw100k-ibox/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-hw100k-ibox/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-onenet-nbiot/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-onenet-nbiot/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-onenet-nbiot/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-yf-ufun/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-yf-ufun/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-yf-ufun/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-ys-f1pro/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-ys-f1pro/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f103-ys-f1pro/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f107-uc-eval/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f107-uc-eval/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f107-uc-eval/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f207-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f207-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f207-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f207-st-nucleo/Kconfig b/bsp/stm32/stm32f207-st-nucleo/Kconfig index 7fca6060826..aa8c43b3888 100644 --- a/bsp/stm32/stm32f207-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f207-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32F207ZG select RT_USING_USER_MAIN default y +config BOARD_STM32F207_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f302-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f302-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f302-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f302-st-nucleo/Kconfig b/bsp/stm32/stm32f302-st-nucleo/Kconfig index fb71ffbecaf..6202c1758ac 100644 --- a/bsp/stm32/stm32f302-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f302-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32F302R8 select RT_USING_USER_MAIN default y +config BOARD_STM32F302_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f334-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f334-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f334-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f334-st-nucleo/Kconfig b/bsp/stm32/stm32f334-st-nucleo/Kconfig index e3f8480d13c..8646a659103 100644 --- a/bsp/stm32/stm32f334-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f334-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32F334R8 select RT_USING_USER_MAIN default y +config BOARD_STM32F334_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f401-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f401-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f401-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f401-st-nucleo/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f401-st-nucleo/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f401-st-nucleo/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f401-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f401-st-nucleo/applications/arduino_pinout/pins_arduino.c index b64d2745f42..8548402ac62 100644 --- a/bsp/stm32/stm32f401-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f401-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include #define DBG_TAG "RTduino.pins_arduino" #define DBG_LVL DBG_INFO diff --git a/bsp/stm32/stm32f401-weact-blackpill/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f401-weact-blackpill/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f401-weact-blackpill/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f401-weact-blackpill/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f401-weact-blackpill/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f401-weact-blackpill/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f401-weact-blackpill/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f401-weact-blackpill/applications/arduino_pinout/pins_arduino.c index bc582d70ded..924204820ce 100644 --- a/bsp/stm32/stm32f401-weact-blackpill/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f401-weact-blackpill/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f405-smdz-breadfruit/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f405-smdz-breadfruit/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f405-smdz-breadfruit/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f405zg-mini-template/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f405zg-mini-template/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f405zg-mini-template/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f407-armfly-v5/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f407-armfly-v5/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f407-armfly-v5/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/eeprom.attach b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/eeprom.attach new file mode 100644 index 00000000000..fc5e97f3b72 --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/eeprom.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_EEPROM=y diff --git a/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/esp8266.attach b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/esp8266.attach new file mode 100644 index 00000000000..4a388a990a4 --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/esp8266.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_AT_ESP8266=y diff --git a/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/ethernet.attach b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/ethernet.attach new file mode 100644 index 00000000000..d99c88a0714 --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/ethernet.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ETH=y diff --git a/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/lvgl.attach b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/lvgl.attach new file mode 100644 index 00000000000..d90eeb40aee --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/lvgl.attach @@ -0,0 +1,2 @@ +CONFIG_BSP_USING_LVGL=y +CONFIG_BSP_USING_LVGL_DEMO=y diff --git a/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/sdcard-fatfs.attach b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/sdcard-fatfs.attach new file mode 100644 index 00000000000..f2366f15bd3 --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/sdcard-fatfs.attach @@ -0,0 +1,2 @@ +CONFIG_BSP_USING_FS=y +CONFIG_BSP_USING_SDCARD_FATFS=y diff --git a/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/spiflash-littlefs.attach b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/spiflash-littlefs.attach new file mode 100644 index 00000000000..cea386771b4 --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/.ci/attachconfig/spiflash-littlefs.attach @@ -0,0 +1,2 @@ +CONFIG_BSP_USING_FS=y +CONFIG_BSP_USING_SPI_FLASH_LITTLEFS=y diff --git a/bsp/stm32/stm32f407-atk-explorer/board/Kconfig b/bsp/stm32/stm32f407-atk-explorer/board/Kconfig index c8302e8c87b..a00d5ddafdc 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/Kconfig +++ b/bsp/stm32/stm32f407-atk-explorer/board/Kconfig @@ -127,6 +127,7 @@ menu "Onboard Peripheral Drivers" bool "Enable File System" select RT_USING_DFS select RT_USING_DFS_ROMFS + select RT_USING_DFS_ROMFS_USER_ROOT default n if BSP_USING_FS diff --git a/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_lcd.c b/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_lcd.c index fcabf1a8141..48ed4c22e97 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_lcd.c +++ b/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_lcd.c @@ -12,7 +12,8 @@ #include #include "drv_lcd.h" -#include "string.h" +#include +#include //#define DRV_DEBUG #define LOG_TAG "drv.lcd" diff --git a/bsp/stm32/stm32f407-atk-explorer/board/ports/phy_reset.c b/bsp/stm32/stm32f407-atk-explorer/board/ports/phy_reset.c index ec5c61f1b00..0620ed1de09 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/ports/phy_reset.c +++ b/bsp/stm32/stm32f407-atk-explorer/board/ports/phy_reset.c @@ -9,6 +9,7 @@ */ #include +#include #define RESET_IO GET_PIN(D, 3) diff --git a/bsp/stm32/stm32f407-atk-explorer/board/ports/spi_flash_init.c b/bsp/stm32/stm32f407-atk-explorer/board/ports/spi_flash_init.c index 44cb6a5b9aa..d467ba3181b 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/ports/spi_flash_init.c +++ b/bsp/stm32/stm32f407-atk-explorer/board/ports/spi_flash_init.c @@ -11,7 +11,8 @@ #include #include "spi_flash.h" #include "spi_flash_sfud.h" -#include "drv_spi.h" +#include +#include #if defined(BSP_USING_SPI_FLASH) diff --git a/bsp/stm32/stm32f407-robomaster-c/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f407-robomaster-c/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f407-robomaster-c/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f407-robomaster-c/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f407-robomaster-c/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f407-robomaster-c/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f407-robomaster-c/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f407-robomaster-c/applications/arduino_pinout/pins_arduino.c index f1b183f9529..e1055375307 100644 --- a/bsp/stm32/stm32f407-robomaster-c/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f407-robomaster-c/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/online-packages/system/enhanced-kservice.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/online-packages/system/enhanced-kservice.attach new file mode 100644 index 00000000000..d64734d0780 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/online-packages/system/enhanced-kservice.attach @@ -0,0 +1,3 @@ +CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE=y +CONFIG_PKG_USING_RT_MEMCPY_CM=y +CONFIG_PKG_USING_RT_VSNPRINTF_FULL=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/online-packages/system/os-wrappers.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/online-packages/system/os-wrappers.attach new file mode 100644 index 00000000000..c5dd33ceadb --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/online-packages/system/os-wrappers.attach @@ -0,0 +1 @@ +CONFIG_PKG_USING_FREERTOS_WRAPPER=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/aht21.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/aht21.attach new file mode 100644 index 00000000000..e9269471b5c --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/aht21.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_AHT21=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ap3216c.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ap3216c.attach new file mode 100644 index 00000000000..b8da5bcfb3b --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ap3216c.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_AP3216C=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ethernet_28j60.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ethernet_28j60.attach new file mode 100644 index 00000000000..085b183d92d --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ethernet_28j60.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ENC28j60=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/fal_easyflash.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/fal_easyflash.attach new file mode 100644 index 00000000000..70aac6f9746 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/fal_easyflash.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_EASYFLASH=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/filesystem.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/filesystem.attach new file mode 100644 index 00000000000..72c479e8d05 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/filesystem.attach @@ -0,0 +1,2 @@ +CONFIG_BSP_USING_FS=y +CONFIG_BSP_USING_FLASH_FATFS=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/icm20608.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/icm20608.attach new file mode 100644 index 00000000000..922671ca355 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/icm20608.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ICM20608=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lcd_st7787.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lcd_st7787.attach new file mode 100644 index 00000000000..c4044805ae6 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lcd_st7787.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ONBOARD_LCD=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/led_matrix.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/led_matrix.attach new file mode 100644 index 00000000000..7c184020222 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/led_matrix.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ONBOARD_LED_MATRIX=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lvgl.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lvgl.attach new file mode 100644 index 00000000000..1ce3e528aa2 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lvgl.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_LVGL=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rs485.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rs485.attach new file mode 100644 index 00000000000..144fb35d85d --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rs485.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_RS485=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rw007.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rw007.attach new file mode 100644 index 00000000000..be96228ae15 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rw007.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_RW007_WLAN=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/spi_flash_w25q64.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/spi_flash_w25q64.attach new file mode 100644 index 00000000000..a2a4b419932 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/spi_flash_w25q64.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_SPI_FLASH=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/sram.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/sram.attach new file mode 100644 index 00000000000..516182d2b51 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/sram.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_SRAM=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/usb_mouse.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/usb_mouse.attach new file mode 100644 index 00000000000..ad9c397d8bc --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/usb_mouse.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_USB_MOUSE=y diff --git a/bsp/stm32/stm32f407-rt-spark/Kconfig b/bsp/stm32/stm32f407-rt-spark/Kconfig index c7371146057..60fa08a560f 100644 --- a/bsp/stm32/stm32f407-rt-spark/Kconfig +++ b/bsp/stm32/stm32f407-rt-spark/Kconfig @@ -15,7 +15,21 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config SOC_STM32F407ZG + bool + select SOC_SERIES_STM32F4 + select RT_USING_COMPONENTS_INIT + select RT_USING_USER_MAIN + default y + +config BOARD_STM32F407_SPARK + bool + default y + source "$RTT_DIR/Kconfig" +source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" + +if !RT_USING_NANO source "board/Kconfig" -source "$PKGS_DIR/Kconfig" +endif diff --git a/bsp/stm32/stm32f407-rt-spark/applications/main.c b/bsp/stm32/stm32f407-rt-spark/applications/main.c index 20a6f59b206..38757e1edd0 100644 --- a/bsp/stm32/stm32f407-rt-spark/applications/main.c +++ b/bsp/stm32/stm32f407-rt-spark/applications/main.c @@ -6,12 +6,15 @@ * Change Logs: * Date Author Notes * 2023-07-06 Supperthomas first version + * 2023-12-03 Meco Man support nano version */ - +#include #include +#include +#ifndef RT_USING_NANO #include -#include +#endif /* RT_USING_NANO */ #define GPIO_LED_B GET_PIN(F, 11) #define GPIO_LED_R GET_PIN(F, 12) diff --git a/bsp/stm32/stm32f407-rt-spark/board/Kconfig b/bsp/stm32/stm32f407-rt-spark/board/Kconfig index 94a62539a89..b698018ea44 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/Kconfig +++ b/bsp/stm32/stm32f407-rt-spark/board/Kconfig @@ -1,16 +1,5 @@ menu "Hardware Drivers Config" -config SOC_STM32F407ZG - bool - select SOC_SERIES_STM32F4 - select RT_USING_COMPONENTS_INIT - select RT_USING_USER_MAIN - default y - -config BOARD_STM32F407_SPARK - bool - default y - menu "Onboard Peripheral Drivers" config BSP_USING_USB_TO_USART @@ -31,7 +20,7 @@ menu "Onboard Peripheral Drivers" select BSP_USING_UART select BSP_USING_UART3 default n - + menuconfig BSP_USING_RS485 bool "Enable RS485 (uart6)" select BSP_USING_UART @@ -69,7 +58,7 @@ menu "Onboard Peripheral Drivers" select BSP_USING_PWM14_CH1 endif - config BSP_USING_ONBOARD_LED_MATRIX + config BSP_USING_ONBOARD_LED_MATRIX bool "Enable Led MATRIX" default n select BSP_USING_PWM @@ -91,6 +80,7 @@ menu "Onboard Peripheral Drivers" if BSP_USING_LVGL config BSP_USING_LVGL_DEMO bool "Enable LVGL demo" + select PKG_LVGL_USING_DEMOS default y endif @@ -107,7 +97,7 @@ menu "Onboard Peripheral Drivers" select BSP_USING_I2C1 default n - config BSP_USING_ENC28j60 + config BSP_USING_ENC28j60 bool "Enable Ethernet 28j60" default n select BSP_USING_SPI @@ -126,44 +116,45 @@ menu "Onboard Peripheral Drivers" select BSP_USING_SDIO select RT_USING_DFS_ELMFAT default n - if BSP_USING_SDCARD_FATFS - menuconfig BSP_USING_FS_AUTO_MOUNT - bool "Enable filesystem auto mount" - default y - endif - - config BSP_USING_FLASH_FATFS - bool "Enable FAL filesystem partition base on W25Q64" - select BSP_USING_FAL - default n - if BSP_USING_FLASH_FATFS - menuconfig BSP_USING_FLASH_FS_AUTO_MOUNT - bool "Enable filesystem auto mount" - default y - endif + if BSP_USING_SDCARD_FATFS + menuconfig BSP_USING_FS_AUTO_MOUNT + bool "Enable filesystem auto mount" + default y + endif + + config BSP_USING_FLASH_FATFS + bool "Enable FAL filesystem partition base on W25Q64" + select BSP_USING_FAL + default n + if BSP_USING_FLASH_FATFS + menuconfig BSP_USING_FLASH_FS_AUTO_MOUNT + bool "Enable filesystem auto mount" + default y + endif endif config BSP_USING_FAL - bool "Enable FAL (enable on-chip flash and spi2 flash)" - select BSP_USING_SPI_FLASH - select RT_USING_FAL - select FAL_DEBUG_CONFIG - select FAL_PART_HAS_TABLE_CFG - select FAL_USING_SFUD_PORT - - if BSP_USING_FAL - menuconfig BSP_USING_BOOTLOADER - bool "Enable bootloader partition table" - default n - endif - - - config BSP_USING_EASYFLASH + bool "Enable FAL (enable on-chip flash and spi2 flash)" + select BSP_USING_SPI_FLASH + select RT_USING_FAL + select FAL_DEBUG_CONFIG + select FAL_PART_HAS_TABLE_CFG + select FAL_USING_SFUD_PORT + select BSP_USING_ON_CHIP_FLASH + + if BSP_USING_FAL + menuconfig BSP_USING_BOOTLOADER + bool "Enable bootloader partition table" + default n + endif + + + config BSP_USING_EASYFLASH bool "Enable Easy Flash base on FAL" select BSP_USING_FAL select PKG_USING_EASYFLASH default n - + menuconfig BSP_USING_RW007_WLAN bool "Enable Rw007 Wlan Base on SPI2" default n @@ -190,9 +181,9 @@ menu "Onboard Peripheral Drivers" int "RW007 RESET pin index" default 111 endif - + config BSP_USING_AHT21 - bool "Enable AHT21(i2c3)" + bool "Enable AHT21(i2c3)" select BSP_USING_I2C select BSP_USING_I2C3 select PKG_USING_SENSORS_DRIVERS @@ -222,12 +213,6 @@ menu "Onboard Peripheral Drivers" select RT_USB_DEVICE_HID_MOUSE select BSP_USING_ICM20608 - config BSP_USING_EASYFLASH - bool "Enable Easy Flash base on FAL" - select BSP_USING_FAL - select PKG_USING_EASYFLASH - default n - menuconfig BSP_USING_CAN bool "Enable On Board CAN" select RT_USING_CAN @@ -253,9 +238,9 @@ menu "Onboard Peripheral Drivers" config BSP_USING_AUDIO_RECORD bool "Enable Audio Record" default n - endif + endif + - endmenu menu "On-chip Peripheral Drivers" @@ -373,23 +358,6 @@ menu "On-chip Peripheral Drivers" default n endif - menuconfig BSP_USING_ONCHIP_RTC - bool "Enable RTC" - select RT_USING_RTC - default n - if BSP_USING_ONCHIP_RTC - choice - prompt "Select clock source" - default BSP_RTC_USING_LSE - - config BSP_RTC_USING_LSE - bool "RTC USING LSE" - - config BSP_RTC_USING_LSI - bool "RTC USING LSI" - endchoice - endif - menuconfig BSP_USING_PWM bool "Enable PWM" default n @@ -454,7 +422,7 @@ menu "On-chip Peripheral Drivers" range 1 176 default 91 endif - + menuconfig BSP_USING_SOFT_SPI2 bool "Enable soft SPI2 BUS (software simulation)" default n @@ -557,7 +525,7 @@ menu "On-chip Peripheral Drivers" range 0 143 default 80 endif - + menuconfig BSP_USING_I2C3 bool "Enable I2C3 BUS for AHT21 Onboard(software simulation)" default n @@ -581,7 +549,7 @@ menu "On-chip Peripheral Drivers" select RT_USING_PM select RT_USING_HOOK default n - + menuconfig BSP_USING_DAC bool "Enable DAC" default n diff --git a/bsp/stm32/stm32f407-rt-spark/board/board.c b/bsp/stm32/stm32f407-rt-spark/board/board.c index 4eb0ddd6e90..d49a591e487 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/board.c +++ b/bsp/stm32/stm32f407-rt-spark/board/board.c @@ -9,6 +9,7 @@ */ #include "board.h" +#include void SystemClock_Config(void) { diff --git a/bsp/stm32/stm32f407-rt-spark/board/board.h b/bsp/stm32/stm32f407-rt-spark/board/board.h index f92babcac4b..a222417fe18 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/board.h +++ b/bsp/stm32/stm32f407-rt-spark/board/board.h @@ -12,10 +12,7 @@ #ifndef __BOARD_H__ #define __BOARD_H__ -#include #include -#include "drv_common.h" -#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f407-rt-spark/board/ports/drv_enc28j60.c b/bsp/stm32/stm32f407-rt-spark/board/ports/drv_enc28j60.c index 819ae9f7ceb..1dacc9124de 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/ports/drv_enc28j60.c +++ b/bsp/stm32/stm32f407-rt-spark/board/ports/drv_enc28j60.c @@ -8,18 +8,19 @@ * 2018-08-27 ZYLX the first version */ -#include +#include #include -#include "drv_spi.h" -#include "board.h" +#include +#include +#include #define PIN_NRF_IRQ GET_PIN(E,2) - +#define PIN_SPI_CS GET_PIN(A,4) int enc28j60_init(void) { __HAL_RCC_GPIOD_CLK_ENABLE(); - rt_hw_spi_device_attach("spi1", "spi11", GPIOA, GPIO_PIN_4); + rt_hw_spi_device_attach("spi1", "spi11", PIN_SPI_CS); /* attach enc28j60 to spi. spi11 cs - PA4 */ enc28j60_attach("spi11"); diff --git a/bsp/stm32/stm32f407-rt-spark/board/ports/fal/fal_cfg.h b/bsp/stm32/stm32f407-rt-spark/board/ports/fal/fal_cfg.h index e566857c93a..aebe5552cb9 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/ports/fal/fal_cfg.h +++ b/bsp/stm32/stm32f407-rt-spark/board/ports/fal/fal_cfg.h @@ -11,8 +11,9 @@ #ifndef _FAL_CFG_H_ #define _FAL_CFG_H_ -#include #include +#include + #define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024) #define FLASH_SIZE_GRANULARITY_64K (8 * 64 * 1024) #define FLASH_SIZE_GRANULARITY_128K (8 * 128 * 1024) diff --git a/bsp/stm32/stm32f407-rt-spark/board/ports/lcd/drv_lcd.c b/bsp/stm32/stm32f407-rt-spark/board/ports/lcd/drv_lcd.c index b088e3eb530..01b011dd9bb 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/ports/lcd/drv_lcd.c +++ b/bsp/stm32/stm32f407-rt-spark/board/ports/lcd/drv_lcd.c @@ -13,7 +13,8 @@ #include #include -#include "string.h" +#include +#include #include "drv_lcd.h" #include "drv_lcd_font.h" diff --git a/bsp/stm32/stm32f407-rt-spark/board/ports/led_matrix/drv_matrix_led.c b/bsp/stm32/stm32f407-rt-spark/board/ports/led_matrix/drv_matrix_led.c index 8b0541db176..7659717dff0 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/ports/led_matrix/drv_matrix_led.c +++ b/bsp/stm32/stm32f407-rt-spark/board/ports/led_matrix/drv_matrix_led.c @@ -21,19 +21,21 @@ * - logic 1 is: 900ns(H) + 400ns(L) */ +#include #include #include +#include +#include #ifndef LED_NUM - #define LED_NUM 19 // LED灯珠个数 +#define LED_NUM 19 // LED灯珠个数 #endif #define LED_MATRIX_EN_PIN GET_PIN(F, 2) TIM_HandleTypeDef htim3; DMA_HandleTypeDef hdma_tim3_ch2; -ALIGN(4) -uint8_t led_buffer[LED_NUM * 24 * 2]; +rt_align(RT_ALIGN_SIZE) uint8_t led_buffer[LED_NUM * 24 * 2]; extern void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); diff --git a/bsp/stm32/stm32f407-rt-spark/board/ports/rs485/drv_rs485.c b/bsp/stm32/stm32f407-rt-spark/board/ports/rs485/drv_rs485.c index a9fe78648de..b281e728365 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/ports/rs485/drv_rs485.c +++ b/bsp/stm32/stm32f407-rt-spark/board/ports/rs485/drv_rs485.c @@ -9,7 +9,9 @@ * 2023-05-05 yuanjie add test method */ +#include #include +#include #include "drv_rs485.h" #ifdef BSP_USING_RS485 @@ -134,4 +136,4 @@ void rs485_test(int argc, void **argv) } MSH_CMD_EXPORT(rs485_test, test rs485 transmission); -#endif /* bsp_using_RS485 */ +#endif /* BSP_USING_RS485 */ diff --git a/bsp/stm32/stm32f407-rt-spark/board/ports/soft_spi_flash_init.c b/bsp/stm32/stm32f407-rt-spark/board/ports/soft_spi_flash_init.c index 3221c84cc0b..f1372de85ae 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/ports/soft_spi_flash_init.c +++ b/bsp/stm32/stm32f407-rt-spark/board/ports/soft_spi_flash_init.c @@ -11,8 +11,8 @@ #include #include "spi_flash.h" #include "spi_flash_sfud.h" -#include "drv_spi.h" -#include "drv_soft_spi.h" +#include +#include #ifdef BSP_USING_SOFT_SPI_FLASH diff --git a/bsp/stm32/stm32f407-rt-spark/board/ports/spi_flash_init.c b/bsp/stm32/stm32f407-rt-spark/board/ports/spi_flash_init.c index 06d107c1ff0..4b1f0f5f505 100644 --- a/bsp/stm32/stm32f407-rt-spark/board/ports/spi_flash_init.c +++ b/bsp/stm32/stm32f407-rt-spark/board/ports/spi_flash_init.c @@ -11,7 +11,8 @@ #include #include "spi_flash.h" #include "spi_flash_sfud.h" -#include "drv_spi.h" +#include +#include #if defined(BSP_USING_SPI_FLASH) diff --git a/bsp/stm32/stm32f407-st-discovery/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f407-st-discovery/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f407-st-discovery/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f410-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f410-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f410-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f410-st-nucleo/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f410-st-nucleo/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f410-st-nucleo/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f410-st-nucleo/Kconfig b/bsp/stm32/stm32f410-st-nucleo/Kconfig index 4666cce094e..14857ccb4d3 100644 --- a/bsp/stm32/stm32f410-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f410-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32F410RB select RT_USING_USER_MAIN default y +config BOARD_STM32F410_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/Sconscript b/bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/SConscript similarity index 100% rename from bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/Sconscript rename to bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/SConscript diff --git a/bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/pins_arduino.c index 5b1a7c2913a..4ee6168858a 100644 --- a/bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/nano.attach index 3a1b6d0a034..fb58d11a590 100644 --- a/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/nano.attach +++ b/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/nano.attach @@ -1 +1 @@ -RT_USING_NANO=y +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino.attach deleted file mode 100644 index 6909b93257f..00000000000 --- a/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino.attach +++ /dev/null @@ -1 +0,0 @@ -BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino/adafruit-sensors.attach b/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino/adafruit-sensors.attach new file mode 100644 index 00000000000..8913e66f4d8 --- /dev/null +++ b/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino/adafruit-sensors.attach @@ -0,0 +1,6 @@ +CONFIG_BSP_USING_ARDUINO=y + +# Adafruit Sensor Libraries Check +CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AHTX0=y +CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SHT31=y +CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP280=y diff --git a/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino/projects.attach b/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino/projects.attach new file mode 100644 index 00000000000..7f0d742aaa1 --- /dev/null +++ b/bsp/stm32/stm32f411-st-nucleo/.ci/attachconfig/rtduino/projects.attach @@ -0,0 +1,4 @@ +CONFIG_BSP_USING_ARDUINO=y +CONFIG_PKG_USING_ARDUINO_SENSOR_KIT=y +CONFIG_PKG_USING_ARDUINO_ULTRASOUND_RADAR=y +CONFIG_PKG_USING_ARDUINO_MSGQ_C_CPP_DEMO=y diff --git a/bsp/stm32/stm32f411-st-nucleo/Kconfig b/bsp/stm32/stm32f411-st-nucleo/Kconfig index ece64a2de10..3c0a9634687 100644 --- a/bsp/stm32/stm32f411-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f411-st-nucleo/Kconfig @@ -27,6 +27,11 @@ config BOARD_STM32F411_NUCLEO select BOARD_SERIES_STM32_NUCLEO_64 default y +config BOARD_STM32F411_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/Sconscript b/bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/SConscript similarity index 100% rename from bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/Sconscript rename to bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/SConscript diff --git a/bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/pins_arduino.c index 01ec3c1a0c4..f5620fe2d36 100644 --- a/bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include #define DBG_TAG "RTduino.pins_arduino" #define DBG_LVL DBG_INFO diff --git a/bsp/stm32/stm32f411-weact-blackpill/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f411-weact-blackpill/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f411-weact-blackpill/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f411-weact-blackpill/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f411-weact-blackpill/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f411-weact-blackpill/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/Sconscript b/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/SConscript similarity index 100% rename from bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/Sconscript rename to bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/SConscript diff --git a/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/pins_arduino.c index 3102d3eb6c6..3df894a9626 100644 --- a/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f412-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f412-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f412-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f412-st-nucleo/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f412-st-nucleo/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f412-st-nucleo/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/SConscript b/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/SConscript new file mode 100644 index 00000000000..25399290275 --- /dev/null +++ b/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/SConscript @@ -0,0 +1,9 @@ +from building import * + +cwd = GetCurrentDir() +src = Glob('*.c') + Glob('*.cpp') +inc = [cwd] + +group = DefineGroup('RTduino', src, depend = ['PKG_USING_RTDUINO'], CPPPATH = inc) + +Return('group') diff --git a/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/pins_arduino.c index 3ccd35ec903..09999642b43 100644 --- a/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f413-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f413-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f413-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f427-robomaster-a/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f427-robomaster-a/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f427-robomaster-a/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f427-robomaster-a/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f427-robomaster-a/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f427-robomaster-a/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f427-robomaster-a/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f427-robomaster-a/applications/arduino_pinout/pins_arduino.c index a56b3fc1f86..13b630f72e1 100644 --- a/bsp/stm32/stm32f427-robomaster-a/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f427-robomaster-a/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f429-atk-apollo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f429-atk-apollo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f429-atk-apollo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f429-fire-challenger/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f429-fire-challenger/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f429-fire-challenger/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f429-st-disco/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f429-st-disco/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f429-st-disco/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f446-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f446-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f446-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f446-st-nucleo/Kconfig b/bsp/stm32/stm32f446-st-nucleo/Kconfig index dca75b1339d..c100a69c98a 100644 --- a/bsp/stm32/stm32f446-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f446-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32F446ZE select RT_USING_USER_MAIN default y +config BOARD_STM32F446_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f469-st-disco/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f469-st-disco/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32f469-st-disco/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f469-st-disco/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f469-st-disco/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32f469-st-disco/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f469-st-disco/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32f469-st-disco/applications/arduino_pinout/pins_arduino.c index 37c6397e0a5..ff578abce4d 100644 --- a/bsp/stm32/stm32f469-st-disco/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32f469-st-disco/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32f746-st-nucleo/Kconfig b/bsp/stm32/stm32f746-st-nucleo/Kconfig index 362bdfbed87..d2425aab36f 100644 --- a/bsp/stm32/stm32f746-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f746-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32F746_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32f767-st-nucleo/Kconfig b/bsp/stm32/stm32f767-st-nucleo/Kconfig index 362bdfbed87..34903f1c44f 100644 --- a/bsp/stm32/stm32f767-st-nucleo/Kconfig +++ b/bsp/stm32/stm32f767-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32F767_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32g070-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32g070-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32g070-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32g070-st-nucleo/Kconfig b/bsp/stm32/stm32g070-st-nucleo/Kconfig index b5af5bec2a2..af7e74a0a33 100644 --- a/bsp/stm32/stm32g070-st-nucleo/Kconfig +++ b/bsp/stm32/stm32g070-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32G070RB select RT_USING_USER_MAIN default y +config BOARD_STM32G070_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32g071-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32g071-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32g071-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32g071-st-nucleo/Kconfig b/bsp/stm32/stm32g071-st-nucleo/Kconfig index 24e68bbeeff..3fe93b62195 100644 --- a/bsp/stm32/stm32g071-st-nucleo/Kconfig +++ b/bsp/stm32/stm32g071-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32G071RB select RT_USING_USER_MAIN default y +config BOARD_STM32G071_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32g431-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32g431-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32g431-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32g431-st-nucleo/Kconfig b/bsp/stm32/stm32g431-st-nucleo/Kconfig index aff70779c8f..4c63465bc69 100644 --- a/bsp/stm32/stm32g431-st-nucleo/Kconfig +++ b/bsp/stm32/stm32g431-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32G431RB select RT_USING_USER_MAIN default y +config BOARD_STM32G431_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32g474-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32g474-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32g474-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32g474-st-nucleo/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32g474-st-nucleo/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32g474-st-nucleo/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32g474-st-nucleo/Kconfig b/bsp/stm32/stm32g474-st-nucleo/Kconfig index b8468bfbe3b..76fa9e67552 100644 --- a/bsp/stm32/stm32g474-st-nucleo/Kconfig +++ b/bsp/stm32/stm32g474-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32G474RE select RT_USING_USER_MAIN default y +config BOARD_STM32G474_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32g474-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32g474-st-nucleo/applications/arduino_pinout/pins_arduino.c index 25588db9a2c..f9e7225c540 100644 --- a/bsp/stm32/stm32g474-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32g474-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32g491-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32g491-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32g491-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32g491-st-nucleo/Kconfig b/bsp/stm32/stm32g491-st-nucleo/Kconfig index c731d9b557b..bf912f3f812 100644 --- a/bsp/stm32/stm32g491-st-nucleo/Kconfig +++ b/bsp/stm32/stm32g491-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32G491RE select RT_USING_USER_MAIN default y +config BOARD_STM32G491_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32h503-st-nucleo/.config b/bsp/stm32/stm32h503-st-nucleo/.config new file mode 100644 index 00000000000..e7535e386d2 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/.config @@ -0,0 +1,1056 @@ +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Configuration +# + +# +# RT-Thread Kernel +# +CONFIG_RT_NAME_MAX=8 +# CONFIG_RT_USING_ARCH_DATA_TYPE is not set +# CONFIG_RT_USING_SMART is not set +# CONFIG_RT_USING_NANO is not set +# CONFIG_RT_USING_AMP is not set +# CONFIG_RT_USING_SMP is not set +CONFIG_RT_CPUS_NR=1 +CONFIG_RT_ALIGN_SIZE=8 +# CONFIG_RT_THREAD_PRIORITY_8 is not set +CONFIG_RT_THREAD_PRIORITY_32=y +# CONFIG_RT_THREAD_PRIORITY_256 is not set +CONFIG_RT_THREAD_PRIORITY_MAX=32 +CONFIG_RT_TICK_PER_SECOND=1000 +CONFIG_RT_USING_OVERFLOW_CHECK=y +CONFIG_RT_USING_HOOK=y +CONFIG_RT_HOOK_USING_FUNC_PTR=y +CONFIG_RT_USING_IDLE_HOOK=y +CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 +CONFIG_IDLE_THREAD_STACK_SIZE=256 +CONFIG_RT_USING_TIMER_SOFT=y +CONFIG_RT_TIMER_THREAD_PRIO=4 +CONFIG_RT_TIMER_THREAD_STACK_SIZE=512 + +# +# kservice optimization +# +# CONFIG_RT_KSERVICE_USING_STDLIB is not set +# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set +# CONFIG_RT_USING_TINY_FFS is not set +# CONFIG_RT_KPRINTF_USING_LONGLONG is not set +CONFIG_RT_USING_DEBUG=y +CONFIG_RT_DEBUGING_COLOR=y +CONFIG_RT_DEBUGING_CONTEXT=y +# CONFIG_RT_DEBUGING_AUTO_INIT is not set + +# +# Inter-Thread communication +# +CONFIG_RT_USING_SEMAPHORE=y +CONFIG_RT_USING_MUTEX=y +CONFIG_RT_USING_EVENT=y +CONFIG_RT_USING_MAILBOX=y +CONFIG_RT_USING_MESSAGEQUEUE=y +# CONFIG_RT_USING_MESSAGEQUEUE_PRIORITY is not set +# CONFIG_RT_USING_SIGNALS is not set + +# +# Memory Management +# +CONFIG_RT_USING_MEMPOOL=y +CONFIG_RT_USING_SMALL_MEM=y +# CONFIG_RT_USING_SLAB is not set +# CONFIG_RT_USING_MEMHEAP is not set +CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y +# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set +# CONFIG_RT_USING_SLAB_AS_HEAP is not set +# CONFIG_RT_USING_USERHEAP is not set +# CONFIG_RT_USING_NOHEAP is not set +# CONFIG_RT_USING_MEMTRACE is not set +# CONFIG_RT_USING_HEAP_ISR is not set +CONFIG_RT_USING_HEAP=y +CONFIG_RT_USING_DEVICE=y +# CONFIG_RT_USING_DEVICE_OPS is not set +# CONFIG_RT_USING_INTERRUPT_INFO is not set +CONFIG_RT_USING_CONSOLE=y +CONFIG_RT_CONSOLEBUF_SIZE=256 +CONFIG_RT_CONSOLE_DEVICE_NAME="uart3" +CONFIG_RT_VER_NUM=0x50100 +# CONFIG_RT_USING_STDC_ATOMIC is not set +CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32 +# CONFIG_RT_USING_CACHE is not set +CONFIG_RT_USING_HW_ATOMIC=y +# CONFIG_ARCH_ARM_BOOTWITH_FLUSH_CACHE is not set +# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set +CONFIG_RT_USING_CPU_FFS=y +CONFIG_ARCH_ARM=y +CONFIG_ARCH_ARM_CORTEX_M=y +CONFIG_ARCH_ARM_CORTEX_M33=y + +# +# RT-Thread Components +# +CONFIG_RT_USING_COMPONENTS_INIT=y +CONFIG_RT_USING_USER_MAIN=y +CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048 +CONFIG_RT_MAIN_THREAD_PRIORITY=10 +# CONFIG_RT_USING_LEGACY is not set +CONFIG_RT_USING_MSH=y +CONFIG_RT_USING_FINSH=y +CONFIG_FINSH_USING_MSH=y +CONFIG_FINSH_THREAD_NAME="tshell" +CONFIG_FINSH_THREAD_PRIORITY=20 +CONFIG_FINSH_THREAD_STACK_SIZE=4096 +CONFIG_FINSH_USING_HISTORY=y +CONFIG_FINSH_HISTORY_LINES=5 +CONFIG_FINSH_USING_SYMTAB=y +CONFIG_FINSH_CMD_SIZE=80 +CONFIG_MSH_USING_BUILT_IN_COMMANDS=y +CONFIG_FINSH_USING_DESCRIPTION=y +# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set +# CONFIG_FINSH_USING_AUTH is not set +CONFIG_FINSH_ARG_MAX=10 +CONFIG_FINSH_USING_OPTION_COMPLETION=y + +# +# DFS: device virtual file system +# +# CONFIG_RT_USING_DFS is not set +# CONFIG_RT_USING_FAL is not set + +# +# Device Drivers +# +# CONFIG_RT_USING_DM is not set +CONFIG_RT_USING_DEVICE_IPC=y +CONFIG_RT_UNAMED_PIPE_NUMBER=64 +CONFIG_RT_USING_SYSTEM_WORKQUEUE=y +CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048 +CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 +CONFIG_RT_USING_SERIAL=y +CONFIG_RT_USING_SERIAL_V1=y +# CONFIG_RT_USING_SERIAL_V2 is not set +# CONFIG_RT_SERIAL_USING_DMA is not set +CONFIG_RT_SERIAL_RB_BUFSZ=64 +# CONFIG_RT_USING_CAN is not set +# CONFIG_RT_USING_HWTIMER is not set +# CONFIG_RT_USING_CPUTIME is not set +CONFIG_RT_USING_I2C=y +# CONFIG_RT_I2C_DEBUG is not set +CONFIG_RT_USING_I2C_BITOPS=y +# CONFIG_RT_I2C_BITOPS_DEBUG is not set +# CONFIG_RT_USING_SOFT_I2C is not set +# CONFIG_RT_USING_PHY is not set +CONFIG_RT_USING_PIN=y +CONFIG_RT_USING_ADC=y +# CONFIG_RT_USING_DAC is not set +# CONFIG_RT_USING_NULL is not set +# CONFIG_RT_USING_ZERO is not set +# CONFIG_RT_USING_RANDOM is not set +CONFIG_RT_USING_PWM=y +# CONFIG_RT_USING_MTD_NOR is not set +# CONFIG_RT_USING_MTD_NAND is not set +# CONFIG_RT_USING_PM is not set +# CONFIG_RT_USING_RTC is not set +# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_SPI=y +# CONFIG_RT_USING_SPI_BITOPS is not set +# CONFIG_RT_USING_QSPI is not set +# CONFIG_RT_USING_SPI_MSD is not set +# CONFIG_RT_USING_SFUD is not set +# CONFIG_RT_USING_ENC28J60 is not set +# CONFIG_RT_USING_SPI_WIFI is not set +# CONFIG_RT_USING_WDT is not set +# CONFIG_RT_USING_AUDIO is not set +# CONFIG_RT_USING_SENSOR is not set +# CONFIG_RT_USING_TOUCH is not set +# CONFIG_RT_USING_LCD is not set +# CONFIG_RT_USING_HWCRYPTO is not set +# CONFIG_RT_USING_PULSE_ENCODER is not set +# CONFIG_RT_USING_INPUT_CAPTURE is not set +# CONFIG_RT_USING_DEV_BUS is not set +# CONFIG_RT_USING_WIFI is not set +# CONFIG_RT_USING_VIRTIO is not set +# CONFIG_RT_USING_KTIME is not set + +# +# Using USB +# +# CONFIG_RT_USING_USB is not set +# CONFIG_RT_USING_USB_HOST is not set +# CONFIG_RT_USING_USB_DEVICE is not set + +# +# C/C++ and POSIX layer +# + +# +# ISO-ANSI C layer +# + +# +# Timezone and Daylight Saving Time +# +# CONFIG_RT_LIBC_USING_FULL_TZ_DST is not set +CONFIG_RT_LIBC_USING_LIGHT_TZ_DST=y +CONFIG_RT_LIBC_TZ_DEFAULT_HOUR=8 +CONFIG_RT_LIBC_TZ_DEFAULT_MIN=0 +CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 + +# +# POSIX (Portable Operating System Interface) layer +# +# CONFIG_RT_USING_POSIX_FS is not set +# CONFIG_RT_USING_POSIX_DELAY is not set +# CONFIG_RT_USING_POSIX_CLOCK is not set +# CONFIG_RT_USING_POSIX_TIMER is not set +# CONFIG_RT_USING_PTHREADS is not set +# CONFIG_RT_USING_MODULE is not set + +# +# Interprocess Communication (IPC) +# +# CONFIG_RT_USING_POSIX_PIPE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_QUEUE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE is not set + +# +# Socket is in the 'Network' category +# +# CONFIG_RT_USING_CPLUSPLUS is not set + +# +# Network +# +# CONFIG_RT_USING_SAL is not set +# CONFIG_RT_USING_NETDEV is not set +# CONFIG_RT_USING_LWIP is not set +# CONFIG_RT_USING_AT is not set + +# +# Memory protection +# +# CONFIG_RT_USING_MEM_PROTECTION is not set +# CONFIG_RT_USING_HW_STACK_GUARD is not set + +# +# Utilities +# +# CONFIG_RT_USING_RYM is not set +# CONFIG_RT_USING_ULOG is not set +# CONFIG_RT_USING_UTEST is not set +# CONFIG_RT_USING_VAR_EXPORT is not set +# CONFIG_RT_USING_RESOURCE_ID is not set +# CONFIG_RT_USING_ADT is not set +# CONFIG_RT_USING_RT_LINK is not set +# CONFIG_RT_USING_VBUS is not set + +# +# RT-Thread Utestcases +# +# CONFIG_RT_USING_UTESTCASES is not set + +# +# RT-Thread online packages +# + +# +# IoT - internet of things +# +# CONFIG_PKG_USING_LWIP is not set +# CONFIG_PKG_USING_LORAWAN_DRIVER is not set +# CONFIG_PKG_USING_PAHOMQTT is not set +# CONFIG_PKG_USING_UMQTT is not set +# CONFIG_PKG_USING_WEBCLIENT is not set +# CONFIG_PKG_USING_WEBNET is not set +# CONFIG_PKG_USING_MONGOOSE is not set +# CONFIG_PKG_USING_MYMQTT is not set +# CONFIG_PKG_USING_KAWAII_MQTT is not set +# CONFIG_PKG_USING_BC28_MQTT is not set +# CONFIG_PKG_USING_WEBTERMINAL is not set +# CONFIG_PKG_USING_FREEMODBUS is not set +# CONFIG_PKG_USING_NANOPB is not set + +# +# Wi-Fi +# + +# +# Marvell WiFi +# +# CONFIG_PKG_USING_WLANMARVELL is not set + +# +# Wiced WiFi +# +# CONFIG_PKG_USING_WLAN_WICED is not set +# CONFIG_PKG_USING_RW007 is not set + +# +# CYW43012 WiFi +# +# CONFIG_PKG_USING_WLAN_CYW43012 is not set +# CONFIG_PKG_USING_COAP is not set +# CONFIG_PKG_USING_NOPOLL is not set +# CONFIG_PKG_USING_NETUTILS is not set +# CONFIG_PKG_USING_CMUX is not set +# CONFIG_PKG_USING_PPP_DEVICE is not set +# CONFIG_PKG_USING_AT_DEVICE is not set +# CONFIG_PKG_USING_ATSRV_SOCKET is not set +# CONFIG_PKG_USING_WIZNET is not set +# CONFIG_PKG_USING_ZB_COORDINATOR is not set + +# +# IoT Cloud +# +# CONFIG_PKG_USING_ONENET is not set +# CONFIG_PKG_USING_GAGENT_CLOUD is not set +# CONFIG_PKG_USING_ALI_IOTKIT is not set +# CONFIG_PKG_USING_AZURE is not set +# CONFIG_PKG_USING_TENCENT_IOT_EXPLORER is not set +# CONFIG_PKG_USING_JIOT-C-SDK is not set +# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set +# CONFIG_PKG_USING_JOYLINK is not set +# CONFIG_PKG_USING_IOTSHARP_SDK is not set +# CONFIG_PKG_USING_NIMBLE is not set +# CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set +# CONFIG_PKG_USING_OTA_DOWNLOADER is not set +# CONFIG_PKG_USING_IPMSG is not set +# CONFIG_PKG_USING_LSSDP is not set +# CONFIG_PKG_USING_AIRKISS_OPEN is not set +# CONFIG_PKG_USING_LIBRWS is not set +# CONFIG_PKG_USING_TCPSERVER is not set +# CONFIG_PKG_USING_PROTOBUF_C is not set +# CONFIG_PKG_USING_DLT645 is not set +# CONFIG_PKG_USING_QXWZ is not set +# CONFIG_PKG_USING_SMTP_CLIENT is not set +# CONFIG_PKG_USING_ABUP_FOTA is not set +# CONFIG_PKG_USING_LIBCURL2RTT is not set +# CONFIG_PKG_USING_CAPNP is not set +# CONFIG_PKG_USING_AGILE_TELNET is not set +# CONFIG_PKG_USING_NMEALIB is not set +# CONFIG_PKG_USING_PDULIB is not set +# CONFIG_PKG_USING_BTSTACK is not set +# CONFIG_PKG_USING_BT_CYW43012 is not set +# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set +# CONFIG_PKG_USING_WAYZ_IOTKIT is not set +# CONFIG_PKG_USING_MAVLINK is not set +# CONFIG_PKG_USING_BSAL is not set +# CONFIG_PKG_USING_AGILE_MODBUS is not set +# CONFIG_PKG_USING_AGILE_FTP is not set +# CONFIG_PKG_USING_EMBEDDEDPROTO is not set +# CONFIG_PKG_USING_RT_LINK_HW is not set +# CONFIG_PKG_USING_RYANMQTT is not set +# CONFIG_PKG_USING_RYANW5500 is not set +# CONFIG_PKG_USING_LORA_PKT_FWD is not set +# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set +# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set +# CONFIG_PKG_USING_HM is not set +# CONFIG_PKG_USING_SMALL_MODBUS is not set +# CONFIG_PKG_USING_NET_SERVER is not set +# CONFIG_PKG_USING_ZFTP is not set +# CONFIG_PKG_USING_WOL is not set +# CONFIG_PKG_USING_ZEPHYR_POLLING is not set +# CONFIG_PKG_USING_MATTER_ADAPTATION_LAYER is not set +# CONFIG_PKG_USING_LHC_MODBUS is not set + +# +# security packages +# +# CONFIG_PKG_USING_MBEDTLS is not set +# CONFIG_PKG_USING_LIBSODIUM is not set +# CONFIG_PKG_USING_LIBHYDROGEN is not set +# CONFIG_PKG_USING_TINYCRYPT is not set +# CONFIG_PKG_USING_TFM is not set +# CONFIG_PKG_USING_YD_CRYPTO is not set + +# +# language packages +# + +# +# JSON: JavaScript Object Notation, a lightweight data-interchange format +# +# CONFIG_PKG_USING_CJSON is not set +# CONFIG_PKG_USING_LJSON is not set +# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set +# CONFIG_PKG_USING_RAPIDJSON is not set +# CONFIG_PKG_USING_JSMN is not set +# CONFIG_PKG_USING_AGILE_JSMN is not set +# CONFIG_PKG_USING_PARSON is not set + +# +# XML: Extensible Markup Language +# +# CONFIG_PKG_USING_SIMPLE_XML is not set +# CONFIG_PKG_USING_EZXML is not set +# CONFIG_PKG_USING_LUATOS_SOC is not set +# CONFIG_PKG_USING_LUA is not set +# CONFIG_PKG_USING_JERRYSCRIPT is not set +# CONFIG_PKG_USING_MICROPYTHON is not set +# CONFIG_PKG_USING_PIKASCRIPT is not set +# CONFIG_PKG_USING_RTT_RUST is not set + +# +# multimedia packages +# + +# +# LVGL: powerful and easy-to-use embedded GUI library +# +# CONFIG_PKG_USING_LVGL is not set +# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set +# CONFIG_PKG_USING_GUI_GUIDER_DEMO is not set + +# +# u8g2: a monochrome graphic library +# +# CONFIG_PKG_USING_U8G2_OFFICIAL is not set +# CONFIG_PKG_USING_U8G2 is not set +# CONFIG_PKG_USING_OPENMV is not set +# CONFIG_PKG_USING_MUPDF is not set +# CONFIG_PKG_USING_STEMWIN is not set +# CONFIG_PKG_USING_WAVPLAYER is not set +# CONFIG_PKG_USING_TJPGD is not set +# CONFIG_PKG_USING_PDFGEN is not set +# CONFIG_PKG_USING_HELIX is not set +# CONFIG_PKG_USING_AZUREGUIX is not set +# CONFIG_PKG_USING_TOUCHGFX2RTT is not set +# CONFIG_PKG_USING_NUEMWIN is not set +# CONFIG_PKG_USING_MP3PLAYER is not set +# CONFIG_PKG_USING_TINYJPEG is not set +# CONFIG_PKG_USING_UGUI is not set +# CONFIG_PKG_USING_MCURSES is not set +# CONFIG_PKG_USING_TERMBOX is not set +# CONFIG_PKG_USING_VT100 is not set +# CONFIG_PKG_USING_QRCODE is not set +# CONFIG_PKG_USING_GUIENGINE is not set +# CONFIG_PKG_USING_3GPP_AMRNB is not set + +# +# tools packages +# +# CONFIG_PKG_USING_CMBACKTRACE is not set +# CONFIG_PKG_USING_EASYFLASH is not set +# CONFIG_PKG_USING_EASYLOGGER is not set +# CONFIG_PKG_USING_SYSTEMVIEW is not set +# CONFIG_PKG_USING_SEGGER_RTT is not set +# CONFIG_PKG_USING_RTT_AUTO_EXE_CMD is not set +# CONFIG_PKG_USING_RDB is not set +# CONFIG_PKG_USING_ULOG_EASYFLASH is not set +# CONFIG_PKG_USING_LOGMGR is not set +# CONFIG_PKG_USING_ADBD is not set +# CONFIG_PKG_USING_COREMARK is not set +# CONFIG_PKG_USING_DHRYSTONE is not set +# CONFIG_PKG_USING_MEMORYPERF is not set +# CONFIG_PKG_USING_NR_MICRO_SHELL is not set +# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set +# CONFIG_PKG_USING_LUNAR_CALENDAR is not set +# CONFIG_PKG_USING_BS8116A is not set +# CONFIG_PKG_USING_GPS_RMC is not set +# CONFIG_PKG_USING_URLENCODE is not set +# CONFIG_PKG_USING_UMCN is not set +# CONFIG_PKG_USING_LWRB2RTT is not set +# CONFIG_PKG_USING_CPU_USAGE is not set +# CONFIG_PKG_USING_GBK2UTF8 is not set +# CONFIG_PKG_USING_VCONSOLE is not set +# CONFIG_PKG_USING_KDB is not set +# CONFIG_PKG_USING_WAMR is not set +# CONFIG_PKG_USING_MICRO_XRCE_DDS_CLIENT is not set +# CONFIG_PKG_USING_LWLOG is not set +# CONFIG_PKG_USING_ANV_TRACE is not set +# CONFIG_PKG_USING_ANV_MEMLEAK is not set +# CONFIG_PKG_USING_ANV_TESTSUIT is not set +# CONFIG_PKG_USING_ANV_BENCH is not set +# CONFIG_PKG_USING_DEVMEM is not set +# CONFIG_PKG_USING_REGEX is not set +# CONFIG_PKG_USING_MEM_SANDBOX is not set +# CONFIG_PKG_USING_SOLAR_TERMS is not set +# CONFIG_PKG_USING_GAN_ZHI is not set +# CONFIG_PKG_USING_FDT is not set +# CONFIG_PKG_USING_CBOX is not set +# CONFIG_PKG_USING_SNOWFLAKE is not set +# CONFIG_PKG_USING_HASH_MATCH is not set +# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set +# CONFIG_PKG_USING_VOFA_PLUS is not set +# CONFIG_PKG_USING_ZDEBUG is not set + +# +# system packages +# + +# +# enhanced kernel services +# +# CONFIG_PKG_USING_RT_MEMCPY_CM is not set +# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set + +# +# acceleration: Assembly language or algorithmic acceleration packages +# +# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set +# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set +# CONFIG_PKG_USING_QFPLIB_M3 is not set + +# +# CMSIS: ARM Cortex-M Microcontroller Software Interface Standard +# +# CONFIG_PKG_USING_CMSIS_5 is not set +# CONFIG_PKG_USING_CMSIS_RTOS1 is not set +# CONFIG_PKG_USING_CMSIS_RTOS2 is not set + +# +# Micrium: Micrium software products porting for RT-Thread +# +# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set +# CONFIG_PKG_USING_UCOSII_WRAPPER is not set +# CONFIG_PKG_USING_UC_CRC is not set +# CONFIG_PKG_USING_UC_CLK is not set +# CONFIG_PKG_USING_UC_COMMON is not set +# CONFIG_PKG_USING_UC_MODBUS is not set +# CONFIG_PKG_USING_FREERTOS_WRAPPER is not set +# CONFIG_PKG_USING_LITEOS_SDK is not set +# CONFIG_PKG_USING_TZ_DATABASE is not set +# CONFIG_PKG_USING_CAIRO is not set +# CONFIG_PKG_USING_PIXMAN is not set +# CONFIG_PKG_USING_PARTITION is not set +# CONFIG_PKG_USING_PERF_COUNTER is not set +# CONFIG_PKG_USING_FLASHDB is not set +# CONFIG_PKG_USING_SQLITE is not set +# CONFIG_PKG_USING_RTI is not set +# CONFIG_PKG_USING_DFS_YAFFS is not set +# CONFIG_PKG_USING_LITTLEFS is not set +# CONFIG_PKG_USING_DFS_JFFS2 is not set +# CONFIG_PKG_USING_DFS_UFFS is not set +# CONFIG_PKG_USING_LWEXT4 is not set +# CONFIG_PKG_USING_THREAD_POOL is not set +# CONFIG_PKG_USING_ROBOTS is not set +# CONFIG_PKG_USING_EV is not set +# CONFIG_PKG_USING_SYSWATCH is not set +# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set +# CONFIG_PKG_USING_PLCCORE is not set +# CONFIG_PKG_USING_RAMDISK is not set +# CONFIG_PKG_USING_MININI is not set +# CONFIG_PKG_USING_QBOOT is not set +# CONFIG_PKG_USING_PPOOL is not set +# CONFIG_PKG_USING_OPENAMP is not set +# CONFIG_PKG_USING_RPMSG_LITE is not set +# CONFIG_PKG_USING_LPM is not set +# CONFIG_PKG_USING_TLSF is not set +# CONFIG_PKG_USING_EVENT_RECORDER is not set +# CONFIG_PKG_USING_ARM_2D is not set +# CONFIG_PKG_USING_MCUBOOT is not set +# CONFIG_PKG_USING_TINYUSB is not set +# CONFIG_PKG_USING_CHERRYUSB is not set +# CONFIG_PKG_USING_KMULTI_RTIMER is not set +# CONFIG_PKG_USING_TFDB is not set +# CONFIG_PKG_USING_QPC is not set +# CONFIG_PKG_USING_AGILE_UPGRADE is not set +# CONFIG_PKG_USING_FLASH_BLOB is not set +# CONFIG_PKG_USING_MLIBC is not set +# CONFIG_PKG_USING_TASK_MSG_BUS is not set +# CONFIG_PKG_USING_SFDB is not set +# CONFIG_PKG_USING_RTP is not set +# CONFIG_PKG_USING_REB is not set +# CONFIG_PKG_USING_R_RHEALSTONE is not set + +# +# peripheral libraries and drivers +# + +# +# sensors drivers +# +# CONFIG_PKG_USING_LSM6DSM is not set +# CONFIG_PKG_USING_LSM6DSL is not set +# CONFIG_PKG_USING_LPS22HB is not set +# CONFIG_PKG_USING_HTS221 is not set +# CONFIG_PKG_USING_LSM303AGR is not set +# CONFIG_PKG_USING_BME280 is not set +# CONFIG_PKG_USING_BME680 is not set +# CONFIG_PKG_USING_BMA400 is not set +# CONFIG_PKG_USING_BMI160_BMX160 is not set +# CONFIG_PKG_USING_SPL0601 is not set +# CONFIG_PKG_USING_MS5805 is not set +# CONFIG_PKG_USING_DA270 is not set +# CONFIG_PKG_USING_DF220 is not set +# CONFIG_PKG_USING_HSHCAL001 is not set +# CONFIG_PKG_USING_BH1750 is not set +# CONFIG_PKG_USING_MPU6XXX is not set +# CONFIG_PKG_USING_AHT10 is not set +# CONFIG_PKG_USING_AP3216C is not set +# CONFIG_PKG_USING_TSL4531 is not set +# CONFIG_PKG_USING_DS18B20 is not set +# CONFIG_PKG_USING_DHT11 is not set +# CONFIG_PKG_USING_DHTXX is not set +# CONFIG_PKG_USING_GY271 is not set +# CONFIG_PKG_USING_GP2Y10 is not set +# CONFIG_PKG_USING_SGP30 is not set +# CONFIG_PKG_USING_HDC1000 is not set +# CONFIG_PKG_USING_BMP180 is not set +# CONFIG_PKG_USING_BMP280 is not set +# CONFIG_PKG_USING_SHTC1 is not set +# CONFIG_PKG_USING_BMI088 is not set +# CONFIG_PKG_USING_HMC5883 is not set +# CONFIG_PKG_USING_MAX6675 is not set +# CONFIG_PKG_USING_TMP1075 is not set +# CONFIG_PKG_USING_SR04 is not set +# CONFIG_PKG_USING_CCS811 is not set +# CONFIG_PKG_USING_PMSXX is not set +# CONFIG_PKG_USING_RT3020 is not set +# CONFIG_PKG_USING_MLX90632 is not set +# CONFIG_PKG_USING_MLX90393 is not set +# CONFIG_PKG_USING_MLX90392 is not set +# CONFIG_PKG_USING_MLX90397 is not set +# CONFIG_PKG_USING_MS5611 is not set +# CONFIG_PKG_USING_MAX31865 is not set +# CONFIG_PKG_USING_VL53L0X is not set +# CONFIG_PKG_USING_INA260 is not set +# CONFIG_PKG_USING_MAX30102 is not set +# CONFIG_PKG_USING_INA226 is not set +# CONFIG_PKG_USING_LIS2DH12 is not set +# CONFIG_PKG_USING_HS300X is not set +# CONFIG_PKG_USING_ZMOD4410 is not set +# CONFIG_PKG_USING_ISL29035 is not set +# CONFIG_PKG_USING_MMC3680KJ is not set +# CONFIG_PKG_USING_QMP6989 is not set +# CONFIG_PKG_USING_BALANCE is not set +# CONFIG_PKG_USING_SHT2X is not set +# CONFIG_PKG_USING_SHT3X is not set +# CONFIG_PKG_USING_SHT4X is not set +# CONFIG_PKG_USING_AD7746 is not set +# CONFIG_PKG_USING_ADT74XX is not set +# CONFIG_PKG_USING_MAX17048 is not set +# CONFIG_PKG_USING_AS7341 is not set +# CONFIG_PKG_USING_CW2015 is not set +# CONFIG_PKG_USING_ICM20608 is not set +# CONFIG_PKG_USING_PAJ7620 is not set +# CONFIG_PKG_USING_STHS34PF80 is not set + +# +# touch drivers +# +# CONFIG_PKG_USING_GT9147 is not set +# CONFIG_PKG_USING_GT1151 is not set +# CONFIG_PKG_USING_GT917S is not set +# CONFIG_PKG_USING_GT911 is not set +# CONFIG_PKG_USING_FT6206 is not set +# CONFIG_PKG_USING_FT5426 is not set +# CONFIG_PKG_USING_FT6236 is not set +# CONFIG_PKG_USING_XPT2046_TOUCH is not set +# CONFIG_PKG_USING_CST816X is not set +# CONFIG_PKG_USING_REALTEK_AMEBA is not set +# CONFIG_PKG_USING_STM32_SDIO is not set +# CONFIG_PKG_USING_ESP_IDF is not set +# CONFIG_PKG_USING_BUTTON is not set +# CONFIG_PKG_USING_PCF8574 is not set +# CONFIG_PKG_USING_SX12XX is not set +# CONFIG_PKG_USING_SIGNAL_LED is not set +# CONFIG_PKG_USING_LEDBLINK is not set +# CONFIG_PKG_USING_LITTLED is not set +# CONFIG_PKG_USING_LKDGUI is not set +# CONFIG_PKG_USING_NRF5X_SDK is not set +# CONFIG_PKG_USING_NRFX is not set + +# +# Kendryte SDK +# +# CONFIG_PKG_USING_K210_SDK is not set +# CONFIG_PKG_USING_KENDRYTE_SDK is not set +# CONFIG_PKG_USING_INFRARED is not set +# CONFIG_PKG_USING_MULTI_INFRARED is not set +# CONFIG_PKG_USING_AGILE_BUTTON is not set +# CONFIG_PKG_USING_AGILE_LED is not set +# CONFIG_PKG_USING_AT24CXX is not set +# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set +# CONFIG_PKG_USING_PCA9685 is not set +# CONFIG_PKG_USING_ILI9341 is not set +# CONFIG_PKG_USING_I2C_TOOLS is not set +# CONFIG_PKG_USING_NRF24L01 is not set +# CONFIG_PKG_USING_RPLIDAR is not set +# CONFIG_PKG_USING_AS608 is not set +# CONFIG_PKG_USING_RC522 is not set +# CONFIG_PKG_USING_WS2812B is not set +# CONFIG_PKG_USING_EMBARC_BSP is not set +# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set +# CONFIG_PKG_USING_MULTI_RTIMER is not set +# CONFIG_PKG_USING_MAX7219 is not set +# CONFIG_PKG_USING_BEEP is not set +# CONFIG_PKG_USING_EASYBLINK is not set +# CONFIG_PKG_USING_PMS_SERIES is not set +# CONFIG_PKG_USING_CAN_YMODEM is not set +# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set +# CONFIG_PKG_USING_QLED is not set +# CONFIG_PKG_USING_AGILE_CONSOLE is not set +# CONFIG_PKG_USING_LD3320 is not set +# CONFIG_PKG_USING_WK2124 is not set +# CONFIG_PKG_USING_LY68L6400 is not set +# CONFIG_PKG_USING_DM9051 is not set +# CONFIG_PKG_USING_SSD1306 is not set +# CONFIG_PKG_USING_QKEY is not set +# CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_RS232 is not set +# CONFIG_PKG_USING_NES is not set +# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set +# CONFIG_PKG_USING_VDEVICE is not set +# CONFIG_PKG_USING_SGM706 is not set +# CONFIG_PKG_USING_STM32WB55_SDK is not set +# CONFIG_PKG_USING_RDA58XX is not set +# CONFIG_PKG_USING_LIBNFC is not set +# CONFIG_PKG_USING_MFOC is not set +# CONFIG_PKG_USING_TMC51XX is not set +# CONFIG_PKG_USING_TCA9534 is not set +# CONFIG_PKG_USING_KOBUKI is not set +# CONFIG_PKG_USING_ROSSERIAL is not set +# CONFIG_PKG_USING_MICRO_ROS is not set +# CONFIG_PKG_USING_MCP23008 is not set +# CONFIG_PKG_USING_BLUETRUM_SDK is not set +# CONFIG_PKG_USING_MISAKA_AT24CXX is not set +# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set +# CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set +# CONFIG_PKG_USING_SOFT_SERIAL is not set +# CONFIG_PKG_USING_MB85RS16 is not set +# CONFIG_PKG_USING_RFM300 is not set +# CONFIG_PKG_USING_IO_INPUT_FILTER is not set +# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set +# CONFIG_PKG_USING_LRF_NV7LIDAR is not set +# CONFIG_PKG_USING_AIP650 is not set +# CONFIG_PKG_USING_FINGERPRINT is not set +# CONFIG_PKG_USING_BT_ECB02C is not set +# CONFIG_PKG_USING_UAT is not set +# CONFIG_PKG_USING_ST7789 is not set +# CONFIG_PKG_USING_VS1003 is not set +# CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set +# CONFIG_PKG_USING_SPI_TOOLS is not set + +# +# AI packages +# +# CONFIG_PKG_USING_LIBANN is not set +# CONFIG_PKG_USING_NNOM is not set +# CONFIG_PKG_USING_ONNX_BACKEND is not set +# CONFIG_PKG_USING_ONNX_PARSER is not set +# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set +# CONFIG_PKG_USING_ELAPACK is not set +# CONFIG_PKG_USING_ULAPACK is not set +# CONFIG_PKG_USING_QUEST is not set +# CONFIG_PKG_USING_NAXOS is not set +# CONFIG_PKG_USING_R_TINYMAIX is not set + +# +# Signal Processing and Control Algorithm Packages +# +# CONFIG_PKG_USING_FIRE_PID_CURVE is not set +# CONFIG_PKG_USING_QPID is not set +# CONFIG_PKG_USING_UKAL is not set +# CONFIG_PKG_USING_DIGITALCTRL is not set +# CONFIG_PKG_USING_KISSFFT is not set +# CONFIG_PKG_USING_CMSIS_DSP is not set + +# +# miscellaneous packages +# + +# +# project laboratory +# + +# +# samples: kernel and components samples +# +# CONFIG_PKG_USING_KERNEL_SAMPLES is not set +# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set +# CONFIG_PKG_USING_NETWORK_SAMPLES is not set +# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set + +# +# entertainment: terminal games and other interesting software packages +# +# CONFIG_PKG_USING_CMATRIX is not set +# CONFIG_PKG_USING_SL is not set +# CONFIG_PKG_USING_CAL is not set +# CONFIG_PKG_USING_ACLOCK is not set +# CONFIG_PKG_USING_THREES is not set +# CONFIG_PKG_USING_2048 is not set +# CONFIG_PKG_USING_SNAKE is not set +# CONFIG_PKG_USING_TETRIS is not set +# CONFIG_PKG_USING_DONUT is not set +# CONFIG_PKG_USING_COWSAY is not set +# CONFIG_PKG_USING_MORSE is not set +# CONFIG_PKG_USING_TINYSQUARE is not set +# CONFIG_PKG_USING_LIBCSV is not set +# CONFIG_PKG_USING_OPTPARSE is not set +# CONFIG_PKG_USING_FASTLZ is not set +# CONFIG_PKG_USING_MINILZO is not set +# CONFIG_PKG_USING_QUICKLZ is not set +# CONFIG_PKG_USING_LZMA is not set +# CONFIG_PKG_USING_RALARAM is not set +# CONFIG_PKG_USING_MULTIBUTTON is not set +# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set +# CONFIG_PKG_USING_CANFESTIVAL is not set +# CONFIG_PKG_USING_ZLIB is not set +# CONFIG_PKG_USING_MINIZIP is not set +# CONFIG_PKG_USING_HEATSHRINK is not set +# CONFIG_PKG_USING_DSTR is not set +# CONFIG_PKG_USING_TINYFRAME is not set +# CONFIG_PKG_USING_KENDRYTE_DEMO is not set +# CONFIG_PKG_USING_UPACKER is not set +# CONFIG_PKG_USING_UPARAM is not set +# CONFIG_PKG_USING_HELLO is not set +# CONFIG_PKG_USING_VI is not set +# CONFIG_PKG_USING_KI is not set +# CONFIG_PKG_USING_ARMv7M_DWT is not set +# CONFIG_PKG_USING_CRCLIB is not set +# CONFIG_PKG_USING_LWGPS is not set +# CONFIG_PKG_USING_STATE_MACHINE is not set +# CONFIG_PKG_USING_DESIGN_PATTERN is not set +# CONFIG_PKG_USING_CONTROLLER is not set +# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set +# CONFIG_PKG_USING_MFBD is not set +# CONFIG_PKG_USING_SLCAN2RTT is not set +# CONFIG_PKG_USING_SOEM is not set +# CONFIG_PKG_USING_QPARAM is not set +# CONFIG_PKG_USING_CorevMCU_CLI is not set +# CONFIG_PKG_USING_GET_IRQ_PRIORITY is not set + +# +# Arduino libraries +# +# CONFIG_PKG_USING_RTDUINO is not set + +# +# Projects and Demos +# +# CONFIG_PKG_USING_ARDUINO_MSGQ_C_CPP_DEMO is not set +# CONFIG_PKG_USING_ARDUINO_ULTRASOUND_RADAR is not set +# CONFIG_PKG_USING_ARDUINO_SENSOR_KIT is not set +# CONFIG_PKG_USING_ARDUINO_MATLAB_SUPPORT is not set + +# +# Sensors +# +# CONFIG_PKG_USING_ARDUINO_SENSOR_DEVICE_DRIVERS is not set +# CONFIG_PKG_USING_ARDUINO_CAPACITIVESENSOR is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL375 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L0X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L1X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSOR is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL6180X is not set +# CONFIG_PKG_USING_ADAFRUIT_MAX31855 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31865 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31856 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX6675 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90614 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM9DS1 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AHTX0 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM9DS0 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP280 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADT7410 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP085 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BME680 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP9808 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP4728 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_INA219 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LTR390 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL345 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DHT is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP9600 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM6DS is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO055 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX1704X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MMC56X3 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90393 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90395 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ICM20X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DPS310 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTS221 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SHT4X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SHT31 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL343 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BME280 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AS726X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AMG88XX is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AM2320 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AM2315 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LTR329_LTR303 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP085_UNIFIED is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP183 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP183_UNIFIED is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP3XX is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MS8607 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS3MDL is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90640 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MMA8451 is not set +# CONFIG_PKG_USING_ADAFRUIT_MSA301 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPL115A2 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X_RVC is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS2MDL is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM303DLH_MAG is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LC709203F is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_CAP1188 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_CCS811 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_NAU7802 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS331 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LPS2X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LPS35HW is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM303_ACCEL is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS3DH is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCF8591 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPL3115A2 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPR121 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPRLS is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPU6050 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCT2075 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PM25AQI is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_EMC2101 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_FXAS21002C is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SCD30 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_FXOS8700 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HMC5883_UNIFIED is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SGP30 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TMP006 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TLA202X is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TCS34725 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI7021 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI1145 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SGP40 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SHTC3 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HDC1000 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTU21DF is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AS7341 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTU31D is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSORLAB is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_INA260 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TMP007_LIBRARY is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_L3GD20 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TMP117 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TSC2007 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TSL2561 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TSL2591_LIBRARY is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VCNL4040 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML6070 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML6075 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML7700 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_LIS3DHTR is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_DHT is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_ADXL335 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_ADXL345 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_BME280 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_BMP280 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_H3LIS331DL is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_MMA7660 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_TSL2561 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_PAJ7620 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_VL53L0X is not set +# CONFIG_PKG_USING_SEEED_ITG3200 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_SHT31 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_HP20X is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_DRV2605L is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_BBM150 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_HMC5883L is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_LSM303DLH is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_TCS3414CS is not set +# CONFIG_PKG_USING_SEEED_MP503 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_BMP085 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_HIGHTEMP is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_VEML6070 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_SI1145 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_SHT35 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_AT42QT1070 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_LSM6DS3 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_HDC1000 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_HM3301 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_MCP9600 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_LTC2941 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_LDC1612 is not set + +# +# Display +# +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_GFX_LIBRARY is not set +# CONFIG_PKG_USING_ARDUINO_U8G2 is not set +# CONFIG_PKG_USING_ARDUINO_TFT_ESPI is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ST7735 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SSD1306 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ILI9341 is not set +# CONFIG_PKG_USING_SEEED_TM1637 is not set + +# +# Timing +# +# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set +# CONFIG_PKG_USING_ARDUINO_MSTIMER2 is not set +# CONFIG_PKG_USING_ARDUINO_TICKER is not set +# CONFIG_PKG_USING_ARDUINO_TASKSCHEDULER is not set + +# +# Data Processing +# +# CONFIG_PKG_USING_ARDUINO_KALMANFILTER is not set +# CONFIG_PKG_USING_ARDUINO_ARDUINOJSON is not set + +# +# Data Storage +# + +# +# Communication +# +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PN532 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI4713 is not set + +# +# Device Control +# +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCF8574 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCA9685 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_PCF85063TP is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TPA2016 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DRV2605 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS1841 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS3502 is not set + +# +# Other +# +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI5351 is not set + +# +# Signal IO +# +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BUSIO is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TCA8418 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP23017 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADS1X15 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AW9523 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP3008 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP4725 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BD3491FS is not set + +# +# Uncategorized +# +CONFIG_SOC_FAMILY_STM32=y +CONFIG_SOC_SERIES_STM32H5=y + +# +# Hardware Drivers Config +# +CONFIG_SOC_STM32H503RB=y + +# +# On-chip Peripheral Drivers +# +CONFIG_BSP_USING_GPIO=y +CONFIG_BSP_USING_UART=y +# CONFIG_BSP_USING_UART1 is not set +# CONFIG_BSP_USING_UART2 is not set +CONFIG_BSP_USING_UART3=y +# CONFIG_BSP_USING_LPUART1 is not set +# CONFIG_BSP_USING_UDID is not set + +# +# Board extended module Drivers +# diff --git a/bsp/stm32/stm32h503-st-nucleo/.gitignore b/bsp/stm32/stm32h503-st-nucleo/.gitignore new file mode 100644 index 00000000000..7221bde019d --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/.gitignore @@ -0,0 +1,42 @@ +*.pyc +*.map +*.dblite +*.elf +*.bin +*.hex +*.axf +*.exe +*.pdb +*.idb +*.ilk +*.old +build +Debug +documentation/html +packages/ +*~ +*.o +*.obj +*.out +*.bak +*.dep +*.lib +*.i +*.d +.DS_Stor* +.config 3 +.config 4 +.config 5 +Midea-X1 +*.uimg +GPATH +GRTAGS +GTAGS +.vscode +JLinkLog.txt +JLinkSettings.ini +DebugConfig/ +RTE/ +settings/ +*.uvguix* +cconfig.h diff --git a/bsp/stm32/stm32h503-st-nucleo/Kconfig b/bsp/stm32/stm32h503-st-nucleo/Kconfig new file mode 100644 index 00000000000..ce51889a949 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/Kconfig @@ -0,0 +1,29 @@ +mainmenu "RT-Thread Configuration" + +config BSP_DIR + string + option env="BSP_ROOT" + default "." + +config RTT_DIR + string + option env="RTT_ROOT" + default "../../.." + +config PKGS_DIR + string + option env="PKGS_ROOT" + default "packages" + +config BOARD_STM32H503_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + +source "$RTT_DIR/Kconfig" +source "$PKGS_DIR/Kconfig" +source "../libraries/Kconfig" + +if !RT_USING_NANO +source "board/Kconfig" +endif diff --git a/bsp/stm32/stm32h503-st-nucleo/README.md b/bsp/stm32/stm32h503-st-nucleo/README.md new file mode 100644 index 00000000000..b146ddbcd76 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/README.md @@ -0,0 +1,123 @@ +# **NUCLEO-H503RB** 开发板 BSP 说明 + +## 简介 + +本文档为 NUCLEO-STM32H503RB 开发板提供的 BSP (板级支持包) 说明。 + +主要内容如下: + +- 开发板资源介绍 +- BSP 快速上手 +- 注意事项及参考资料 + +通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。 + +## 开发板介绍 + +NUCLEO-STM32H503RB是 ST 推出的一款基于 ARM Cortex-M33 内核的开发板,最高主频为 250Mhz,128KB Flash,32KB RAM,该开发板具有丰富的板载资源,可以充分发挥 STM32H503RB 的芯片性能。 + +开发板外观如下图所示(板载TYPE-C接口的STLINK-V3): + +![board](figures/board.png) + +该开发板常用 **板载资源** 如下: + +- MCU:STM32H503RB ,高性能,Arm Cortex-M33带有TrustZone,MCU带有128KB Flash,32KB RAM,250 MHz CPU, 375 DMIPS (Dhrystone 2.1) +- 通用特性 + - 采用LQFP64或LQFP48封装的STM32 微控制器 + - 1个用户LED,与arduino共享 + - 1个用户按钮和1个复位按钮 + - 32.768 kHz晶体振荡器 + - 板连接器:SWDST Zio扩展连接器,包括ARDUINO® Uno V3ST morpho扩展连接器 + - 灵活的供电选项:ST-LINK、USB VBUS或外部电源 + - 具有USB重新枚举功能的板上ST-LINK调试器/编程器:大容量存储器、虚拟COM端口和调试端口 + - 提供了全面的免费软件库和例程,可从STM32Cube MCU软件包获得 + - 支持多种集成开发环境(IDE),包括IAR™、Keil®、和STM32CubeIDE + +开发板更多详细信息请参考 ST [STM32H503RB]([NUCLEO-H503RB - STM32 Nucleo-64 development board with STM32H503RBT6 MCU, supports Arduino and ST Morpho connectivity - STMicroelectronics](https://www.st.com/en/evaluation-tools/nucleo-h503rb.html))。 + +## 外设支持 + +本 BSP 目前对外设的支持情况如下: + +| **板载外设** | **支持情况** | **备注** | +| :------------------------------- | :----------: | :------- | +| USB 转 串口(板载**STLINK-V3EC**) | 支持 | | +| **片上外设** | **支持情况** | **备注** | +| GPIO | 支持 | | +| UART | 支持 | UART3 | + + +## 使用说明 + +使用说明分为如下两个章节: + +- 快速上手 + + 本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。 + +- 进阶使用 + + 本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。 + + +### 快速上手 + +本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。 + +#### 硬件连接 + +使用Type-C数据线连接开发板到 PC。 + +#### 编译下载 + +双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。 + +> 工程默认配置使用 ST_LINK 仿真器下载程序,在通过 ST_LINK 连接开发板的基础上,点击下载按钮即可下载程序到开发板 + +#### 运行结果 + +下载程序成功之后,系统会自动运行,LED1闪烁。 + +连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息: + +```bash + \ | / +- RT - Thread Operating System + / | \ 5.1.0 build Dec 22 2023 16:30:30 + 2006 - 2022 Copyright by RT-Thread team +msh > +``` + +### 进阶使用 + +此 BSP 默认只开启了 GPIO 和 UART1 的功能,如果需使用更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下: + +1. 在 bsp 下打开 env 工具。 + +2. 输入`menuconfig`命令配置工程,配置好之后保存退出。 + +3. 输入`pkgs --update`命令更新软件包。 + +4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。 + +本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)。 + +## 注意事项 + +- 调试串口为 UART3 ,映射说明(详情看STM32Cubemx中的配置)。 + + +* 目前使用 cubeprogrammer 进行烧录。 + +## 参考资料: + +1. [STM32H503RB官方介绍页](https://www.st.com/en/microcontrollers-microprocessors/stm32h503rb.html) +2. [STM32H503-NUCLEO开发板介绍](https://www.st.com/en/evaluation-tools/nucleo-h503rb.html#overview) + +## 联系人信息 + +维护人: + +- [Shicheng Chu](https://github.com/zihao-yuan/), 邮箱:1468559561@qq.com + diff --git a/bsp/synwit/swm341/SConscript b/bsp/stm32/stm32h503-st-nucleo/SConscript similarity index 93% rename from bsp/synwit/swm341/SConscript rename to bsp/stm32/stm32h503-st-nucleo/SConscript index c7ef7659ece..20f7689c53c 100644 --- a/bsp/synwit/swm341/SConscript +++ b/bsp/stm32/stm32h503-st-nucleo/SConscript @@ -1,5 +1,6 @@ # for module compiling import os +Import('RTT_ROOT') from building import * cwd = GetCurrentDir() diff --git a/bsp/stm32/stm32h503-st-nucleo/SConstruct b/bsp/stm32/stm32h503-st-nucleo/SConstruct new file mode 100644 index 00000000000..a96d69cbe11 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/SConstruct @@ -0,0 +1,59 @@ +import os +import sys +import rtconfig + +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..') + +sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] +try: + from building import * +except: + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) + exit(-1) + +TARGET = 'rt-thread.' + rtconfig.TARGET_EXT + +DefaultEnvironment(tools=[]) +env = Environment(tools = ['mingw'], + AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, + CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, + AR = rtconfig.AR, ARFLAGS = '-rc', + CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, + LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) +env.PrependENVPath('PATH', rtconfig.EXEC_PATH) + +if rtconfig.PLATFORM in ['iccarm']: + env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') + +Export('RTT_ROOT') +Export('rtconfig') + +SDK_ROOT = os.path.abspath('./') + +if os.path.exists(SDK_ROOT + '/libraries'): + libraries_path_prefix = SDK_ROOT + '/libraries' +else: + libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' + +SDK_LIB = libraries_path_prefix +Export('SDK_LIB') + +# prepare building environment +objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) + +stm32_library = 'STM32H5xx_HAL' +rtconfig.BSP_LIBRARY_TYPE = stm32_library + +# include libraries +objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) +# include drivers +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) + +# make a building +DoBuilding(TARGET, objs) diff --git a/bsp/synwit/swm341/applications/SConscript b/bsp/stm32/stm32h503-st-nucleo/applications/SConscript similarity index 63% rename from bsp/synwit/swm341/applications/SConscript rename to bsp/stm32/stm32h503-st-nucleo/applications/SConscript index f728b0f9bb8..e1c7fa59962 100644 --- a/bsp/synwit/swm341/applications/SConscript +++ b/bsp/stm32/stm32h503-st-nucleo/applications/SConscript @@ -1,10 +1,14 @@ from building import * +import os cwd = GetCurrentDir() -path = [cwd] -src = Glob('*.c') + Glob('*.cpp') +CPPPATH = [cwd] +src = Glob('*.c') -group = DefineGroup('Applications', src, depend = [''], CPPPATH = path) +if GetDepend(['PKG_USING_RTDUINO']) and not GetDepend(['RTDUINO_NO_SETUP_LOOP']): + src += ['arduino_main.cpp'] + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) list = os.listdir(cwd) for item in list: diff --git a/bsp/stm32/stm32h503-st-nucleo/applications/main.c b/bsp/stm32/stm32h503-st-nucleo/applications/main.c new file mode 100644 index 00000000000..2bdc394fe38 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/applications/main.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-12-22 ChuShicheng first version + */ + +#include +#include +#include + +/* defined the LED1 pin: PB0 */ +#define LED1_PIN GET_PIN(B, 0) + +int main(void) +{ + int count = 1; + /* set LED0 pin mode to output */ + rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); + + while (count++) + { + rt_pin_write(LED1_PIN, PIN_HIGH); + rt_thread_mdelay(500); + rt_pin_write(LED1_PIN, PIN_LOW); + rt_thread_mdelay(500); + } + + return RT_EOK; +} diff --git a/bsp/stm32/stm32h503-st-nucleo/board/.ignore_format.yml b/bsp/stm32/stm32h503-st-nucleo/board/.ignore_format.yml new file mode 100644 index 00000000000..4e3e46a59e7 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/.ignore_format.yml @@ -0,0 +1,7 @@ +# files format check exclude path, please follow the instructions below to modify; +# If you need to exclude an entire folder, add the folder path in dir_path; +# If you need to exclude a file, add the path to the file in file_path. + +dir_path: +- CubeMX_Config +- linker_scripts diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/.mxproject b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/.mxproject new file mode 100644 index 00000000000..0b468cb87bf --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/.mxproject @@ -0,0 +1,23 @@ +[PreviousLibFiles] +LibFiles=Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_cortex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_rcc.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_rcc_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_bus.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_rcc.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_crs.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_system.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_utils.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_flash.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_flash_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_gpio.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_gpio_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_gpio.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_dma.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_dma_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_dma.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_dmamux.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pwr.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pwr_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_pwr.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_cortex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_def.h;Drivers\STM32H5xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_exti.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_exti.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_icache.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_uart.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_uart_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pcd.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pcd_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_usb.h;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_cortex.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rcc.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rcc_ex.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_flash.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_flash_ex.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_gpio.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_dma.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_dma_ex.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pwr.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pwr_ex.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_exti.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_icache.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_uart.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_uart_ex.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pcd.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pcd_ex.c;Drivers\STM32H5xx_HAL_Driver\Src\stm32h5xx_ll_usb.c;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_cortex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_rcc.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_rcc_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_bus.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_rcc.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_crs.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_system.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_utils.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_flash.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_flash_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_gpio.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_gpio_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_gpio.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_dma.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_dma_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_dma.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_dmamux.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pwr.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pwr_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_pwr.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_cortex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_def.h;Drivers\STM32H5xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_exti.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_exti.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_icache.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_uart.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_uart_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pcd.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_hal_pcd_ex.h;Drivers\STM32H5xx_HAL_Driver\Inc\stm32h5xx_ll_usb.h;Drivers\CMSIS\Device\ST\STM32H5xx\Include\stm32h503xx.h;Drivers\CMSIS\Device\ST\STM32H5xx\Include\stm32h5xx.h;Drivers\CMSIS\Device\ST\STM32H5xx\Include\system_stm32h5xx.h;Drivers\CMSIS\Device\ST\STM32H5xx\Source\Templates\system_stm32h5xx.c; + +[] +SourceFiles=;; + +[PreviousGenFiles] +AdvancedFolderStructure=true +HeaderFileListSize=3 +HeaderFiles#0=..\Core\Inc\stm32h5xx_it.h +HeaderFiles#1=..\Core\Inc\stm32h5xx_hal_conf.h +HeaderFiles#2=..\Core\Inc\main.h +HeaderFolderListSize=1 +HeaderPath#0=..\Core\Inc +HeaderFiles=; +SourceFileListSize=3 +SourceFiles#0=..\Core\Src\stm32h5xx_it.c +SourceFiles#1=..\Core\Src\stm32h5xx_hal_msp.c +SourceFiles#2=..\Core\Src\main.c +SourceFolderListSize=1 +SourcePath#0=..\Core\Src +SourceFiles=; + diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc new file mode 100644 index 00000000000..eb8c0fbe14d --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc @@ -0,0 +1,280 @@ +#MicroXplorer Configuration settings - do not modify +CAD.formats= +CAD.pinconfig= +CAD.provider= +File.Version=6 +GPIO.groupedBy= +KeepUserPlacement=false +MMTAppReg1.MEMORYMAP.AP=RW_priv_only +MMTAppReg1.MEMORYMAP.AppRegionName=RAM +MMTAppReg1.MEMORYMAP.ContextName=Cortex-M33NS +MMTAppReg1.MEMORYMAP.CoreName=Arm Cortex-M33 +MMTAppReg1.MEMORYMAP.DefaultDataRegion=true +MMTAppReg1.MEMORYMAP.IPParameters=StartAddress,Size,CoreName,DefaultDataRegion,ContextName,Name,AP +MMTAppReg1.MEMORYMAP.Name=RAM +MMTAppReg1.MEMORYMAP.Size=32768 +MMTAppReg1.MEMORYMAP.StartAddress=0x20000000 +MMTAppReg2.MEMORYMAP.AppRegionName=RAM Reserved Alias Region +MMTAppReg2.MEMORYMAP.CoreName=Arm Cortex-M33 +MMTAppReg2.MEMORYMAP.DefaultDataRegion=false +MMTAppReg2.MEMORYMAP.IPParameters=StartAddress,Size,CoreName,DefaultDataRegion,ReservedRegion,Name +MMTAppReg2.MEMORYMAP.Name=RAM Reserved Alias Region +MMTAppReg2.MEMORYMAP.ReservedRegion=true +MMTAppReg2.MEMORYMAP.Size=32768 +MMTAppReg2.MEMORYMAP.StartAddress=0x0A000000 +MMTAppReg3.MEMORYMAP.AP=RO_priv_only +MMTAppReg3.MEMORYMAP.AppRegionName=FLASH +MMTAppReg3.MEMORYMAP.Cacheability=WTRA +MMTAppReg3.MEMORYMAP.ContextName=Cortex-M33NS +MMTAppReg3.MEMORYMAP.CoreName=Arm Cortex-M33 +MMTAppReg3.MEMORYMAP.DefaultCodeRegion=true +MMTAppReg3.MEMORYMAP.DefaultDataRegion=false +MMTAppReg3.MEMORYMAP.IPParameters=StartAddress,Size,CoreName,DefaultDataRegion,MemType,ContextName,Name,AP,Cacheability,DefaultCodeRegion +MMTAppReg3.MEMORYMAP.MemType=ROM +MMTAppReg3.MEMORYMAP.Name=FLASH +MMTAppReg3.MEMORYMAP.Size=131072 +MMTAppReg3.MEMORYMAP.StartAddress=0x08000000 +MMTAppRegionsCount=3 +MMTConfigApplied=false +Mcu.CPN=STM32H503RBT6 +Mcu.Family=STM32H5 +Mcu.IP0=CORTEX_M33_NS +Mcu.IP1=DEBUG +Mcu.IP10=USB +Mcu.IP2=ICACHE +Mcu.IP3=MEMORYMAP +Mcu.IP4=NVIC +Mcu.IP5=PWR +Mcu.IP6=RCC +Mcu.IP7=SYS +Mcu.IP8=USART1 +Mcu.IP9=USART3 +Mcu.IPNb=11 +Mcu.Name=STM32H503RBTx +Mcu.Package=LQFP64 +Mcu.Pin0=PC13 +Mcu.Pin1=PC14-OSC32_IN(OSC32_IN) +Mcu.Pin10=PA9 +Mcu.Pin11=PA11 +Mcu.Pin12=PA12 +Mcu.Pin13=PA13(JTMS/SWDIO) +Mcu.Pin14=PA14(JTCK/SWCLK) +Mcu.Pin15=PA15(JTDI) +Mcu.Pin16=PC10 +Mcu.Pin17=PD2 +Mcu.Pin18=PB3(JTDO/TRACESWO) +Mcu.Pin19=VP_ICACHE_VS_ICACHE +Mcu.Pin2=PC15-OSC32_OUT(OSC32_OUT) +Mcu.Pin20=VP_PWR_VS_SECSignals +Mcu.Pin21=VP_SYS_VS_Systick +Mcu.Pin22=VP_MEMORYMAP_VS_MEMORYMAP +Mcu.Pin3=PH0-OSC_IN(PH0) +Mcu.Pin4=PH1-OSC_OUT(PH1) +Mcu.Pin5=PA3 +Mcu.Pin6=PA4 +Mcu.Pin7=PA5 +Mcu.Pin8=PB14 +Mcu.Pin9=PB15 +Mcu.PinsNb=23 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32H503RBTx +MxCube.Version=6.9.1 +MxDb.Version=DB.6.0.91 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +PA11.GPIOParameters=GPIO_Label +PA11.GPIO_Label=USB_FS_DN +PA11.Locked=true +PA11.Mode=Device +PA11.Signal=USB_DM +PA12.GPIOParameters=GPIO_Label +PA12.GPIO_Label=USB_FS_DP +PA12.Locked=true +PA12.Mode=Device +PA12.Signal=USB_DP +PA13(JTMS/SWDIO).GPIOParameters=GPIO_Label +PA13(JTMS/SWDIO).GPIO_Label=T_SWDIO +PA13(JTMS/SWDIO).Locked=true +PA13(JTMS/SWDIO).Mode=JTAG_4_pins +PA13(JTMS/SWDIO).Signal=DEBUG_JTMS-SWDIO +PA14(JTCK/SWCLK).GPIOParameters=GPIO_Label +PA14(JTCK/SWCLK).GPIO_Label=T_SWCLK +PA14(JTCK/SWCLK).Locked=true +PA14(JTCK/SWCLK).Mode=JTAG_4_pins +PA14(JTCK/SWCLK).Signal=DEBUG_JTCK-SWCLK +PA15(JTDI).GPIOParameters=GPIO_Label +PA15(JTDI).GPIO_Label=T_JTDI +PA15(JTDI).Locked=true +PA15(JTDI).Mode=JTAG_4_pins +PA15(JTDI).Signal=DEBUG_JTDI +PA3.GPIOParameters=GPIO_Label +PA3.GPIO_Label=T_VCP_RX +PA3.Locked=true +PA3.Mode=Asynchronous +PA3.Signal=USART3_RX +PA4.GPIOParameters=GPIO_Label +PA4.GPIO_Label=T_VCP_TX +PA4.Locked=true +PA4.Mode=Asynchronous +PA4.Signal=USART3_TX +PA5.GPIOParameters=GPIO_Label +PA5.GPIO_Label=USER_LED +PA5.Locked=true +PA5.Signal=GPIO_Output +PA9.GPIOParameters=GPIO_Label +PA9.GPIO_Label=USB_FS_VBUS +PA9.Locked=true +PA9.Signal=GPIO_Input +PB14.GPIOParameters=GPIO_Label +PB14.GPIO_Label=ARD_D1_TX +PB14.Locked=true +PB14.Mode=Asynchronous +PB14.Signal=USART1_TX +PB15.GPIOParameters=GPIO_Label +PB15.GPIO_Label=ARD_D0_RX +PB15.Locked=true +PB15.Mode=Asynchronous +PB15.Signal=USART1_RX +PB3(JTDO/TRACESWO).GPIOParameters=GPIO_Label +PB3(JTDO/TRACESWO).GPIO_Label=T_SWO +PB3(JTDO/TRACESWO).Locked=true +PB3(JTDO/TRACESWO).Mode=JTAG_4_pins +PB3(JTDO/TRACESWO).Signal=DEBUG_JTDO-SWO +PC10.GPIOParameters=GPIO_Label +PC10.GPIO_Label=USB_FS_PWR_EN +PC10.Locked=true +PC10.Signal=GPIO_Output +PC13.GPIOParameters=GPIO_Label +PC13.GPIO_Label=B1_BLUE_USER_BUTTON +PC13.Locked=true +PC13.Signal=GPXTI13 +PC14-OSC32_IN(OSC32_IN).Mode=LSE-External-Oscillator +PC14-OSC32_IN(OSC32_IN).Signal=RCC_OSC32_IN +PC15-OSC32_OUT(OSC32_OUT).Mode=LSE-External-Oscillator +PC15-OSC32_OUT(OSC32_OUT).Signal=RCC_OSC32_OUT +PD2.GPIOParameters=GPIO_Label +PD2.GPIO_Label=USB_FS_OVCR +PD2.Locked=true +PD2.Signal=GPXTI2 +PH0-OSC_IN(PH0).Mode=HSE-External-Oscillator +PH0-OSC_IN(PH0).Signal=RCC_OSC_IN +PH1-OSC_OUT(PH1).Mode=HSE-External-Oscillator +PH1-OSC_OUT(PH1).Signal=RCC_OSC_OUT +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=false +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32H503RBTx +ProjectManager.FirmwarePackage=STM32Cube FW_H5 V1.1.1 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=0 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=CubeMX_Config.ioc +ProjectManager.ProjectName=CubeMX_Config +ProjectManager.ProjectStructure= +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=MDK-ARM V5.32 +ProjectManager.ToolChainLocation= +ProjectManager.UAScriptAfterPath= +ProjectManager.UAScriptBeforePath= +ProjectManager.UnderRoot=false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_ICACHE_Init-ICACHE-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true,5-MX_USART3_UART_Init-USART3-false-HAL-true,6-MX_USB_PCD_Init-USB-false-HAL-true,7-MX_MEMORYMAP_Init-MEMORYMAP-false-HAL-true,0-MX_CORTEX_M33_NS_Init-CORTEX_M33_NS-false-HAL-true,0-MX_PWR_Init-PWR-false-HAL-true +RCC.ADCFreq_Value=250000000 +RCC.AHBFreq_Value=250000000 +RCC.APB1Freq_Value=250000000 +RCC.APB1TimFreq_Value=250000000 +RCC.APB2Freq_Value=250000000 +RCC.APB2TimFreq_Value=250000000 +RCC.APB3Freq_Value=250000000 +RCC.CKPERFreq_Value=64000000 +RCC.CRSFreq_Value=48000000 +RCC.CSI_VALUE=4000000 +RCC.CortexFreq_Value=250000000 +RCC.DACFreq_Value=32768 +RCC.EPOD_VALUE=24000000 +RCC.FCLKCortexFreq_Value=250000000 +RCC.FDCANFreq_Value=24000000 +RCC.FamilyName=M +RCC.HCLKFreq_Value=250000000 +RCC.HSE_VALUE=24000000 +RCC.HSI48_VALUE=48000000 +RCC.HSIDiv=RCC_HSI_DIV1 +RCC.HSI_VALUE=64000000 +RCC.I2C1Freq_Value=250000000 +RCC.I2C2Freq_Value=250000000 +RCC.I3C1Freq_Value=250000000 +RCC.I3C2Freq_Value=250000000 +RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,APB3Freq_Value,CKPERFreq_Value,CRSFreq_Value,CSI_VALUE,CortexFreq_Value,DACFreq_Value,EPOD_VALUE,FCLKCortexFreq_Value,FDCANFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSIDiv,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I3C1Freq_Value,I3C2Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSIRC_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,PLL2PoutputFreq_Value,PLL2QoutputFreq_Value,PLL2RoutputFreq_Value,PLLM,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLSourceVirtual,PWRFreq_Value,RNGFreq_Value,SPI1Freq_Value,SPI2Freq_Value,SPI3Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInput2Freq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOPLL2OutputFreq_Value +RCC.LPTIM1Freq_Value=250000000 +RCC.LPTIM2Freq_Value=250000000 +RCC.LPUART1Freq_Value=250000000 +RCC.LSCOPinFreq_Value=32000 +RCC.LSIRC_VALUE=32000 +RCC.MCO1PinFreq_Value=64000000 +RCC.MCO2PinFreq_Value=250000000 +RCC.PLL2PoutputFreq_Value=258000000 +RCC.PLL2QoutputFreq_Value=258000000 +RCC.PLL2RoutputFreq_Value=258000000 +RCC.PLLM=12 +RCC.PLLN=250 +RCC.PLLPoutputFreq_Value=250000000 +RCC.PLLQoutputFreq_Value=250000000 +RCC.PLLSourceVirtual=RCC_PLL1_SOURCE_HSE +RCC.PWRFreq_Value=250000000 +RCC.RNGFreq_Value=48000000 +RCC.SPI1Freq_Value=250000000 +RCC.SPI2Freq_Value=250000000 +RCC.SPI3Freq_Value=250000000 +RCC.SYSCLKFreq_VALUE=250000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.USART1Freq_Value=250000000 +RCC.USART2Freq_Value=250000000 +RCC.USART3Freq_Value=250000000 +RCC.USBFreq_Value=48000000 +RCC.VCOInput2Freq_Value=4000000 +RCC.VCOInputFreq_Value=2000000 +RCC.VCOOutputFreq_Value=500000000 +RCC.VCOPLL2OutputFreq_Value=516000000 +SH.GPXTI13.0=GPIO_EXTI13 +SH.GPXTI13.ConfNb=1 +SH.GPXTI2.0=GPIO_EXTI2 +SH.GPXTI2.ConfNb=1 +USART1.IPParameters=VirtualMode +USART1.VirtualMode=VM_ASYNC +USART3.IPParameters=VirtualMode +USART3.VirtualMode=VM_ASYNC +USB.IPParameters=VirtualMode +USB.VirtualMode=Device_Only +VP_ICACHE_VS_ICACHE.Mode=DefaultMode +VP_ICACHE_VS_ICACHE.Signal=ICACHE_VS_ICACHE +VP_MEMORYMAP_VS_MEMORYMAP.Mode=CurAppReg +VP_MEMORYMAP_VS_MEMORYMAP.Signal=MEMORYMAP_VS_MEMORYMAP +VP_PWR_VS_SECSignals.Mode=Security/Privilege +VP_PWR_VS_SECSignals.Signal=PWR_VS_SECSignals +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +board=NUCLEO-H503RB +boardIOC=true diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/main.h b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/main.h new file mode 100644 index 00000000000..e5f7d0d6e10 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/main.h @@ -0,0 +1,99 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.h + * @brief : Header for main.c file. + * This file contains the common defines of the application. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MAIN_H +#define __MAIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32h5xx_hal.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void Error_Handler(void); + +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +/* Private defines -----------------------------------------------------------*/ +#define B1_BLUE_USER_BUTTON_Pin GPIO_PIN_13 +#define B1_BLUE_USER_BUTTON_GPIO_Port GPIOC +#define T_VCP_RX_Pin GPIO_PIN_3 +#define T_VCP_RX_GPIO_Port GPIOA +#define T_VCP_TX_Pin GPIO_PIN_4 +#define T_VCP_TX_GPIO_Port GPIOA +#define USER_LED_Pin GPIO_PIN_5 +#define USER_LED_GPIO_Port GPIOA +#define ARD_D1_TX_Pin GPIO_PIN_14 +#define ARD_D1_TX_GPIO_Port GPIOB +#define ARD_D0_RX_Pin GPIO_PIN_15 +#define ARD_D0_RX_GPIO_Port GPIOB +#define USB_FS_VBUS_Pin GPIO_PIN_9 +#define USB_FS_VBUS_GPIO_Port GPIOA +#define USB_FS_DN_Pin GPIO_PIN_11 +#define USB_FS_DN_GPIO_Port GPIOA +#define USB_FS_DP_Pin GPIO_PIN_12 +#define USB_FS_DP_GPIO_Port GPIOA +#define T_SWDIO_Pin GPIO_PIN_13 +#define T_SWDIO_GPIO_Port GPIOA +#define T_SWCLK_Pin GPIO_PIN_14 +#define T_SWCLK_GPIO_Port GPIOA +#define T_JTDI_Pin GPIO_PIN_15 +#define T_JTDI_GPIO_Port GPIOA +#define USB_FS_PWR_EN_Pin GPIO_PIN_10 +#define USB_FS_PWR_EN_GPIO_Port GPIOC +#define USB_FS_OVCR_Pin GPIO_PIN_2 +#define USB_FS_OVCR_GPIO_Port GPIOD +#define T_SWO_Pin GPIO_PIN_3 +#define T_SWO_GPIO_Port GPIOB + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MAIN_H */ diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32_assert.h b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32_assert.h new file mode 100644 index 00000000000..ce166a22039 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32_assert.h @@ -0,0 +1,53 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32_assert.h + * @brief STM32 assert file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2018 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32_ASSERT_H +#define __STM32_ASSERT_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Includes ------------------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr: If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32_ASSERT_H */ + diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32h5xx_hal_conf.h b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32h5xx_hal_conf.h new file mode 100644 index 00000000000..e78fe91f52d --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32h5xx_hal_conf.h @@ -0,0 +1,504 @@ +/* USER CODE BEGIN Header */ +/** + ********************************************************************************************************************** + + * @file stm32h5xx_hal_conf.h + * @author MCD Application Team + * @brief HAL configuration file. + ********************************************************************************************************************** + + * @attention + * + * Copyright (c) 2022 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ********************************************************************************************************************** + + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -----------------------------------------------------------------------------*/ + +#ifndef STM32H5xx_HAL_CONF_H +#define STM32H5xx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ----------------------------------------------------------------------------------------------------*/ +/* Exported constants ------------------------------------------------------------------------------------------------*/ + +/* ########################################### Module Selection ##################################################### */ + +/** + * @brief This is the list of modules to be used in the HAL driver + */ + +#define HAL_MODULE_ENABLED + +/*#define HAL_ADC_MODULE_ENABLED */ +/*#define HAL_CEC_MODULE_ENABLED */ +/*#define HAL_COMP_MODULE_ENABLED */ +/*#define HAL_CORDIC_MODULE_ENABLED */ +/*#define HAL_CRC_MODULE_ENABLED */ +/*#define HAL_CRYP_MODULE_ENABLED */ +/*#define HAL_DAC_MODULE_ENABLED */ +/*#define HAL_DCACHE_MODULE_ENABLED */ +/*#define HAL_DCMI_MODULE_ENABLED */ +/*#define HAL_DTS_MODULE_ENABLED */ +/*#define HAL_ETH_MODULE_ENABLED */ +/*#define HAL_FDCAN_MODULE_ENABLED */ +/*#define HAL_FMAC_MODULE_ENABLED */ +/*#define HAL_GTZC_MODULE_ENABLED */ +/*#define HAL_HASH_MODULE_ENABLED */ +/*#define HAL_HCD_MODULE_ENABLED */ +/*#define HAL_IRDA_MODULE_ENABLED */ +/*#define HAL_IWDG_MODULE_ENABLED */ +/*#define HAL_I2C_MODULE_ENABLED */ +/*#define HAL_I3C_MODULE_ENABLED */ +/*#define HAL_I2S_MODULE_ENABLED */ +/*#define HAL_LPTIM_MODULE_ENABLED */ +/*#define HAL_NAND_MODULE_ENABLED */ +/*#define HAL_NOR_MODULE_ENABLED */ +/*#define HAL_OPAMP_MODULE_ENABLED */ +/*#define HAL_XSPI_MODULE_ENABLED */ +/*#define HAL_OTFDEC_MODULE_ENABLED */ +/*#define HAL_PKA_MODULE_ENABLED */ +/*#define HAL_RNG_MODULE_ENABLED */ +/*#define HAL_RTC_MODULE_ENABLED */ +/*#define HAL_SAI_MODULE_ENABLED */ +/*#define HAL_SD_MODULE_ENABLED */ +/*#define HAL_SDRAM_MODULE_ENABLED */ +/*#define HAL_MMC_MODULE_ENABLED */ +/*#define HAL_SMARTCARD_MODULE_ENABLED */ +/*#define HAL_SMBUS_MODULE_ENABLED */ +/*#define HAL_SPI_MODULE_ENABLED */ +/*#define HAL_SRAM_MODULE_ENABLED */ +/*#define HAL_TIM_MODULE_ENABLED */ +/*#define HAL_RAMCFG_MODULE_ENABLED */ +#define HAL_UART_MODULE_ENABLED +/*#define HAL_USART_MODULE_ENABLED */ +/*#define HAL_WWDG_MODULE_ENABLED */ +/*#define HAL_PSSI_MODULE_ENABLED */ +#define HAL_ICACHE_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED + +/* ####################################### Oscillator Values adaptation ##############################################*/ + +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) + #define HSE_VALUE 24000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal Core Speed oscillator (CSI) default value. + * This value is the default CSI range value after Reset. + */ +#if !defined (CSI_VALUE) + #define CSI_VALUE 4000000UL /*!< Value of the Internal oscillator in Hz*/ +#endif /* CSI_VALUE */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) + #define HSI_VALUE 64000000UL /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal High Speed oscillator (HSI48) value for USB FS, SDMMC and RNG. + * This internal oscillator is mainly dedicated to provide a high precision clock to + * the USB peripheral by means of a special Clock Recovery System (CRS) circuitry. + * When the CRS is not used, the HSI48 RC oscillator runs on it default frequency + * which is subject to manufacturing process variations. + */ +#if !defined (HSI48_VALUE) + #define HSI48_VALUE 48000000UL /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz. + The real value my vary depending on manufacturing process variations.*/ +#endif /* HSI48_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) + #define LSI_VALUE 32000UL /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature.*/ + +#if !defined (LSI_STARTUP_TIME) + #define LSI_STARTUP_TIME 130UL /*!< Time out for LSI start up, in ms */ +#endif /* LSI_STARTUP_TIME */ + +/** + * @brief External Low Speed oscillator (LSE) value. + * This value is used by the UART, RTC HAL module to compute the system frequency + */ +#if !defined (LSE_VALUE) + #define LSE_VALUE 32768UL /*!< Value of the External oscillator in Hz*/ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT 5000UL /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for SPI/SAI peripheral + * This value is used by the SPI/SAI HAL module to compute the SPI/SAI clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + + */ +#if !defined (EXTERNAL_CLOCK_VALUE) + #define EXTERNAL_CLOCK_VALUE 12288000UL /*!< Value of the External clock in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ############################################ System Configuration ################################################ */ + +/** + * @brief This is the HAL system configuration section + */ + +#define VDD_VALUE 3300UL /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY (15UL) /*!< tick interrupt priority (lowest by default) */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 0U /*!< Enable prefetch */ + +/* ############################################ Assert Selection #################################################### */ + +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ + +/* #define USE_FULL_ASSERT 1U */ + +/* ############################################ Register callback feature configuration ############################# */ + +/** + * @brief Set below the peripheral configuration to "1U" to add the support + * of HAL callback registration/unregistration feature for the HAL + * driver(s). This allows user application to provide specific callback + * functions thanks to HAL_PPP_RegisterCallback() rather than overwriting + * the default weak callback functions (see each stm32h5xx_hal_ppp.h file + * for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef + * for each PPP peripheral). + */ +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ +#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U /* CORDIC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DTS_REGISTER_CALLBACKS 0U /* DTS register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */ +#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U /* FMAC register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_I3C_REGISTER_CALLBACKS 0U /* I3C register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_IWDG_REGISTER_CALLBACKS 0U /* IWDG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ + +#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* OTFDEC register callback disabled */ +#define USE_HAL_OTFDEC_REGISTER_CALLBACKS 0U /* OPAMP register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_PKA_REGISTER_CALLBACKS 0U /* PKA register callback disabled */ +#define USE_HAL_RAMCFG_REGISTER_CALLBACKS 0U /* RAMCFG register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ +#define USE_HAL_XSPI_REGISTER_CALLBACKS 0U /* XSPI register callback disabled */ + +/* ############################################ SPI peripheral configuration ######################################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver + * Activated: CRC code is present inside driver + * Deactivated: CRC code cleaned from driver + */ +#define USE_SPI_CRC 0U + +/* Includes ----------------------------------------------------------------------------------------------------------*/ + +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32h5xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32h5xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_ICACHE_MODULE_ENABLED + #include "stm32h5xx_hal_icache.h" +#endif /* HAL_ICACHE_MODULE_ENABLED */ + +#ifdef HAL_DCACHE_MODULE_ENABLED + #include "stm32h5xx_hal_dcache.h" +#endif /* HAL_DCACHE_MODULE_ENABLED */ + +#ifdef HAL_GTZC_MODULE_ENABLED + #include "stm32h5xx_hal_gtzc.h" +#endif /* HAL_GTZC_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32h5xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_DTS_MODULE_ENABLED + #include "stm32h5xx_hal_dts.h" +#endif /* HAL_DTS_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32h5xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_PKA_MODULE_ENABLED + #include "stm32h5xx_hal_pka.h" +#endif /* HAL_PKA_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32h5xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32h5xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED + #include "stm32h5xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32h5xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32h5xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED + #include "stm32h5xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED + #include "stm32h5xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED + #include "stm32h5xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32h5xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED + #include "stm32h5xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED + #include "stm32h5xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32h5xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32h5xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_I3C_MODULE_ENABLED + #include "stm32h5xx_hal_i3c.h" +#endif /* HAL_I3C_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32h5xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32h5xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32h5xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_XSPI_MODULE_ENABLED + #include "stm32h5xx_hal_xspi.h" +#endif /* HAL_XSPI_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED + #include "stm32h5xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32h5xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED + #include "stm32h5xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED + #include "stm32h5xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED + #include "stm32h5xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32h5xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32h5xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32h5xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32h5xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32h5xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32h5xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32h5xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32h5xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED + #include "stm32h5xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_COMP_MODULE_ENABLED + #include "stm32h5xx_hal_comp.h" +#endif /* HAL_COMP_MODULE_ENABLED */ + +#ifdef HAL_CORDIC_MODULE_ENABLED + #include "stm32h5xx_hal_cordic.h" +#endif /* HAL_CORDIC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED + #include "stm32h5xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32h5xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED + #include "stm32h5xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FDCAN_MODULE_ENABLED + #include "stm32h5xx_hal_fdcan.h" +#endif /* HAL_FDCAN_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED + #include "stm32h5xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMAC_MODULE_ENABLED + #include "stm32h5xx_hal_fmac.h" +#endif /* HAL_FMAC_MODULE_ENABLED */ + +#ifdef HAL_OPAMP_MODULE_ENABLED + #include "stm32h5xx_hal_opamp.h" +#endif /* HAL_OPAMP_MODULE_ENABLED */ + +#ifdef HAL_OTFDEC_MODULE_ENABLED + #include "stm32h5xx_hal_otfdec.h" +#endif /* HAL_OTFDEC_MODULE_ENABLED */ + +#ifdef HAL_PSSI_MODULE_ENABLED + #include "stm32h5xx_hal_pssi.h" +#endif /* HAL_PSSI_MODULE_ENABLED */ + +#ifdef HAL_RAMCFG_MODULE_ENABLED + #include "stm32h5xx_hal_ramcfg.h" +#endif /* HAL_RAMCFG_MODULE_ENABLED */ + +/* Exported macro ----------------------------------------------------------------------------------------------------*/ + +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr: If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ----------------------------------------------------------------------------------------------- */ + + void assert_failed(uint8_t *file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32H5xx_HAL_CONF_H */ + diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32h5xx_it.h b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32h5xx_it.h new file mode 100644 index 00000000000..43b86c7ee7a --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Inc/stm32h5xx_it.h @@ -0,0 +1,66 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32h5xx_it.h + * @brief This file contains the headers of the interrupt handlers. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32H5xx_IT_H +#define __STM32H5xx_IT_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32H5xx_IT_H */ diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/main.c b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/main.c new file mode 100644 index 00000000000..4525fd8e44c --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/main.c @@ -0,0 +1,446 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.c + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ + +UART_HandleTypeDef huart1; +UART_HandleTypeDef huart3; + +PCD_HandleTypeDef hpcd_USB_DRD_FS; + +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +void SystemClock_Config(void); +static void MX_GPIO_Init(void); +static void MX_ICACHE_Init(void); +static void MX_USART1_UART_Init(void); +static void MX_USART3_UART_Init(void); +static void MX_USB_PCD_Init(void); +static void MX_MEMORYMAP_Init(void); +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + /* USER CODE BEGIN 1 */ + + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + MX_ICACHE_Init(); + MX_USART1_UART_Init(); + MX_USART3_UART_Init(); + MX_USB_PCD_Init(); + MX_MEMORYMAP_Init(); + /* USER CODE BEGIN 2 */ + + /* USER CODE END 2 */ + + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + /* USER CODE END WHILE */ + + /* USER CODE BEGIN 3 */ + } + /* USER CODE END 3 */ +} + +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Configure the main internal regulator output voltage + */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0); + + while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 12; + RCC_OscInitStruct.PLL.PLLN = 250; + RCC_OscInitStruct.PLL.PLLP = 2; + RCC_OscInitStruct.PLL.PLLQ = 2; + RCC_OscInitStruct.PLL.PLLR = 2; + RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1_VCIRANGE_1; + RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1_VCORANGE_WIDE; + RCC_OscInitStruct.PLL.PLLFRACN = 0; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 + |RCC_CLOCKTYPE_PCLK3; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB3CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) + { + Error_Handler(); + } +} + +/** + * @brief ICACHE Initialization Function + * @param None + * @retval None + */ +static void MX_ICACHE_Init(void) +{ + + /* USER CODE BEGIN ICACHE_Init 0 */ + + /* USER CODE END ICACHE_Init 0 */ + + /* USER CODE BEGIN ICACHE_Init 1 */ + + /* USER CODE END ICACHE_Init 1 */ + + /** Enable instruction cache (default 2-ways set associative cache) + */ + if (HAL_ICACHE_Enable() != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN ICACHE_Init 2 */ + + /* USER CODE END ICACHE_Init 2 */ + +} + +/** + * @brief MEMORYMAP Initialization Function + * @param None + * @retval None + */ +static void MX_MEMORYMAP_Init(void) +{ + + /* USER CODE BEGIN MEMORYMAP_Init 0 */ + + /* USER CODE END MEMORYMAP_Init 0 */ + + /* USER CODE BEGIN MEMORYMAP_Init 1 */ + + /* USER CODE END MEMORYMAP_Init 1 */ + /* USER CODE BEGIN MEMORYMAP_Init 2 */ + + /* USER CODE END MEMORYMAP_Init 2 */ + +} + +/** + * @brief USART1 Initialization Function + * @param None + * @retval None + */ +static void MX_USART1_UART_Init(void) +{ + + /* USER CODE BEGIN USART1_Init 0 */ + + /* USER CODE END USART1_Init 0 */ + + /* USER CODE BEGIN USART1_Init 1 */ + + /* USER CODE END USART1_Init 1 */ + huart1.Instance = USART1; + huart1.Init.BaudRate = 115200; + huart1.Init.WordLength = UART_WORDLENGTH_8B; + huart1.Init.StopBits = UART_STOPBITS_1; + huart1.Init.Parity = UART_PARITY_NONE; + huart1.Init.Mode = UART_MODE_TX_RX; + huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; + huart1.Init.OverSampling = UART_OVERSAMPLING_16; + huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; + huart1.Init.ClockPrescaler = UART_PRESCALER_DIV1; + huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; + if (HAL_UART_Init(&huart1) != HAL_OK) + { + Error_Handler(); + } + if (HAL_UARTEx_SetTxFifoThreshold(&huart1, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) + { + Error_Handler(); + } + if (HAL_UARTEx_SetRxFifoThreshold(&huart1, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) + { + Error_Handler(); + } + if (HAL_UARTEx_DisableFifoMode(&huart1) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN USART1_Init 2 */ + + /* USER CODE END USART1_Init 2 */ + +} + +/** + * @brief USART3 Initialization Function + * @param None + * @retval None + */ +static void MX_USART3_UART_Init(void) +{ + + /* USER CODE BEGIN USART3_Init 0 */ + + /* USER CODE END USART3_Init 0 */ + + /* USER CODE BEGIN USART3_Init 1 */ + + /* USER CODE END USART3_Init 1 */ + huart3.Instance = USART3; + huart3.Init.BaudRate = 115200; + huart3.Init.WordLength = UART_WORDLENGTH_8B; + huart3.Init.StopBits = UART_STOPBITS_1; + huart3.Init.Parity = UART_PARITY_NONE; + huart3.Init.Mode = UART_MODE_TX_RX; + huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; + huart3.Init.OverSampling = UART_OVERSAMPLING_16; + huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; + huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1; + huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; + if (HAL_UART_Init(&huart3) != HAL_OK) + { + Error_Handler(); + } + if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) + { + Error_Handler(); + } + if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) + { + Error_Handler(); + } + if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN USART3_Init 2 */ + + /* USER CODE END USART3_Init 2 */ + +} + +/** + * @brief USB Initialization Function + * @param None + * @retval None + */ +static void MX_USB_PCD_Init(void) +{ + + /* USER CODE BEGIN USB_Init 0 */ + + /* USER CODE END USB_Init 0 */ + + /* USER CODE BEGIN USB_Init 1 */ + + /* USER CODE END USB_Init 1 */ + hpcd_USB_DRD_FS.Instance = USB_DRD_FS; + hpcd_USB_DRD_FS.Init.dev_endpoints = 8; + hpcd_USB_DRD_FS.Init.speed = USBD_FS_SPEED; + hpcd_USB_DRD_FS.Init.phy_itface = PCD_PHY_EMBEDDED; + hpcd_USB_DRD_FS.Init.Sof_enable = DISABLE; + hpcd_USB_DRD_FS.Init.low_power_enable = DISABLE; + hpcd_USB_DRD_FS.Init.lpm_enable = DISABLE; + hpcd_USB_DRD_FS.Init.battery_charging_enable = DISABLE; + hpcd_USB_DRD_FS.Init.vbus_sensing_enable = DISABLE; + hpcd_USB_DRD_FS.Init.bulk_doublebuffer_enable = DISABLE; + hpcd_USB_DRD_FS.Init.iso_singlebuffer_enable = DISABLE; + if (HAL_PCD_Init(&hpcd_USB_DRD_FS) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN USB_Init 2 */ + + /* USER CODE END USB_Init 2 */ + +} + +/** + * @brief GPIO Initialization Function + * @param None + * @retval None + */ +static void MX_GPIO_Init(void) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; +/* USER CODE BEGIN MX_GPIO_Init_1 */ +/* USER CODE END MX_GPIO_Init_1 */ + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOH_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(USER_LED_GPIO_Port, USER_LED_Pin, GPIO_PIN_RESET); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(USB_FS_PWR_EN_GPIO_Port, USB_FS_PWR_EN_Pin, GPIO_PIN_RESET); + + /*Configure GPIO pin : B1_BLUE_USER_BUTTON_Pin */ + GPIO_InitStruct.Pin = B1_BLUE_USER_BUTTON_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(B1_BLUE_USER_BUTTON_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pin : USER_LED_Pin */ + GPIO_InitStruct.Pin = USER_LED_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(USER_LED_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pin : USB_FS_VBUS_Pin */ + GPIO_InitStruct.Pin = USB_FS_VBUS_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(USB_FS_VBUS_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pin : USB_FS_PWR_EN_Pin */ + GPIO_InitStruct.Pin = USB_FS_PWR_EN_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(USB_FS_PWR_EN_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pin : USB_FS_OVCR_Pin */ + GPIO_InitStruct.Pin = USB_FS_OVCR_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(USB_FS_OVCR_GPIO_Port, &GPIO_InitStruct); + +/* USER CODE BEGIN MX_GPIO_Init_2 */ +/* USER CODE END MX_GPIO_Init_2 */ +} + +/* USER CODE BEGIN 4 */ + +/* USER CODE END 4 */ + +/** + * @brief This function is executed in case of error occurrence. + * @retval None + */ +void Error_Handler(void) +{ + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + __disable_irq(); + while (1) + { + } + /* USER CODE END Error_Handler_Debug */ +} + +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t *file, uint32_t line) +{ + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/stm32h5xx_hal_msp.c b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/stm32h5xx_hal_msp.c new file mode 100644 index 00000000000..f1a3e4c194d --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/stm32h5xx_hal_msp.c @@ -0,0 +1,282 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32h5xx_hal_msp.c + * @brief This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ +#include +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Define */ + +/* USER CODE END Define */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Macro */ + +/* USER CODE END Macro */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External functions --------------------------------------------------------*/ +/* USER CODE BEGIN ExternalFunctions */ + +/* USER CODE END ExternalFunctions */ + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ +/** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + /* System interrupt init*/ + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + +/** +* @brief UART MSP Initialization +* This function configures the hardware resources used in this example +* @param huart: UART handle pointer +* @retval None +*/ +void HAL_UART_MspInit(UART_HandleTypeDef* huart) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + if(huart->Instance==USART1) + { + /* USER CODE BEGIN USART1_MspInit 0 */ + + /* USER CODE END USART1_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART1; + PeriphClkInitStruct.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /* Peripheral clock enable */ + __HAL_RCC_USART1_CLK_ENABLE(); + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**USART1 GPIO Configuration + PB14 ------> USART1_TX + PB15 ------> USART1_RX + */ + GPIO_InitStruct.Pin = ARD_D1_TX_Pin|ARD_D0_RX_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF4_USART1; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* USER CODE BEGIN USART1_MspInit 1 */ + + /* USER CODE END USART1_MspInit 1 */ + } + else if(huart->Instance==USART3) + { + /* USER CODE BEGIN USART3_MspInit 0 */ + + /* USER CODE END USART3_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3; + PeriphClkInitStruct.Usart3ClockSelection = RCC_USART3CLKSOURCE_PCLK1; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /* Peripheral clock enable */ + __HAL_RCC_USART3_CLK_ENABLE(); + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**USART3 GPIO Configuration + PA3 ------> USART3_RX + PA4 ------> USART3_TX + */ + GPIO_InitStruct.Pin = T_VCP_RX_Pin|T_VCP_TX_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF13_USART3; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /* USER CODE BEGIN USART3_MspInit 1 */ + + /* USER CODE END USART3_MspInit 1 */ + } + +} + +/** +* @brief UART MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param huart: UART handle pointer +* @retval None +*/ +void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) +{ + if(huart->Instance==USART1) + { + /* USER CODE BEGIN USART1_MspDeInit 0 */ + + /* USER CODE END USART1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_USART1_CLK_DISABLE(); + + /**USART1 GPIO Configuration + PB14 ------> USART1_TX + PB15 ------> USART1_RX + */ + HAL_GPIO_DeInit(GPIOB, ARD_D1_TX_Pin|ARD_D0_RX_Pin); + + /* USER CODE BEGIN USART1_MspDeInit 1 */ + + /* USER CODE END USART1_MspDeInit 1 */ + } + else if(huart->Instance==USART3) + { + /* USER CODE BEGIN USART3_MspDeInit 0 */ + + /* USER CODE END USART3_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_USART3_CLK_DISABLE(); + + /**USART3 GPIO Configuration + PA3 ------> USART3_RX + PA4 ------> USART3_TX + */ + HAL_GPIO_DeInit(GPIOA, T_VCP_RX_Pin|T_VCP_TX_Pin); + + /* USER CODE BEGIN USART3_MspDeInit 1 */ + + /* USER CODE END USART3_MspDeInit 1 */ + } + +} + +/** +* @brief PCD MSP Initialization +* This function configures the hardware resources used in this example +* @param hpcd: PCD handle pointer +* @retval None +*/ +void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + if(hpcd->Instance==USB_DRD_FS) + { + /* USER CODE BEGIN USB_DRD_FS_MspInit 0 */ + + /* USER CODE END USB_DRD_FS_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB; + PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**USB GPIO Configuration + PA11 ------> USB_DM + PA12 ------> USB_DP + */ + GPIO_InitStruct.Pin = USB_FS_DN_Pin|USB_FS_DP_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF10_USB; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /* Peripheral clock enable */ + __HAL_RCC_USB_CLK_ENABLE(); + /* USER CODE BEGIN USB_DRD_FS_MspInit 1 */ + + /* USER CODE END USB_DRD_FS_MspInit 1 */ + } + +} + +/** +* @brief PCD MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param hpcd: PCD handle pointer +* @retval None +*/ +void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd) +{ + if(hpcd->Instance==USB_DRD_FS) + { + /* USER CODE BEGIN USB_DRD_FS_MspDeInit 0 */ + + /* USER CODE END USB_DRD_FS_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_USB_CLK_DISABLE(); + + /**USB GPIO Configuration + PA11 ------> USB_DM + PA12 ------> USB_DP + */ + HAL_GPIO_DeInit(GPIOA, USB_FS_DN_Pin|USB_FS_DP_Pin); + + /* USER CODE BEGIN USB_DRD_FS_MspDeInit 1 */ + + /* USER CODE END USB_DRD_FS_MspDeInit 1 */ + } + +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/stm32h5xx_it.c b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/stm32h5xx_it.c new file mode 100644 index 00000000000..a375ba9eb25 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/stm32h5xx_it.c @@ -0,0 +1,203 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32h5xx_it.c + * @brief Interrupt Service Routines. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "stm32h5xx_it.h" +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* External variables --------------------------------------------------------*/ + +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/******************************************************************************/ +/* Cortex Processor Interruption and Exception Handlers */ +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + while (1) + { + } + /* USER CODE END NonMaskableInt_IRQn 1 */ +} + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_HardFault_IRQn 0 */ + /* USER CODE END W1_HardFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ + /* USER CODE END W1_MemoryManagement_IRQn 0 */ + } +} + +/** + * @brief This function handles Pre-fetch fault, memory access fault. + */ +void BusFault_Handler(void) +{ + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_BusFault_IRQn 0 */ + /* USER CODE END W1_BusFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Undefined instruction or illegal state. + */ +void UsageFault_Handler(void) +{ + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ + /* USER CODE END W1_UsageFault_IRQn 0 */ + } +} + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + /* USER CODE BEGIN SVCall_IRQn 0 */ + + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ + + /* USER CODE END SVCall_IRQn 1 */ +} + +/** + * @brief This function handles Debug monitor. + */ +void DebugMon_Handler(void) +{ + /* USER CODE BEGIN DebugMonitor_IRQn 0 */ + + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + + /* USER CODE END DebugMonitor_IRQn 1 */ +} + +/** + * @brief This function handles Pendable request for system service. + */ +void PendSV_Handler(void) +{ + /* USER CODE BEGIN PendSV_IRQn 0 */ + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + +/******************************************************************************/ +/* STM32H5xx Peripheral Interrupt Handlers */ +/* Add here the Interrupt Handlers for the used peripherals. */ +/* For the available peripheral interrupt handler names, */ +/* please refer to the startup file (startup_stm32h5xx.s). */ +/******************************************************************************/ + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/system_stm32h5xx.c b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/system_stm32h5xx.c new file mode 100644 index 00000000000..0c74ae7da03 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/CubeMX_Config/Src/system_stm32h5xx.c @@ -0,0 +1,401 @@ +/** + ****************************************************************************** + * @file system_stm32h5xx.c + * @author MCD Application Team + * @brief CMSIS Cortex-M33 Device Peripheral Access Layer System Source File + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + * This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32h5xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * After each device reset the HSI (64 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32h5xx.s" file, to + * configure the system clock before to branch to main program. + * + * This file configures the system clock as follows: + *============================================================================= + *----------------------------------------------------------------------------- + * System Clock source | HSI + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 64000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 64000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 1 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 1 + *----------------------------------------------------------------------------- + * APB3 Prescaler | 1 + *----------------------------------------------------------------------------- + * HSI Division factor | 1 + *----------------------------------------------------------------------------- + * PLL1_SRC | No clock + *----------------------------------------------------------------------------- + * PLL1_M | Prescaler disabled + *----------------------------------------------------------------------------- + * PLL1_N | 129 + *----------------------------------------------------------------------------- + * PLL1_P | 2 + *----------------------------------------------------------------------------- + * PLL1_Q | 2 + *----------------------------------------------------------------------------- + * PLL1_R | 2 + *----------------------------------------------------------------------------- + * PLL1_FRACN | 0 + *----------------------------------------------------------------------------- + * PLL2_SRC | No clock + *----------------------------------------------------------------------------- + * PLL2_M | Prescaler disabled + *----------------------------------------------------------------------------- + * PLL2_N | 129 + *----------------------------------------------------------------------------- + * PLL2_P | 2 + *----------------------------------------------------------------------------- + * PLL2_Q | 2 + *----------------------------------------------------------------------------- + * PLL2_R | 2 + *----------------------------------------------------------------------------- + * PLL2_FRACN | 0 + *----------------------------------------------------------------------------- + * PLL3_SRC | No clock + *----------------------------------------------------------------------------- + * PLL3_M | Prescaler disabled + *----------------------------------------------------------------------------- + * PLL3_N | 129 + *----------------------------------------------------------------------------- + * PLL3_P | 2 + *----------------------------------------------------------------------------- + * PLL3_Q | 2 + *----------------------------------------------------------------------------- + * PLL3_R | 2 + *----------------------------------------------------------------------------- + * PLL3_FRACN | 0 + *----------------------------------------------------------------------------- + *============================================================================= + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup STM32H5xx_system + * @{ + */ + +/** @addtogroup STM32H5xx_System_Private_Includes + * @{ + */ + +#include "stm32h5xx.h" + +/** + * @} + */ + +/** @addtogroup STM32H5xx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32H5xx_System_Private_Defines + * @{ + */ + +#if !defined (HSE_VALUE) + #define HSE_VALUE (25000000UL) /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (CSI_VALUE) + #define CSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/ +#endif /* CSI_VALUE */ + +#if !defined (HSI_VALUE) + #define HSI_VALUE (64000000UL) /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/************************* Miscellaneous Configuration ************************/ +/*!< Uncomment the following line if you need to relocate your vector Table in + Internal SRAM. */ +/* #define VECT_TAB_SRAM */ +#define VECT_TAB_OFFSET 0x00U /*!< Vector Table base offset field. + This value must be a multiple of 0x200. */ +/******************************************************************************/ + +/** + * @} + */ + +/** @addtogroup STM32H5xx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32H5xx_System_Private_Variables + * @{ + */ + /* The SystemCoreClock variable is updated in three ways: + 1) by calling CMSIS function SystemCoreClockUpdate() + 2) by calling HAL API function HAL_RCC_GetHCLKFreq() + 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency + Note: If you use this function to configure the system clock; then there + is no need to call the 2 first functions listed above, since SystemCoreClock + variable is updated automatically. + */ + uint32_t SystemCoreClock = 64000000U; + + const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; + const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; +/** + * @} + */ + +/** @addtogroup STM32H5xx_System_Private_FunctionPrototypes + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32H5xx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system. + * @param None + * @retval None + */ + +void SystemInit(void) +{ + uint32_t reg_opsr; + + /* FPU settings ------------------------------------------------------------*/ + #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) + SCB->CPACR |= ((3UL << 20U)|(3UL << 22U)); /* set CP10 and CP11 Full Access */ + #endif + + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set HSION bit */ + RCC->CR = RCC_CR_HSION; + + /* Reset CFGR register */ + RCC->CFGR1 = 0U; + RCC->CFGR2 = 0U; + + /* Reset HSEON, HSECSSON, HSEBYP, HSEEXT, HSIDIV, HSIKERON, CSION, CSIKERON, HSI48 and PLLxON bits */ +#if defined(RCC_CR_PLL3ON) + RCC->CR &= ~(RCC_CR_HSEON | RCC_CR_HSECSSON | RCC_CR_HSEBYP | RCC_CR_HSEEXT | RCC_CR_HSIDIV | RCC_CR_HSIKERON | \ + RCC_CR_CSION | RCC_CR_CSIKERON |RCC_CR_HSI48ON | RCC_CR_PLL1ON | RCC_CR_PLL2ON | RCC_CR_PLL3ON); +#else + RCC->CR &= ~(RCC_CR_HSEON | RCC_CR_HSECSSON | RCC_CR_HSEBYP | RCC_CR_HSEEXT | RCC_CR_HSIDIV | RCC_CR_HSIKERON | \ + RCC_CR_CSION | RCC_CR_CSIKERON |RCC_CR_HSI48ON | RCC_CR_PLL1ON | RCC_CR_PLL2ON); +#endif + + /* Reset PLLxCFGR register */ + RCC->PLL1CFGR = 0U; + RCC->PLL2CFGR = 0U; +#if defined(RCC_CR_PLL3ON) + RCC->PLL3CFGR = 0U; +#endif /* RCC_CR_PLL3ON */ + + /* Reset PLL1DIVR register */ + RCC->PLL1DIVR = 0x01010280U; + /* Reset PLL1FRACR register */ + RCC->PLL1FRACR = 0x00000000U; + /* Reset PLL2DIVR register */ + RCC->PLL2DIVR = 0x01010280U; + /* Reset PLL2FRACR register */ + RCC->PLL2FRACR = 0x00000000U; +#if defined(RCC_CR_PLL3ON) + /* Reset PLL3DIVR register */ + RCC->PLL3DIVR = 0x01010280U; + /* Reset PLL3FRACR register */ + RCC->PLL3FRACR = 0x00000000U; +#endif /* RCC_CR_PLL3ON */ + + /* Reset HSEBYP bit */ + RCC->CR &= ~(RCC_CR_HSEBYP); + + /* Disable all interrupts */ + RCC->CIER = 0U; + + /* Configure the Vector Table location add offset address ------------------*/ + #ifdef VECT_TAB_SRAM + SCB->VTOR = SRAM1_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ + #else + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ + #endif /* VECT_TAB_SRAM */ + + /* Check OPSR register to verify if there is an ongoing swap or option bytes update interrupted by a reset */ + reg_opsr = FLASH->OPSR & FLASH_OPSR_CODE_OP; + if ((reg_opsr == FLASH_OPSR_CODE_OP) || (reg_opsr == (FLASH_OPSR_CODE_OP_2 | FLASH_OPSR_CODE_OP_1))) + { + /* Check FLASH Option Control Register access */ + if ((FLASH->OPTCR & FLASH_OPTCR_OPTLOCK) != 0U) + { + /* Authorizes the Option Byte registers programming */ + FLASH->OPTKEYR = 0x08192A3BU; + FLASH->OPTKEYR = 0x4C5D6E7FU; + } + /* Launch the option bytes change operation */ + FLASH->OPTCR |= FLASH_OPTCR_OPTSTART; + + /* Lock the FLASH Option Control Register access */ + FLASH->OPTCR |= FLASH_OPTCR_OPTLOCK; + } +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is CSI, SystemCoreClock will contain the CSI_VALUE(*) + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) + * or HSI_VALUE(**) or CSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) CSI_VALUE is a constant defined in stm32h5xx_hal.h file (default value + * 4 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSI_VALUE is a constant defined in stm32h5xx_hal.h file (default value + * 64 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (***) HSE_VALUE is a constant defined in stm32h5xx_hal.h file (default value + * 25 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t pllp, pllsource, pllm, pllfracen, hsivalue, tmp; + float_t fracn1, pllvco; + + /* Get SYSCLK source -------------------------------------------------------*/ + switch (RCC->CFGR1 & RCC_CFGR1_SWS) + { + case 0x00UL: /* HSI used as system clock source */ + SystemCoreClock = (uint32_t) (HSI_VALUE >> ((RCC->CR & RCC_CR_HSIDIV)>> 3)); + break; + + case 0x08UL: /* CSI used as system clock source */ + SystemCoreClock = CSI_VALUE; + break; + + case 0x10UL: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + + case 0x18UL: /* PLL1 used as system clock source */ + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLLM) * PLLN + SYSCLK = PLL_VCO / PLLR + */ + pllsource = (RCC->PLL1CFGR & RCC_PLL1CFGR_PLL1SRC); + pllm = ((RCC->PLL1CFGR & RCC_PLL1CFGR_PLL1M)>> RCC_PLL1CFGR_PLL1M_Pos); + pllfracen = ((RCC->PLL1CFGR & RCC_PLL1CFGR_PLL1FRACEN)>>RCC_PLL1CFGR_PLL1FRACEN_Pos); + fracn1 = (float_t)(uint32_t)(pllfracen* ((RCC->PLL1FRACR & RCC_PLL1FRACR_PLL1FRACN)>> RCC_PLL1FRACR_PLL1FRACN_Pos)); + + switch (pllsource) + { + case 0x01UL: /* HSI used as PLL clock source */ + hsivalue = (HSI_VALUE >> ((RCC->CR & RCC_CR_HSIDIV)>> 3)) ; + pllvco = ((float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_PLL1N) + \ + (fracn1/(float_t)0x2000) +(float_t)1 ); + break; + + case 0x02UL: /* CSI used as PLL clock source */ + pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_PLL1N) + \ + (fracn1/(float_t)0x2000) +(float_t)1 ); + break; + + case 0x03UL: /* HSE used as PLL clock source */ + pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_PLL1N) + \ + (fracn1/(float_t)0x2000) +(float_t)1 ); + break; + + default: /* No clock sent to PLL*/ + pllvco = (float_t) 0U; + break; + } + + pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_PLL1P) >>RCC_PLL1DIVR_PLL1P_Pos) + 1U ) ; + SystemCoreClock = (uint32_t)(float_t)(pllvco/(float_t)pllp); + + break; + + default: + SystemCoreClock = HSI_VALUE; + break; + } + /* Compute HCLK clock frequency --------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR2 & RCC_CFGR2_HPRE) >> RCC_CFGR2_HPRE_Pos)]; + /* HCLK clock frequency */ + SystemCoreClock >>= tmp; +} + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + diff --git a/bsp/stm32/stm32h503-st-nucleo/board/Kconfig b/bsp/stm32/stm32h503-st-nucleo/board/Kconfig new file mode 100644 index 00000000000..7bf05a78e65 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/Kconfig @@ -0,0 +1,67 @@ +menu "Hardware Drivers Config" + +config SOC_STM32H503RB + bool + select SOC_SERIES_STM32H5 + select RT_USING_COMPONENTS_INIT + select RT_USING_USER_MAIN + default y + +menu "On-chip Peripheral Drivers" + + config BSP_USING_GPIO + bool "Enable GPIO" + select RT_USING_PIN + default y + + menuconfig BSP_USING_UART + bool "Enable UART" + default y + select RT_USING_SERIAL + if BSP_USING_UART + config BSP_USING_UART1 + bool "Enable UART1" + default n + + config BSP_UART1_RX_USING_DMA + bool "Enable UART1 RX DMA" + depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA + default n + + config BSP_USING_UART2 + bool "Enable UART2" + default n + + config BSP_UART2_RX_USING_DMA + bool "Enable UART2 RX DMA" + depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA + default n + + config BSP_USING_UART3 + bool "Enable UART3" + default y + + config BSP_UART3_RX_USING_DMA + bool "Enable UART3 RX DMA" + depends on BSP_USING_UART3 && RT_SERIAL_USING_DMA + default n + + config BSP_USING_LPUART1 + bool "Enable LPUART1" + default n + + config BSP_LPUART1_RX_USING_DMA + bool "Enable LPUART1 RX DMA" + depends on BSP_USING_LPUART1 && RT_SERIAL_USING_DMA + default n + endif + + source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig" + +endmenu + +menu "Board extended module Drivers" + +endmenu + +endmenu diff --git a/bsp/stm32/stm32h503-st-nucleo/board/SConscript b/bsp/stm32/stm32h503-st-nucleo/board/SConscript new file mode 100644 index 00000000000..bba7835ce58 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/SConscript @@ -0,0 +1,32 @@ +import os +import rtconfig +from building import * + +Import('SDK_LIB') + +cwd = GetCurrentDir() + +# add general drivers +src = Split(''' +board.c +CubeMX_Config/Src/stm32h5xx_hal_msp.c +''') + +path = [cwd] +path += [cwd + '/CubeMX_Config/Inc'] + +startup_path_prefix = SDK_LIB + +if rtconfig.PLATFORM in ['gcc']: + src += [startup_path_prefix + '/STM32H5xx_HAL/CMSIS/Device/ST/STM32H5xx/Source/Templates/gcc/startup_stm32h503xx.s'] +elif rtconfig.PLATFORM in ['armcc', 'armclang']: + src += [startup_path_prefix + '/STM32H5xx_HAL/CMSIS/Device/ST/STM32H5xx/Source/Templates/arm/startup_stm32h503xx.s'] +elif rtconfig.PLATFORM in ['iccarm']: + src += [startup_path_prefix + '/STM32H5xx_HAL/CMSIS/Device/ST/STM32H5xx/Source/Templates/iar/startup_stm32h503xx.s'] + +# You can select chips from the list above +CPPDEFINES = ['STM32H503xx'] +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) + +Return('group') + diff --git a/bsp/stm32/stm32h503-st-nucleo/board/board.c b/bsp/stm32/stm32h503-st-nucleo/board/board.c new file mode 100644 index 00000000000..3896f8a4007 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/board.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-12-22 ChuShicheng first version + */ + +#include "board.h" + +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Configure the main internal regulator output voltage + */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0); + + while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLL1_SOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 12; + RCC_OscInitStruct.PLL.PLLN = 250; + RCC_OscInitStruct.PLL.PLLP = 2; + RCC_OscInitStruct.PLL.PLLQ = 2; + RCC_OscInitStruct.PLL.PLLR = 2; + RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1_VCIRANGE_1; + RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1_VCORANGE_WIDE; + RCC_OscInitStruct.PLL.PLLFRACN = 0; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 + |RCC_CLOCKTYPE_PCLK3; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB3CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) + { + Error_Handler(); + } +} diff --git a/bsp/stm32/stm32h503-st-nucleo/board/board.h b/bsp/stm32/stm32h503-st-nucleo/board/board.h new file mode 100644 index 00000000000..418229e8615 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/board.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-12-22 ChuShicheng first version + */ + +#ifndef __BOARD_H__ +#define __BOARD_H__ + +#include +#include +#include "drv_common.h" +#include "drv_gpio.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000) +#define STM32_FLASH_SIZE (128 * 1024) +#define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE)) + +#define STM32_SRAM1_SIZE (32) +#define STM32_SRAM1_START (0x20000000) +#define STM32_SRAM1_END (STM32_SRAM1_START + STM32_SRAM1_SIZE * 1024) + +#if defined(__ARMCC_VERSION) +extern int Image$$RW_IRAM1$$ZI$$Limit; +#define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit) +#elif __ICCARM__ +#pragma section="CSTACK" +#define HEAP_BEGIN (__segment_end("CSTACK")) +#else +extern int __bss_end; +#define HEAP_BEGIN ((void *)&__bss_end) +#endif + +#define HEAP_END STM32_SRAM1_END + +void SystemClock_Config(void); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.icf b/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.icf new file mode 100644 index 00000000000..d3b0f3f4a61 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.icf @@ -0,0 +1,29 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; + +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x0400; +define symbol __ICFEDIT_size_heap__ = 0x000; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, last block CSTACK}; diff --git a/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.lds b/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.lds new file mode 100644 index 00000000000..79003f9de7d --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.lds @@ -0,0 +1,156 @@ +/* + * linker script for STM32L4XX with GNU ld + */ + +/* Program Entry, set to mark it as "used" and avoid gc */ +MEMORY +{ + ROM (rx) : ORIGIN = 0x08000000, LENGTH = 128k /* 128KB flash */ + RAM (rw) : ORIGIN = 0x20000000, LENGTH = 32k /* 32KB sram */ +} +ENTRY(Reset_Handler) +_system_stack_size = 0x400; + +SECTIONS +{ + .text : + { + . = ALIGN(4); + _stext = .; + KEEP(*(.isr_vector)) /* Startup code */ + + . = ALIGN(4); + *(.text) /* remaining code */ + *(.text.*) /* remaining code */ + *(.rodata) /* read-only data (constants) */ + *(.rodata*) + *(.glue_7) + *(.glue_7t) + *(.gnu.linkonce.t*) + + /* section information for finsh shell */ + . = ALIGN(4); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + + . = ALIGN(4); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + + /* section information for initial. */ + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + + . = ALIGN(4); + + PROVIDE(__ctors_start__ = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array)) + PROVIDE(__ctors_end__ = .); + + . = ALIGN(4); + + _etext = .; + } > ROM = 0 + + /* .ARM.exidx is sorted, so has to go in its own output section. */ + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + + /* This is used by the startup in order to initialize the .data secion */ + _sidata = .; + } > ROM + __exidx_end = .; + + /* .data section which is used for initialized data */ + + .data : AT (_sidata) + { + . = ALIGN(4); + /* This is used by the startup in order to initialize the .data secion */ + _sdata = . ; + + *(.data) + *(.data.*) + *(.gnu.linkonce.d*) + + PROVIDE(__dtors_start__ = .); + KEEP(*(SORT(.dtors.*))) + KEEP(*(.dtors)) + PROVIDE(__dtors_end__ = .); + + . = ALIGN(4); + /* This is used by the startup in order to initialize the .data secion */ + _edata = . ; + } > RAM + + .stack : + { + . = ALIGN(4); + _sstack = .; + . = . + _system_stack_size; + . = ALIGN(4); + _estack = .; + } > RAM + + __bss_start = .; + .bss : + { + . = ALIGN(4); + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; + + *(.bss) + *(.bss.*) + *(COMMON) + + . = ALIGN(4); + /* This is used by the startup in order to initialize the .bss secion */ + _ebss = . ; + + *(.bss.init) + } > RAM + __bss_end = .; + + _end = .; + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + * Symbols in the DWARF debugging sections are relative to the beginning + * of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } +} diff --git a/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.sct b/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.sct new file mode 100644 index 00000000000..73c3a046b2a --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/board/linker_scripts/link.sct @@ -0,0 +1,15 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x08000000 0x00020000 { ; load region size_region + ER_IROM1 0x08000000 0x00020000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + .ANY (+XO) + } + RW_IRAM1 0x20000000 0x00008000 { ; RW data + .ANY (+RW +ZI) + } +} diff --git a/bsp/stm32/stm32h503-st-nucleo/figures/board.png b/bsp/stm32/stm32h503-st-nucleo/figures/board.png new file mode 100644 index 00000000000..4a9104c3b2a Binary files /dev/null and b/bsp/stm32/stm32h503-st-nucleo/figures/board.png differ diff --git a/bsp/stm32/stm32h503-st-nucleo/project.ewp b/bsp/stm32/stm32h503-st-nucleo/project.ewp new file mode 100644 index 00000000000..658bb4504b1 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/project.ewp @@ -0,0 +1,2475 @@ + + 3 + + rt-thread + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + Applications + + $PROJ_DIR$\applications\main.c + + + + Compiler + + $PROJ_DIR$\..\..\..\components\libc\compilers\common\cctype.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstdlib.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstring.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\common\ctime.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\common\cunistd.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\common\cwchar.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\environ.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_close.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_lseek.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_mem.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_open.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_read.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_remove.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_write.c + + + $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscalls.c + + + + CPU + + $PROJ_DIR$\..\..\..\libcpu\arm\common\atomic_arm.c + + + $PROJ_DIR$\..\..\..\libcpu\arm\common\div0.c + + + $PROJ_DIR$\..\..\..\libcpu\arm\common\showmem.c + + + $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m33\context_iar.S + + + $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m33\cpuport.c + + + $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m33\syscall_iar.S + + + $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m33\trustzone.c + + + + DeviceDrivers + + $PROJ_DIR$\..\..\..\components\drivers\core\device.c + + + $PROJ_DIR$\..\..\..\components\drivers\i2c\i2c-bit-ops.c + + + $PROJ_DIR$\..\..\..\components\drivers\i2c\i2c_core.c + + + $PROJ_DIR$\..\..\..\components\drivers\i2c\i2c_dev.c + + + $PROJ_DIR$\..\..\..\components\drivers\ipc\completion.c + + + $PROJ_DIR$\..\..\..\components\drivers\ipc\dataqueue.c + + + $PROJ_DIR$\..\..\..\components\drivers\ipc\pipe.c + + + $PROJ_DIR$\..\..\..\components\drivers\ipc\ringblk_buf.c + + + $PROJ_DIR$\..\..\..\components\drivers\ipc\ringbuffer.c + + + $PROJ_DIR$\..\..\..\components\drivers\ipc\waitqueue.c + + + $PROJ_DIR$\..\..\..\components\drivers\ipc\workqueue.c + + + $PROJ_DIR$\..\..\..\components\drivers\misc\adc.c + + + $PROJ_DIR$\..\..\..\components\drivers\misc\pin.c + + + $PROJ_DIR$\..\..\..\components\drivers\misc\rt_drv_pwm.c + + + $PROJ_DIR$\..\..\..\components\drivers\serial\serial.c + + + $PROJ_DIR$\..\..\..\components\drivers\spi\spi_core.c + + + $PROJ_DIR$\..\..\..\components\drivers\spi\spi_dev.c + + + + Drivers + + $PROJ_DIR$\..\libraries\HAL_Drivers\drv_adc.c + + + $PROJ_DIR$\..\libraries\HAL_Drivers\drv_common.c + + + $PROJ_DIR$\..\libraries\HAL_Drivers\drv_gpio.c + + + $PROJ_DIR$\..\libraries\HAL_Drivers\drv_spi.c + + + $PROJ_DIR$\..\libraries\HAL_Drivers\drv_usart.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\CMSIS\Device\ST\STM32H5xx\Source\Templates\iar\startup_stm32h563xx.s + + + $PROJ_DIR$\board\CubeMX_Config\Src\stm32h5xx_hal_msp.c + + + $PROJ_DIR$\board\board.c + + + + Finsh + + $PROJ_DIR$\..\..\..\components\finsh\shell.c + + + $PROJ_DIR$\..\..\..\components\finsh\msh.c + + + $PROJ_DIR$\..\..\..\components\finsh\msh_parse.c + + + $PROJ_DIR$\..\..\..\components\finsh\cmd.c + + + + Kernel + + $PROJ_DIR$\..\..\..\src\clock.c + + + $PROJ_DIR$\..\..\..\src\components.c + + + $PROJ_DIR$\..\..\..\src\idle.c + + + $PROJ_DIR$\..\..\..\src\ipc.c + + + $PROJ_DIR$\..\..\..\src\irq.c + + + $PROJ_DIR$\..\..\..\src\kservice.c + + + $PROJ_DIR$\..\..\..\src\mem.c + + + $PROJ_DIR$\..\..\..\src\mempool.c + + + $PROJ_DIR$\..\..\..\src\object.c + + + $PROJ_DIR$\..\..\..\src\scheduler_up.c + + + $PROJ_DIR$\..\..\..\src\thread.c + + + $PROJ_DIR$\..\..\..\src\timer.c + + + + Libraries + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_tim_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_cortex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rcc.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_dma.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_uart.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pwr_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_adc.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_usart.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_lptim.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_crc.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_dma_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_gpio.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rcc_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_i2c.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_icache.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_adc_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\CMSIS\Device\ST\STM32H5xx\Source\Templates\system_stm32h5xx.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_uart_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_i2c_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_tim.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_comp.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_cryp_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pwr.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_cryp.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_usart_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_exti.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_spi.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_spi_ex.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rng.c + + + $PROJ_DIR$\..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_crc_ex.c + + + + POSIX + + diff --git a/bsp/synwit/swm320/project.eww b/bsp/stm32/stm32h503-st-nucleo/project.eww similarity index 100% rename from bsp/synwit/swm320/project.eww rename to bsp/stm32/stm32h503-st-nucleo/project.eww diff --git a/bsp/synwit/swm320/project.uvoptx b/bsp/stm32/stm32h503-st-nucleo/project.uvoptx similarity index 78% rename from bsp/synwit/swm320/project.uvoptx rename to bsp/stm32/stm32h503-st-nucleo/project.uvoptx index 920c51f4437..44f0ad4de59 100644 --- a/bsp/synwit/swm320/project.uvoptx +++ b/bsp/stm32/stm32h503-st-nucleo/project.uvoptx @@ -10,7 +10,7 @@ *.s*; *.src; *.a* *.obj; *.o *.lib - *.txt; *.h; *.inc + *.txt; *.h; *.inc; *.md *.plm *.cpp 0 @@ -45,7 +45,7 @@ 79 66 8 - .\build\keil\List\ + 1 @@ -77,7 +77,7 @@ 0 1 - 255 + 18 0 1 @@ -93,7 +93,7 @@ 1 1 1 - 0 + 1 1 1 1 @@ -103,7 +103,7 @@ 1 0 0 - 4 + 6 @@ -114,18 +114,18 @@ - Segger\JL2CM3.dll + STLink\ST-LINKIII-KEIL_SWO.dll 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0SWM320xE -FL080000 -FS00 -FP0($$Device:SWM320xE$Flash\SWM320xE.FLM) + UL2V8M + UL2V8M(-S0 -C0 -P0 -FD20000000 -FC8000 -FN2 -FF0STM32H5xx_2M_0800 -FS08000000 -FL0200000 -FF1STM32H5xx_2M_0C00 -FS1C000000 -FL1200000 -FP0($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0800.FLM) -FP1($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0C00.FLM)) 0 - JL2CM3 - -U30000299 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8001 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC4000 -FN1 -FF0SWM320xE -FS00 -FL080000 -FP0($$Device:SWM320xE$Flash\SWM320xE.FLM) + ST-LINKIII-KEIL_SWO + -U001300334D46501220383832 -O2254 -SF10000 -C0 -A1 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(6BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8000 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32H5xx_2M_0800 -FS08000000 -FL0200000 -FP0($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0800.FLM) @@ -134,13 +134,13 @@ 0 - 0 - 0 + 1 + 1 0 0 0 0 - 0 + 1 0 0 0 @@ -153,7 +153,7 @@ 0 0 0 - 0 + 1 0 0 0 @@ -171,6 +171,13 @@ + + 1 + 0 + 0 + 2 + 10000000 + diff --git a/bsp/synwit/swm320/project.uvproj b/bsp/stm32/stm32h503-st-nucleo/project.uvprojx similarity index 61% rename from bsp/synwit/swm320/project.uvproj rename to bsp/stm32/stm32h503-st-nucleo/project.uvprojx index 9334dead304..d1bd34408e3 100644 --- a/bsp/synwit/swm320/project.uvproj +++ b/bsp/stm32/stm32h503-st-nucleo/project.uvprojx @@ -1,39 +1,43 @@ - - 1.1 + + 2.1
### uVision Project, (C) Keil Software
rtthread 0x4 ARM-ADS + 6140000::V6.14::ARMCLANG + 1 - STM32F407ZG + STM32H563ZITx STMicroelectronics - IRAM(0x20000000-0x2001FFFF) IRAM2(0x10000000-0x1000FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M4") FPU2 + Keil.STM32H5xx_DFP.1.1.0 + https://www.keil.com/pack/ + IRAM(0x20000000,0x00050000) IRAM2(0x20050000,0x00050000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M33") FPU3(SFPU) DSP TZ CLOCK(12000000) ELITTLE - "Startup\ST\STM32F4xx\startup_stm32f40_41xxx.s" ("STM32F40/41xxx Startup Code") - UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000) - 6105 - stm32f4xx.h + + UL2V8M(-S0 -C0 -P0 -FD20000000 -FC8000 -FN2 -FF0STM32H5xx_2M_0800 -FS08000000 -FL0200000 -FF1STM32H5xx_2M_0C00 -FS1C000000 -FL1200000 -FP0($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0800.FLM) -FP1($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0C00.FLM)) + 0 + $$Device:STM32H563ZITx$Drivers\CMSIS\Device\ST\STM32H5xx\Include\stm32h5xx.h - -DSTM32F40_41xxx + - SFD\ST\STM32F4xx\STM32F40x.sfr + $$Device:STM32H563ZITx$CMSIS\SVD\STM32H563.svd 0 0 - ST\STM32F4xx\ - ST\STM32F4xx\ + + 0 0 @@ -42,13 +46,13 @@ 1 .\build\keil\Obj\ - rt-thread + rtthread 1 0 0 1 0 - .\build\keil\List\ + 1 0 0 @@ -69,6 +73,8 @@ 0 0 + 0 + 0 1 @@ -77,8 +83,10 @@ 0 0 + 0 + 0 - 0 + 1 @@ -95,17 +103,17 @@ 3 - 1 + 0 - SARMCM3.DLL - -MPU -REMAP - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU + + + + + SARMV8M.DLL + -MPU TCM.DLL - -pCM4 + -pCM33 @@ -115,48 +123,6 @@ 0 16 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - 1 - 0 - - 0 - 6 - - - - - - - - - - - - - - Segger\JL2CM3.dll - @@ -165,11 +131,11 @@ 0 1 1 - 4096 + 4102 1 - BIN\UL2CM3.DLL - "" () + BIN\UL2V8M.DLL + @@ -205,7 +171,7 @@ 1 0 0 - "Cortex-M4" + "Cortex-M33" 0 0 @@ -215,14 +181,17 @@ 0 0 2 + 0 + 0 1 0 8 0 0 0 + 0 3 - 3 + 4 0 0 0 @@ -238,8 +207,8 @@ 0 0 0 - 0 - 1 + 1 + 0 0 @@ -274,12 +243,12 @@ 0 0x20000000 - 0x20000 + 0x50000 1 0x8000000 - 0x100000 + 0x200000 0 @@ -304,7 +273,7 @@ 1 0x8000000 - 0x100000 + 0x200000 1 @@ -329,19 +298,19 @@ 0 0x20000000 - 0x20000 + 0x50000 0 - 0x10000000 - 0x10000 + 0x20050000 + 0x50000 1 - 1 + 7 0 0 1 @@ -350,16 +319,24 @@ 0 0 0 - 0 + 3 0 0 - 1 + 0 + 0 0 + 3 + 3 + 1 + 1 + 0 + 0 + 0 - RT_USING_LIBC, RT_USING_ARMLIBC, __STDC_LIMIT_MACROS, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND + __STDC_LIMIT_MACROS, RT_USING_ARMLIBC, USE_HAL_DRIVER, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, STM32H503xx, __RTTHREAD__ - ..\..\..\libcpu\arm\cortex-m4;drivers;..\..\..\include;..\..\..\components\libc\compilers\common\include;..\..\..\components\drivers\include;.;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\libc\posix\ipc;..\..\..\libcpu\arm\common;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\components\finsh;..\..\..\components\libc\posix\io\eventfd;libraries\CMSIS\DeviceSupport;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\epoll;applications;libraries\SWM320_StdPeriph_Driver;..\..\..\components\libc\posix\io\poll;libraries\CMSIS\CoreSupport;..\..\..\components\libc\compilers\common\extension + ..\..\..\libcpu\arm\common;..\..\..\components\drivers\spi;board\CubeMX_Config\Inc;..\libraries\STM32H5xx_HAL\CMSIS\Device\ST\STM32H5xx\Include;..\..\..\components\drivers\include;..\..\..\libcpu\arm\cortex-m33;..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Inc;applications;.;..\..\..\include;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\libraries\HAL_Drivers;..\..\..\components\libc\posix\ipc;..\libraries\HAL_Drivers\drivers\config;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\libc\posix\io\epoll;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension;board;..\libraries\HAL_Drivers\drivers;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\compilers\common\include;..\..\..\components\drivers\include;..\libraries\HAL_Drivers\CMSIS\Include;..\..\..\components\finsh;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include @@ -372,6 +349,7 @@ 0 0 0 + 4 @@ -389,7 +367,7 @@ 0x08000000 0x20000000 - .\drivers\linker_scripts\link.sct + .\board\linker_scripts\link.sct @@ -495,14 +473,28 @@ context_rvds.S 2 - ..\..\..\libcpu\arm\cortex-m4\context_rvds.S + ..\..\..\libcpu\arm\cortex-m33\context_rvds.S cpuport.c 1 - ..\..\..\libcpu\arm\cortex-m4\cpuport.c + ..\..\..\libcpu\arm\cortex-m33\cpuport.c + + + + + syscall_rvds.S + 2 + ..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S + + + + + trustzone.c + 1 + ..\..\..\libcpu\arm\cortex-m33\trustzone.c @@ -515,6 +507,27 @@ ..\..\..\components\drivers\core\device.c + + + i2c-bit-ops.c + 1 + ..\..\..\components\drivers\i2c\i2c-bit-ops.c + + + + + i2c_core.c + 1 + ..\..\..\components\drivers\i2c\i2c_core.c + + + + + i2c_dev.c + 1 + ..\..\..\components\drivers\i2c\i2c_dev.c + + completion.c @@ -564,6 +577,13 @@ ..\..\..\components\drivers\ipc\workqueue.c + + + adc.c + 1 + ..\..\..\components\drivers\misc\adc.c + + pin.c @@ -571,6 +591,13 @@ ..\..\..\components\drivers\misc\pin.c + + + rt_drv_pwm.c + 1 + ..\..\..\components\drivers\misc\rt_drv_pwm.c + + serial.c @@ -578,28 +605,77 @@ ..\..\..\components\drivers\serial\serial.c + + + spi_core.c + 1 + ..\..\..\components\drivers\spi\spi_core.c + + + + + spi_dev.c + 1 + ..\..\..\components\drivers\spi\spi_dev.c + + Drivers + + + drv_adc.c + 1 + ..\libraries\HAL_Drivers\drivers\drv_adc.c + + drv_gpio.c 1 - drivers\drv_gpio.c + ..\libraries\HAL_Drivers\drivers\drv_gpio.c + + + + + drv_spi.c + 1 + ..\libraries\HAL_Drivers\drivers\drv_spi.c - drv_uart.c + drv_usart.c 1 - drivers\drv_uart.c + ..\libraries\HAL_Drivers\drivers\drv_usart.c + + + + + drv_common.c + 1 + ..\libraries\HAL_Drivers\drv_common.c + + + + + startup_stm32h503xx.s + 2 + ..\libraries\STM32H5xx_HAL\CMSIS\Device\ST\STM32H5xx\Source\Templates\arm\startup_stm32h503xx.s + + + + + stm32h5xx_hal_msp.c + 1 + board\CubeMX_Config\Src\stm32h5xx_hal_msp.c board.c 1 - drivers\board.c + board\board.c @@ -680,9 +756,9 @@ - memheap.c + mem.c 1 - ..\..\..\src\memheap.c + ..\..\..\src\mem.c @@ -725,160 +801,237 @@ Libraries - SWM320_adc.c + stm32h5xx_hal_tim_ex.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_adc.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_tim_ex.c - SWM320_rtc.c + stm32h5xx_hal_cortex.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_rtc.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_cortex.c - SWM320_spi.c + stm32h5xx_hal_rcc.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_spi.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rcc.c - SWM320_sram.c + stm32h5xx_hal_dma.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_sram.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_dma.c - SWM320_crc.c + stm32h5xx_hal_uart.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_crc.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_uart.c - SWM320_timr.c + stm32h5xx_hal_pwr_ex.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_timr.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pwr_ex.c - SWM320_sdram.c + stm32h5xx_hal_adc.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_sdram.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_adc.c - SWM320_dma.c + stm32h5xx_hal_usart.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_dma.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_usart.c - SWM320_can.c + stm32h5xx_hal_lptim.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_can.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_lptim.c - SWM320_norflash.c + stm32h5xx_hal_crc.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_norflash.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_crc.c - startup_SWM320.s - 2 - libraries\CMSIS\DeviceSupport\startup\arm\startup_SWM320.s + stm32h5xx_hal_dma_ex.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_dma_ex.c + + + + + stm32h5xx_hal_gpio.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_gpio.c + + + + + stm32h5xx_hal_rcc_ex.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rcc_ex.c + + + + + stm32h5xx_hal.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal.c + + + + + stm32h5xx_hal_i2c.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_i2c.c + + + + + stm32h5xx_hal_icache.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_icache.c + + + + + stm32h5xx_hal_adc_ex.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_adc_ex.c + + + + + system_stm32h5xx.c + 1 + ..\libraries\STM32H5xx_HAL\CMSIS\Device\ST\STM32H5xx\Source\Templates\system_stm32h5xx.c + + + + + stm32h5xx_hal_uart_ex.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_uart_ex.c + + + + + stm32h5xx_hal_i2c_ex.c + 1 + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_i2c_ex.c - SWM320_sdio.c + stm32h5xx_hal_tim.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_sdio.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_tim.c - system_SWM320.c + stm32h5xx_hal_comp.c 1 - libraries\CMSIS\DeviceSupport\system_SWM320.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_comp.c - SWM320_i2c.c + stm32h5xx_hal_cryp_ex.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_i2c.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_cryp_ex.c - SWM320_uart.c + stm32h5xx_hal_pwr.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_uart.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_pwr.c - SWM320_port.c + stm32h5xx_hal_cryp.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_port.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_cryp.c - SWM320_pwm.c + stm32h5xx_hal_usart_ex.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_pwm.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_usart_ex.c - SWM320_exti.c + stm32h5xx_hal_exti.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_exti.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_exti.c - SWM320_lcd.c + stm32h5xx_hal_spi.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_lcd.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_spi.c - SWM320_gpio.c + stm32h5xx_hal_spi_ex.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_gpio.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_spi_ex.c - SWM320_flash.c + stm32h5xx_hal_rng.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_flash.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_rng.c - SWM320_wdt.c + stm32h5xx_hal_crc_ex.c 1 - libraries\SWM320_StdPeriph_Driver\SWM320_wdt.c + ..\libraries\STM32H5xx_HAL\STM32H5xx_HAL_Driver\Src\stm32h5xx_hal_crc_ex.c + + + + + + + + + <Project Info> + 0 + 1 + + +
diff --git a/bsp/stm32/stm32h503-st-nucleo/rtconfig.h b/bsp/stm32/stm32h503-st-nucleo/rtconfig.h new file mode 100644 index 00000000000..6835baa75f9 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/rtconfig.h @@ -0,0 +1,265 @@ +#ifndef RT_CONFIG_H__ +#define RT_CONFIG_H__ + +/* Automatically generated file; DO NOT EDIT. */ +/* RT-Thread Configuration */ + +/* RT-Thread Kernel */ + +#define RT_NAME_MAX 8 +#define RT_CPUS_NR 1 +#define RT_ALIGN_SIZE 8 +#define RT_THREAD_PRIORITY_32 +#define RT_THREAD_PRIORITY_MAX 32 +#define RT_TICK_PER_SECOND 1000 +#define RT_USING_OVERFLOW_CHECK +#define RT_USING_HOOK +#define RT_HOOK_USING_FUNC_PTR +#define RT_USING_IDLE_HOOK +#define RT_IDLE_HOOK_LIST_SIZE 4 +#define IDLE_THREAD_STACK_SIZE 256 +#define RT_USING_TIMER_SOFT +#define RT_TIMER_THREAD_PRIO 4 +#define RT_TIMER_THREAD_STACK_SIZE 512 + +/* kservice optimization */ + +#define RT_USING_DEBUG +#define RT_DEBUGING_COLOR +#define RT_DEBUGING_CONTEXT + +/* Inter-Thread communication */ + +#define RT_USING_SEMAPHORE +#define RT_USING_MUTEX +#define RT_USING_EVENT +#define RT_USING_MAILBOX +#define RT_USING_MESSAGEQUEUE + +/* Memory Management */ + +#define RT_USING_MEMPOOL +#define RT_USING_SMALL_MEM +#define RT_USING_SMALL_MEM_AS_HEAP +#define RT_USING_HEAP +#define RT_USING_DEVICE +#define RT_USING_CONSOLE +#define RT_CONSOLEBUF_SIZE 256 +#define RT_CONSOLE_DEVICE_NAME "uart3" +#define RT_VER_NUM 0x50100 +#define RT_BACKTRACE_LEVEL_MAX_NR 32 +#define RT_USING_HW_ATOMIC +#define RT_USING_CPU_FFS +#define ARCH_ARM +#define ARCH_ARM_CORTEX_M +#define ARCH_ARM_CORTEX_M33 + +/* RT-Thread Components */ + +#define RT_USING_COMPONENTS_INIT +#define RT_USING_USER_MAIN +#define RT_MAIN_THREAD_STACK_SIZE 2048 +#define RT_MAIN_THREAD_PRIORITY 10 +#define RT_USING_MSH +#define RT_USING_FINSH +#define FINSH_USING_MSH +#define FINSH_THREAD_NAME "tshell" +#define FINSH_THREAD_PRIORITY 20 +#define FINSH_THREAD_STACK_SIZE 4096 +#define FINSH_USING_HISTORY +#define FINSH_HISTORY_LINES 5 +#define FINSH_USING_SYMTAB +#define FINSH_CMD_SIZE 80 +#define MSH_USING_BUILT_IN_COMMANDS +#define FINSH_USING_DESCRIPTION +#define FINSH_ARG_MAX 10 +#define FINSH_USING_OPTION_COMPLETION + +/* DFS: device virtual file system */ + + +/* Device Drivers */ + +#define RT_USING_DEVICE_IPC +#define RT_UNAMED_PIPE_NUMBER 64 +#define RT_USING_SYSTEM_WORKQUEUE +#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 +#define RT_SYSTEM_WORKQUEUE_PRIORITY 23 +#define RT_USING_SERIAL +#define RT_USING_SERIAL_V1 +#define RT_SERIAL_RB_BUFSZ 64 +#define RT_USING_I2C +#define RT_USING_I2C_BITOPS +#define RT_USING_PIN +#define RT_USING_ADC +#define RT_USING_PWM +#define RT_USING_SPI + +/* Using USB */ + + +/* C/C++ and POSIX layer */ + +/* ISO-ANSI C layer */ + +/* Timezone and Daylight Saving Time */ + +#define RT_LIBC_USING_LIGHT_TZ_DST +#define RT_LIBC_TZ_DEFAULT_HOUR 8 +#define RT_LIBC_TZ_DEFAULT_MIN 0 +#define RT_LIBC_TZ_DEFAULT_SEC 0 + +/* POSIX (Portable Operating System Interface) layer */ + + +/* Interprocess Communication (IPC) */ + + +/* Socket is in the 'Network' category */ + + +/* Network */ + + +/* Memory protection */ + + +/* Utilities */ + + +/* RT-Thread Utestcases */ + + +/* RT-Thread online packages */ + +/* IoT - internet of things */ + + +/* Wi-Fi */ + +/* Marvell WiFi */ + + +/* Wiced WiFi */ + + +/* CYW43012 WiFi */ + + +/* IoT Cloud */ + + +/* security packages */ + + +/* language packages */ + +/* JSON: JavaScript Object Notation, a lightweight data-interchange format */ + + +/* XML: Extensible Markup Language */ + + +/* multimedia packages */ + +/* LVGL: powerful and easy-to-use embedded GUI library */ + + +/* u8g2: a monochrome graphic library */ + + +/* tools packages */ + + +/* system packages */ + +/* enhanced kernel services */ + + +/* acceleration: Assembly language or algorithmic acceleration packages */ + + +/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ + + +/* Micrium: Micrium software products porting for RT-Thread */ + + +/* peripheral libraries and drivers */ + +/* sensors drivers */ + + +/* touch drivers */ + + +/* Kendryte SDK */ + + +/* AI packages */ + + +/* Signal Processing and Control Algorithm Packages */ + + +/* miscellaneous packages */ + +/* project laboratory */ + +/* samples: kernel and components samples */ + + +/* entertainment: terminal games and other interesting software packages */ + + +/* Arduino libraries */ + + +/* Projects and Demos */ + + +/* Sensors */ + + +/* Display */ + + +/* Timing */ + + +/* Data Processing */ + + +/* Data Storage */ + +/* Communication */ + + +/* Device Control */ + + +/* Other */ + + +/* Signal IO */ + + +/* Uncategorized */ + +#define SOC_FAMILY_STM32 +#define SOC_SERIES_STM32H5 + +/* Hardware Drivers Config */ + +#define SOC_STM32H503RB + +/* On-chip Peripheral Drivers */ + +#define BSP_USING_GPIO +#define BSP_USING_UART +#define BSP_USING_UART3 + +/* Board extended module Drivers */ + + +#endif diff --git a/bsp/stm32/stm32h503-st-nucleo/rtconfig.py b/bsp/stm32/stm32h503-st-nucleo/rtconfig.py new file mode 100644 index 00000000000..3f5483a3a90 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/rtconfig.py @@ -0,0 +1,152 @@ +import os + +# toolchains options +ARCH='arm' +CPU='cortex-m33' +CROSS_TOOL='gcc' + +# bsp lib config +BSP_LIBRARY_TYPE = None + +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') + +# cross_tool provides the cross compiler +# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR +if CROSS_TOOL == 'gcc': + PLATFORM = 'gcc' + EXEC_PATH = r'C:\Users\XXYYZZ' +elif CROSS_TOOL == 'keil': + PLATFORM = 'armclang' + EXEC_PATH = r'C:/Keil_v5' +elif CROSS_TOOL == 'iar': + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + +BUILD = 'debug' + +if PLATFORM == 'gcc': + # toolchains + PREFIX = 'arm-none-eabi-' + CC = PREFIX + 'gcc' + AS = PREFIX + 'gcc' + AR = PREFIX + 'ar' + CXX = PREFIX + 'g++' + LINK = PREFIX + 'gcc' + TARGET_EXT = 'elf' + SIZE = PREFIX + 'size' + OBJDUMP = PREFIX + 'objdump' + OBJCPY = PREFIX + 'objcopy' + + DEVICE = ' -mcpu=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections' + CFLAGS = DEVICE + ' -Dgcc' + AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' + LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds' + + CPATH = '' + LPATH = '' + + if BUILD == 'debug': + CFLAGS += ' -O0 -gdwarf-2 -g' + AFLAGS += ' -gdwarf-2' + else: + CFLAGS += ' -O2' + + CXXFLAGS = CFLAGS + + POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' + +elif PLATFORM == 'armclang': + # toolchains + CC = 'armclang' + CXX = 'armclang' + AS = 'armasm' + AR = 'armar' + LINK = 'armlink' + TARGET_EXT = 'axf' + + DEVICE = ' --cpu Cortex-M33.no_dsp ' + CFLAGS = ' --target=arm-arm-none-eabi -mcpu=cortex-m33+nodsp ' + CFLAGS += ' -mfpu=fpv5-sp-d16 ' + CFLAGS += ' -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar ' + CFLAGS += ' -gdwarf-3 -ffunction-sections ' + AFLAGS = DEVICE + ' --apcs=interwork -mfpu=FPv5-SP' + LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers ' + LFLAGS += ' --list rt-thread.map ' + LFLAGS += r' --strict --scatter "board\linker_scripts\link.sct" ' + CFLAGS += ' -I' + EXEC_PATH + '/ARM/ARMCLANG/include' + LFLAGS += ' --libpath=' + EXEC_PATH + '/ARM/ARMCLANG/lib' + + EXEC_PATH += '/ARM/ARMCLANG/bin/' + + if BUILD == 'debug': + CFLAGS += ' -g -O1' # armclang recommend + AFLAGS += ' -g' + else: + CFLAGS += ' -O2' + + CXXFLAGS = CFLAGS + CFLAGS += ' -std=c99' + + POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' + +elif PLATFORM == 'iccarm': + # toolchains + CC = 'iccarm' + CXX = 'iccarm' + AS = 'iasmarm' + AR = 'iarchive' + LINK = 'ilinkarm' + TARGET_EXT = 'out' + + DEVICE = '-Dewarm' + + CFLAGS = DEVICE + CFLAGS += ' --diag_suppress Pa050' + CFLAGS += ' --no_cse' + CFLAGS += ' --no_unroll' + CFLAGS += ' --no_inline' + CFLAGS += ' --no_code_motion' + CFLAGS += ' --no_tbaa' + CFLAGS += ' --no_clustering' + CFLAGS += ' --no_scheduling' + CFLAGS += ' --endian=little' + CFLAGS += ' --cpu=Cortex-M33' + CFLAGS += ' -e' + CFLAGS += ' --fpu=VFPv4_sp' + CFLAGS += ' --dlib_config "' + EXEC_PATH + '/arm/INC/c/DLib_Config_Normal.h"' + CFLAGS += ' --silent' + + AFLAGS = DEVICE + AFLAGS += ' -s+' + AFLAGS += ' -w+' + AFLAGS += ' -r' + AFLAGS += ' --cpu Cortex-M33' + AFLAGS += ' --fpu VFPv5_sp' + AFLAGS += ' -S' + + if BUILD == 'debug': + CFLAGS += ' --debug' + CFLAGS += ' -On' + else: + CFLAGS += ' -Oh' + + LFLAGS = ' --config "board/linker_scripts/link.icf"' + LFLAGS += ' --entry __iar_program_start' + + CXXFLAGS = CFLAGS + + EXEC_PATH = EXEC_PATH + '/arm/bin/' + POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT, dist_dir): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT, dist_dir) diff --git a/bsp/stm32/stm32h503-st-nucleo/template.ewp b/bsp/stm32/stm32h503-st-nucleo/template.ewp new file mode 100644 index 00000000000..d8f8a59a6eb --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/template.ewp @@ -0,0 +1,2106 @@ + + + 3 + + rt-thread + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + diff --git a/bsp/stm32/stm32h503-st-nucleo/template.eww b/bsp/stm32/stm32h503-st-nucleo/template.eww new file mode 100644 index 00000000000..bd036bb4c98 --- /dev/null +++ b/bsp/stm32/stm32h503-st-nucleo/template.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\template.ewp + + + + + diff --git a/bsp/synwit/swm341/project.uvoptx b/bsp/stm32/stm32h503-st-nucleo/template.uvoptx similarity index 75% rename from bsp/synwit/swm341/project.uvoptx rename to bsp/stm32/stm32h503-st-nucleo/template.uvoptx index 0ea6e73f7b7..44f0ad4de59 100644 --- a/bsp/synwit/swm341/project.uvoptx +++ b/bsp/stm32/stm32h503-st-nucleo/template.uvoptx @@ -22,7 +22,7 @@ - rt-thread + rtthread 0x4 ARM-ADS @@ -45,7 +45,7 @@ 79 66 8 - .\build\keil\List\ + 1 @@ -77,7 +77,7 @@ 0 1 - 255 + 18 0 1 @@ -93,7 +93,7 @@ 1 1 1 - 0 + 1 1 1 1 @@ -103,7 +103,7 @@ 1 0 0 - 4 + 6 @@ -114,18 +114,18 @@ - Segger\JL2CM3.dll + STLink\ST-LINKIII-KEIL_SWO.dll 0 UL2V8M - UL2V8M(-S0 -C0 -P0 -FN1 -FC1000 -FD20000000 -FF0SWM341xE -FL080000 -FS00 -FP0($$Device:SWM341xE$Flash\SWM341xE.FLM) + UL2V8M(-S0 -C0 -P0 -FD20000000 -FC8000 -FN2 -FF0STM32H5xx_2M_0800 -FS08000000 -FL0200000 -FF1STM32H5xx_2M_0C00 -FS1C000000 -FL1200000 -FP0($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0800.FLM) -FP1($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0C00.FLM)) 0 - JL2CM3 - -U801010789 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(1BE12AEB) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC4000 -FN1 -FF0SWM341xE -FS00 -FL080000 + ST-LINKIII-KEIL_SWO + -U001300334D46501220383832 -O2254 -SF10000 -C0 -A1 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(6BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8000 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32H5xx_2M_0800 -FS08000000 -FL0200000 -FP0($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0800.FLM) @@ -134,13 +134,13 @@ 0 - 0 - 0 + 1 + 1 0 0 0 0 - 0 + 1 0 0 0 @@ -153,7 +153,7 @@ 0 0 0 - 0 + 1 0 0 0 @@ -171,7 +171,22 @@ + + 1 + 0 + 0 + 2 + 10000000 + + + Source Group 1 + 0 + 0 + 0 + 0 + + diff --git a/bsp/synwit/swm320/template.uvproj b/bsp/stm32/stm32h503-st-nucleo/template.uvprojx similarity index 73% rename from bsp/synwit/swm320/template.uvproj rename to bsp/stm32/stm32h503-st-nucleo/template.uvprojx index 3312f50fca3..f6efb05cefe 100644 --- a/bsp/synwit/swm320/template.uvproj +++ b/bsp/stm32/stm32h503-st-nucleo/template.uvprojx @@ -1,7 +1,7 @@ - + - 1.1 + 2.1
### uVision Project, (C) Keil Software
@@ -10,33 +10,37 @@ rtthread 0x4 ARM-ADS + 6140000::V6.14::ARMCLANG + 1 - STM32F407ZG + STM32H563ZITx STMicroelectronics - IRAM(0x20000000-0x2001FFFF) IRAM2(0x10000000-0x1000FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M4") FPU2 + Keil.STM32H5xx_DFP.1.1.0 + https://www.keil.com/pack/ + IRAM(0x20000000,0x00050000) IRAM2(0x20050000,0x00050000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M33") FPU3(SFPU) DSP TZ CLOCK(12000000) ELITTLE - "Startup\ST\STM32F4xx\startup_stm32f40_41xxx.s" ("STM32F40/41xxx Startup Code") - UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000) - 6105 - stm32f4xx.h + + UL2V8M(-S0 -C0 -P0 -FD20000000 -FC8000 -FN2 -FF0STM32H5xx_2M_0800 -FS08000000 -FL0200000 -FF1STM32H5xx_2M_0C00 -FS1C000000 -FL1200000 -FP0($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0800.FLM) -FP1($$Device:STM32H563ZITx$CMSIS\Flash\STM32H5xx_2M_0C00.FLM)) + 0 + $$Device:STM32H563ZITx$Drivers\CMSIS\Device\ST\STM32H5xx\Include\stm32h5xx.h - -DSTM32F40_41xxx + - SFD\ST\STM32F4xx\STM32F40x.sfr + $$Device:STM32H563ZITx$CMSIS\SVD\STM32H563.svd 0 0 - ST\STM32F4xx\ - ST\STM32F4xx\ + + 0 0 @@ -45,13 +49,13 @@ 1 .\build\keil\Obj\ - rt-thread + rtthread 1 0 0 1 0 - .\build\keil\List\ + 1 0 0 @@ -72,6 +76,8 @@ 0 0 + 0 + 0 1 @@ -80,8 +86,10 @@ 0 0 + 0 + 0 - 0 + 1 @@ -98,17 +106,17 @@ 3 - 1 + 0 - SARMCM3.DLL - -MPU -REMAP - DCM.DLL - -pCM4 - SARMCM3.DLL - -MPU + + + + + SARMV8M.DLL + -MPU TCM.DLL - -pCM4 + -pCM33 @@ -118,48 +126,6 @@ 0 16 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - - - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - 1 - 0 - - 0 - 6 - - - - - - - - - - - - - - Segger\JL2CM3.dll - @@ -168,11 +134,11 @@ 0 1 1 - 4096 + 4102 1 - BIN\UL2CM3.DLL - "" () + BIN\UL2V8M.DLL + @@ -208,7 +174,7 @@ 1 0 0 - "Cortex-M4" + "Cortex-M33" 0 0 @@ -218,14 +184,17 @@ 0 0 2 + 0 + 0 1 0 8 0 0 0 + 0 3 - 3 + 4 0 0 0 @@ -241,8 +210,8 @@ 0 0 0 - 0 - 1 + 1 + 0 0 @@ -277,12 +246,12 @@ 0 0x20000000 - 0x20000 + 0x50000 1 0x8000000 - 0x100000 + 0x200000 0 @@ -307,7 +276,7 @@ 1 0x8000000 - 0x100000 + 0x200000 1 @@ -332,19 +301,19 @@ 0 0x20000000 - 0x20000 + 0x50000 0 - 0x10000000 - 0x10000 + 0x20050000 + 0x50000 1 - 1 + 7 0 0 1 @@ -353,11 +322,19 @@ 0 0 0 - 0 + 3 0 0 - 1 + 0 + 0 0 + 3 + 3 + 1 + 1 + 0 + 0 + 0 @@ -375,6 +352,7 @@ 0 0 0 + 4 @@ -392,7 +370,7 @@ 0x08000000 0x20000000 - .\drivers\linker_scripts\link.sct + .\board\linker_scripts\link.sct @@ -401,7 +379,28 @@ + + + Source Group 1 + + + + + + + + + + + + <Project Info> + 0 + 1 + + + +
diff --git a/bsp/stm32/stm32h563-st-nucleo/Kconfig b/bsp/stm32/stm32h563-st-nucleo/Kconfig index 362bdfbed87..61de77a858c 100644 --- a/bsp/stm32/stm32h563-st-nucleo/Kconfig +++ b/bsp/stm32/stm32h563-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32H563_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32h563-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32h563-st-nucleo/applications/arduino_pinout/pins_arduino.c index cdb3cc9abb1..524d5a9cf95 100644 --- a/bsp/stm32/stm32h563-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32h563-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -11,6 +11,7 @@ #include #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32h743-st-nucleo/Kconfig b/bsp/stm32/stm32h743-st-nucleo/Kconfig index 362bdfbed87..48670e1c901 100644 --- a/bsp/stm32/stm32h743-st-nucleo/Kconfig +++ b/bsp/stm32/stm32h743-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32H743_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l010-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l010-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l010-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l010-st-nucleo/Kconfig b/bsp/stm32/stm32l010-st-nucleo/Kconfig index 780fa13a44f..feb21571df5 100644 --- a/bsp/stm32/stm32l010-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l010-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L010RB select RT_USING_USER_MAIN default y +config BOARD_STM32L010_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l053-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l053-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l053-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l053-st-nucleo/Kconfig b/bsp/stm32/stm32l053-st-nucleo/Kconfig index 25d55a0f372..b3aa930762b 100644 --- a/bsp/stm32/stm32l053-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l053-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L053R8 select RT_USING_USER_MAIN default y +config BOARD_STM32L053_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l412-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l412-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l412-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l412-st-nucleo/Kconfig b/bsp/stm32/stm32l412-st-nucleo/Kconfig index ae527a2518c..1d37f3cc687 100644 --- a/bsp/stm32/stm32l412-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l412-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L412RB select RT_USING_USER_MAIN default y +config BOARD_STM32L412_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l431-BearPi/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l431-BearPi/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l431-BearPi/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l431-BearPi/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32l431-BearPi/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32l431-BearPi/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32l431-BearPi/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32l431-BearPi/applications/arduino_pinout/pins_arduino.c index 27304e7de4c..b3047742698 100644 --- a/bsp/stm32/stm32l431-BearPi/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32l431-BearPi/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32l432-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l432-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l432-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l432-st-nucleo/Kconfig b/bsp/stm32/stm32l432-st-nucleo/Kconfig index 0e406677ad7..536602f3dcb 100644 --- a/bsp/stm32/stm32l432-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l432-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L432KC select RT_USING_USER_MAIN default y +config BOARD_STM32L432_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_32 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l433-ali-startkit/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l433-ali-startkit/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l433-ali-startkit/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l433-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l433-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l433-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l433-st-nucleo/Kconfig b/bsp/stm32/stm32l433-st-nucleo/Kconfig index 6c59518b961..6cde4863f53 100644 --- a/bsp/stm32/stm32l433-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l433-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L433RC select RT_USING_USER_MAIN default y +config BOARD_STM32L433_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l452-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l452-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l452-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l452-st-nucleo/Kconfig b/bsp/stm32/stm32l452-st-nucleo/Kconfig index e1406185e38..c2d77841101 100644 --- a/bsp/stm32/stm32l452-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l452-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L452RE select RT_USING_USER_MAIN default y +config BOARD_STM32L452_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/lcd.attach b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/lcd.attach new file mode 100644 index 00000000000..a03c04ee6a9 --- /dev/null +++ b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/lcd.attach @@ -0,0 +1,3 @@ +CONFIG_BSP_USING_SPI_LCD=y +CONFIG_BSP_USING_LCD_SAMPLE=y +CONFIG_BSP_USING_LCD_QRCODE=y diff --git a/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/lvgl.attach b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/lvgl.attach new file mode 100644 index 00000000000..d90eeb40aee --- /dev/null +++ b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/lvgl.attach @@ -0,0 +1,2 @@ +CONFIG_BSP_USING_LVGL=y +CONFIG_BSP_USING_LVGL_DEMO=y diff --git a/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..b414212c9d4 --- /dev/null +++ b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/rtduino.attach @@ -0,0 +1,5 @@ +CONFIG_BSP_USING_ARDUINO=y +CONFIG_BSP_USING_ARDUINO_ST7789=y +CONFIG_BSP_USING_ARDUINO_ST7789_DEMO=y +CONFIG_BSP_USING_ARDUINO_AHT10=y +CONFIG_BSP_USING_ARDUINO_AHT10_DEMO=y diff --git a/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/sdcard-fatfs.attach b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/sdcard-fatfs.attach new file mode 100644 index 00000000000..f2366f15bd3 --- /dev/null +++ b/bsp/stm32/stm32l475-atk-pandora/.ci/attachconfig/sdcard-fatfs.attach @@ -0,0 +1,2 @@ +CONFIG_BSP_USING_FS=y +CONFIG_BSP_USING_SDCARD_FATFS=y diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.c index 4237ed284fe..d9b648b1c9d 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.c @@ -11,6 +11,7 @@ #include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.h b/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.h index 42e04fe471a..69578f337fd 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.h +++ b/bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.h @@ -12,6 +12,8 @@ #ifndef Pins_Arduino_h #define Pins_Arduino_h +#include + /* pins alias. Must keep in sequence */ #define D0 (0) #define D1 (1) diff --git a/bsp/stm32/stm32l475-atk-pandora/board/SConscript b/bsp/stm32/stm32l475-atk-pandora/board/SConscript index bf886a10dbe..cd47c55bc78 100644 --- a/bsp/stm32/stm32l475-atk-pandora/board/SConscript +++ b/bsp/stm32/stm32l475-atk-pandora/board/SConscript @@ -17,29 +17,29 @@ path += [cwd + '/CubeMX_Config/Inc'] if not GetDepend(['RT_USING_NANO']): if GetDepend(['BSP_USING_KEY']): - src += os.path.join('ports', 'drv_key.c') + src += [os.path.join('ports', 'drv_key.c')] if GetDepend(['BSP_USING_QSPI_FLASH']): - src += os.path.join('ports', 'drv_qspi_flash.c') + src += [os.path.join('ports', 'drv_qspi_flash.c')] if GetDepend(['BSP_USING_FS']): - src += os.path.join('ports', 'drv_filesystem.c') + src += [os.path.join('ports', 'drv_filesystem.c')] if GetDepend(['BSP_USING_SPI_FLASH_LITTLEFS']): - src += os.path.join('ports', 'fal', 'fal_spi_flash_sfud_port.c') + src += [os.path.join('ports', 'fal', 'fal_spi_flash_sfud_port.c')] path += [cwd + os.path.join('ports', 'fal')] if GetDepend(['RT_USING_SENSOR']): src += os.path.join('ports', 'drv_sensors.c') if GetDepend(['BSP_USING_AUDIO']): - src += os.path.join('ports', 'audio', 'drv_es8388.c') - src += os.path.join('ports', 'audio', 'drv_sound.c') + src += [os.path.join('ports', 'audio', 'drv_es8388.c')] + src += [os.path.join('ports', 'audio', 'drv_sound.c')] if GetDepend(['BSP_USING_AUDIO_RECORD']): - src += os.path.join('ports', 'audio', 'drv_mic.c') + src += [os.path.join('ports', 'audio', 'drv_mic.c')] if GetDepend(['BSP_USING_STM32_SDIO']): - src += os.path.join('ports', 'drv_sdio_adapter.c') + src += [os.path.join('ports', 'drv_sdio_adapter.c')] if GetDepend(['BSP_USING_AUDIO']): path += [cwd + os.path.join('ports', 'audio')] diff --git a/bsp/stm32/stm32l475-atk-pandora/board/ports/drv_filesystem.c b/bsp/stm32/stm32l475-atk-pandora/board/ports/drv_filesystem.c index b368b11aa8d..8b7720c189b 100644 --- a/bsp/stm32/stm32l475-atk-pandora/board/ports/drv_filesystem.c +++ b/bsp/stm32/stm32l475-atk-pandora/board/ports/drv_filesystem.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/bsp/stm32/stm32l475-st-discovery/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l475-st-discovery/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l475-st-discovery/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l476-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l476-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l476-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l476-st-nucleo/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32l476-st-nucleo/.ci/attachconfig/rtduino.attach new file mode 100644 index 00000000000..a3e7cd6cb22 --- /dev/null +++ b/bsp/stm32/stm32l476-st-nucleo/.ci/attachconfig/rtduino.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32l476-st-nucleo/Kconfig b/bsp/stm32/stm32l476-st-nucleo/Kconfig index 2dfdfdf8707..6cbe408c892 100644 --- a/bsp/stm32/stm32l476-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l476-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L476RG select RT_USING_USER_MAIN default y +config BOARD_STM32L476_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l476-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32l476-st-nucleo/applications/arduino_pinout/pins_arduino.c index 1f90fc00915..0a9798202d7 100644 --- a/bsp/stm32/stm32l476-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32l476-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -10,6 +10,7 @@ #include #include "pins_arduino.h" +#include #define DBG_TAG "RTduino.pins_arduino" #define DBG_LVL DBG_INFO diff --git a/bsp/stm32/stm32l496-ali-developer/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l496-ali-developer/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l496-ali-developer/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l496-st-discovery/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l496-st-discovery/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l496-st-discovery/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l496-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l496-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l496-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l496-st-nucleo/Kconfig b/bsp/stm32/stm32l496-st-nucleo/Kconfig index 3015d9330f7..91baec45e1b 100644 --- a/bsp/stm32/stm32l496-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l496-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L496ZG select RT_USING_USER_MAIN default y +config BOARD_STM32L496_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l4r5-st-nucleo/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l4r5-st-nucleo/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l4r5-st-nucleo/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l4r5-st-nucleo/Kconfig b/bsp/stm32/stm32l4r5-st-nucleo/Kconfig index 9e19d888fac..344bd3a02f9 100644 --- a/bsp/stm32/stm32l4r5-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l4r5-st-nucleo/Kconfig @@ -22,6 +22,11 @@ config SOC_STM32L4R5ZI select RT_USING_USER_MAIN default y +config BOARD_STM32L4R5_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32l4r9-st-eval/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l4r9-st-eval/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l4r9-st-eval/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l4r9-st-sensortile-box/.ci/attachconfig/nano.attach b/bsp/stm32/stm32l4r9-st-sensortile-box/.ci/attachconfig/nano.attach new file mode 100644 index 00000000000..fb58d11a590 --- /dev/null +++ b/bsp/stm32/stm32l4r9-st-sensortile-box/.ci/attachconfig/nano.attach @@ -0,0 +1 @@ +CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32l552-st-nucleo/Kconfig b/bsp/stm32/stm32l552-st-nucleo/Kconfig index 362bdfbed87..7cd9a9f08ea 100644 --- a/bsp/stm32/stm32l552-st-nucleo/Kconfig +++ b/bsp/stm32/stm32l552-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32L552_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32u575-st-nucleo/Kconfig b/bsp/stm32/stm32u575-st-nucleo/Kconfig index 362bdfbed87..00b4a3161d9 100644 --- a/bsp/stm32/stm32u575-st-nucleo/Kconfig +++ b/bsp/stm32/stm32u575-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32U575_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_144 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32u575-st-nucleo/applications/arduino_pinout/pins_arduino.c b/bsp/stm32/stm32u575-st-nucleo/applications/arduino_pinout/pins_arduino.c index cdb3cc9abb1..df8791a72ed 100644 --- a/bsp/stm32/stm32u575-st-nucleo/applications/arduino_pinout/pins_arduino.c +++ b/bsp/stm32/stm32u575-st-nucleo/applications/arduino_pinout/pins_arduino.c @@ -9,8 +9,8 @@ */ #include -#include #include "pins_arduino.h" +#include /* * {Arduino Pin, RT-Thread Pin [, Device Name, Channel]} diff --git a/bsp/stm32/stm32wb55-st-nucleo/Kconfig b/bsp/stm32/stm32wb55-st-nucleo/Kconfig index 362bdfbed87..84747df01d7 100644 --- a/bsp/stm32/stm32wb55-st-nucleo/Kconfig +++ b/bsp/stm32/stm32wb55-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32WB55_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/stm32/stm32wl55-st-nucleo/Kconfig b/bsp/stm32/stm32wl55-st-nucleo/Kconfig index 362bdfbed87..db0d4e3e255 100644 --- a/bsp/stm32/stm32wl55-st-nucleo/Kconfig +++ b/bsp/stm32/stm32wl55-st-nucleo/Kconfig @@ -15,6 +15,11 @@ config PKGS_DIR option env="PKGS_ROOT" default "packages" +config BOARD_STM32WL55_NUCLEO + bool + select BOARD_SERIES_STM32_NUCLEO_64 + default y + source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" source "../libraries/Kconfig" diff --git a/bsp/synwit/.gitignore b/bsp/synwit/.gitignore new file mode 100644 index 00000000000..19ce2fe93cd --- /dev/null +++ b/bsp/synwit/.gitignore @@ -0,0 +1,4 @@ +*.uvguix.* +JLinkLog.txt +JLinkSettings.ini +EventRecorderStub.scvd diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/arm_common_tables.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/arm_common_tables.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/arm_common_tables.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/arm_common_tables.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/arm_const_structs.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/arm_const_structs.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/arm_const_structs.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/arm_const_structs.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/arm_math.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/arm_math.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/arm_math.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/arm_math.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm0.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm0.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm0.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm0.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm0plus.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm0plus.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm0plus.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm0plus.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm3.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm3.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm3.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm3.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm4.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm4.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm4.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm4.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm7.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm7.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cm7.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cm7.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cmFunc.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cmFunc.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cmFunc.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cmFunc.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cmInstr.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cmInstr.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cmInstr.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cmInstr.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cmSimd.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cmSimd.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/CoreSupport/core_cmSimd.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/CoreSupport/core_cmSimd.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/SWM320.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/SWM320.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/SWM320.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/SWM320.h diff --git a/bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/startup/arm/startup_SWM320.s b/bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM320.s similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/startup/arm/startup_SWM320.s rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM320.s diff --git a/bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/startup/gcc/startup_SWM320.s b/bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/startup/gcc/startup_SWM320.s similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/startup/gcc/startup_SWM320.s rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/startup/gcc/startup_SWM320.s diff --git a/bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/startup/iar/startup_SWM320.s b/bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/startup/iar/startup_SWM320.s similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/startup/iar/startup_SWM320.s rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/startup/iar/startup_SWM320.s diff --git a/bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/system_SWM320.c b/bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/system_SWM320.c similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/system_SWM320.c rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/system_SWM320.c diff --git a/bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/system_SWM320.h b/bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/system_SWM320.h similarity index 100% rename from bsp/synwit/swm320/libraries/CMSIS/DeviceSupport/system_SWM320.h rename to bsp/synwit/libraries/SWM320_CSL/CMSIS/DeviceSupport/system_SWM320.h diff --git a/bsp/synwit/swm320/libraries/SConscript b/bsp/synwit/libraries/SWM320_CSL/SConscript similarity index 62% rename from bsp/synwit/swm320/libraries/SConscript rename to bsp/synwit/libraries/SWM320_CSL/SConscript index f84fbe6bb53..1c0ffe96984 100644 --- a/bsp/synwit/swm320/libraries/SConscript +++ b/bsp/synwit/libraries/SWM320_CSL/SConscript @@ -1,9 +1,9 @@ from building import * import rtconfig -cwd = GetCurrentDir() -src = Glob('CMSIS/DeviceSupport/*.c') -CPPPATH = [cwd + '/CMSIS/CoreSupport', cwd + '/CMSIS/DeviceSupport', cwd + '/SWM320_StdPeriph_Driver'] +cwd = GetCurrentDir() + +src = Glob('CMSIS/DeviceSupport/*.c') src += Glob('SWM320_StdPeriph_Driver/*.c') if rtconfig.PLATFORM in ['gcc']: @@ -12,6 +12,12 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += ['CMSIS/DeviceSupport/startup/arm/startup_SWM320.s'] elif rtconfig.PLATFORM in ['iccarm']: src += ['CMSIS/DeviceSupport/startup/iar/startup_SWM320.s'] -group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH) + +inc = [cwd + '/CMSIS/CoreSupport', + cwd + '/CMSIS/DeviceSupport', + cwd + '/SWM320_StdPeriph_Driver' +] + +group = DefineGroup('Libraries', src, depend = [''], CPPPATH = inc) Return('group') diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_adc.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_adc.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_adc.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_adc.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_adc.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_adc.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_adc.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_adc.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_can.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_can.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_can.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_can.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_can.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_can.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_can.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_can.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_crc.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_crc.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_crc.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_crc.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_crc.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_crc.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_crc.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_crc.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_dma.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_dma.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_dma.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_dma.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_dma.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_dma.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_dma.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_dma.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_exti.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_exti.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_exti.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_exti.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_exti.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_exti.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_exti.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_exti.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_flash.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_flash.c similarity index 98% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_flash.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_flash.c index df6506eb5b6..de8925e9737 100644 --- a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_flash.c +++ b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_flash.c @@ -73,7 +73,7 @@ void FLASH_Write(uint32_t addr, uint32_t buff[], uint32_t count) ******************************************************************************************************************************************/ void Flash_Param_at_xMHz(uint32_t x) { - __disable_irq(); +// __disable_irq(); switch(x) { case 30: @@ -93,5 +93,5 @@ void Flash_Param_at_xMHz(uint32_t x) IAP_Flash_Param(0x48a, 0xabfc7a6e); break; } - __enable_irq(); +// __enable_irq(); } diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_flash.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_flash.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_flash.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_flash.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_gpio.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_gpio.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_gpio.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_gpio.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_gpio.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_gpio.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_gpio.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_gpio.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_i2c.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_i2c.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_i2c.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_i2c.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_i2c.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_i2c.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_i2c.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_i2c.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_lcd.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_lcd.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_lcd.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_lcd.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_lcd.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_lcd.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_lcd.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_lcd.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_norflash.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_norflash.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_norflash.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_norflash.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_norflash.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_norflash.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_norflash.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_norflash.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_port.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_port.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_port.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_port.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_port.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_port.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_port.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_port.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_pwm.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_pwm.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_pwm.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_pwm.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_pwm.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_pwm.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_pwm.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_pwm.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_rtc.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_rtc.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_rtc.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_rtc.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_rtc.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_rtc.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_rtc.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_rtc.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdio.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdio.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdio.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdio.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdio.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdio.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdio.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdio.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdram.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdram.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdram.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdram.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdram.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdram.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sdram.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sdram.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_spi.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_spi.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_spi.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_spi.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_spi.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_spi.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_spi.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_spi.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sram.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sram.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sram.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sram.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sram.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sram.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_sram.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_sram.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_timr.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_timr.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_timr.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_timr.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_timr.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_timr.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_timr.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_timr.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_uart.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_uart.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_uart.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_uart.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_uart.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_uart.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_uart.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_uart.h diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_wdt.c b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_wdt.c similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_wdt.c rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_wdt.c diff --git a/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_wdt.h b/bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_wdt.h similarity index 100% rename from bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_wdt.h rename to bsp/synwit/libraries/SWM320_CSL/SWM320_StdPeriph_Driver/SWM320_wdt.h diff --git a/bsp/synwit/swm320/drivers/SConscript b/bsp/synwit/libraries/SWM320_drivers/SConscript similarity index 82% rename from bsp/synwit/swm320/drivers/SConscript rename to bsp/synwit/libraries/SWM320_drivers/SConscript index cddf8cc0b74..9c20c550a4c 100644 --- a/bsp/synwit/swm320/drivers/SConscript +++ b/bsp/synwit/libraries/SWM320_drivers/SConscript @@ -1,12 +1,7 @@ from building import * -cwd = GetCurrentDir() - -CPPPATH = [cwd] - -src = Split(''' - board.c - ''') +cwd = GetCurrentDir() +src = [] if GetDepend(['RT_USING_SERIAL']): src += ['drv_uart.c'] @@ -47,6 +42,6 @@ if GetDepend(['BSP_USING_EXT_SRAM']): if GetDepend(['BSP_USING_NOR_FLASH']): src += ['drv_nor_flash.c'] -group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = [cwd]) Return('group') diff --git a/bsp/synwit/swm320/drivers/drv_adc.c b/bsp/synwit/libraries/SWM320_drivers/drv_adc.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_adc.c rename to bsp/synwit/libraries/SWM320_drivers/drv_adc.c diff --git a/bsp/synwit/swm320/drivers/drv_adc.h b/bsp/synwit/libraries/SWM320_drivers/drv_adc.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_adc.h rename to bsp/synwit/libraries/SWM320_drivers/drv_adc.h diff --git a/bsp/synwit/swm320/drivers/drv_crypto.c b/bsp/synwit/libraries/SWM320_drivers/drv_crypto.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_crypto.c rename to bsp/synwit/libraries/SWM320_drivers/drv_crypto.c diff --git a/bsp/synwit/swm320/drivers/drv_crypto.h b/bsp/synwit/libraries/SWM320_drivers/drv_crypto.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_crypto.h rename to bsp/synwit/libraries/SWM320_drivers/drv_crypto.h diff --git a/bsp/synwit/swm320/drivers/drv_gpio.c b/bsp/synwit/libraries/SWM320_drivers/drv_gpio.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_gpio.c rename to bsp/synwit/libraries/SWM320_drivers/drv_gpio.c diff --git a/bsp/synwit/swm320/drivers/drv_gpio.h b/bsp/synwit/libraries/SWM320_drivers/drv_gpio.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_gpio.h rename to bsp/synwit/libraries/SWM320_drivers/drv_gpio.h diff --git a/bsp/synwit/swm320/drivers/drv_hwtimer.c b/bsp/synwit/libraries/SWM320_drivers/drv_hwtimer.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_hwtimer.c rename to bsp/synwit/libraries/SWM320_drivers/drv_hwtimer.c diff --git a/bsp/synwit/swm320/drivers/drv_hwtimer.h b/bsp/synwit/libraries/SWM320_drivers/drv_hwtimer.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_hwtimer.h rename to bsp/synwit/libraries/SWM320_drivers/drv_hwtimer.h diff --git a/bsp/synwit/swm320/drivers/drv_log.h b/bsp/synwit/libraries/SWM320_drivers/drv_log.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_log.h rename to bsp/synwit/libraries/SWM320_drivers/drv_log.h diff --git a/bsp/synwit/swm320/drivers/drv_nor_flash.c b/bsp/synwit/libraries/SWM320_drivers/drv_nor_flash.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_nor_flash.c rename to bsp/synwit/libraries/SWM320_drivers/drv_nor_flash.c diff --git a/bsp/synwit/swm320/drivers/drv_nor_flash.h b/bsp/synwit/libraries/SWM320_drivers/drv_nor_flash.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_nor_flash.h rename to bsp/synwit/libraries/SWM320_drivers/drv_nor_flash.h diff --git a/bsp/synwit/swm320/drivers/drv_pwm.c b/bsp/synwit/libraries/SWM320_drivers/drv_pwm.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_pwm.c rename to bsp/synwit/libraries/SWM320_drivers/drv_pwm.c diff --git a/bsp/synwit/swm320/drivers/drv_pwm.h b/bsp/synwit/libraries/SWM320_drivers/drv_pwm.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_pwm.h rename to bsp/synwit/libraries/SWM320_drivers/drv_pwm.h diff --git a/bsp/synwit/swm320/drivers/drv_rtc.c b/bsp/synwit/libraries/SWM320_drivers/drv_rtc.c similarity index 99% rename from bsp/synwit/swm320/drivers/drv_rtc.c rename to bsp/synwit/libraries/SWM320_drivers/drv_rtc.c index d19f62625fb..379b889a1b8 100644 --- a/bsp/synwit/swm320/drivers/drv_rtc.c +++ b/bsp/synwit/libraries/SWM320_drivers/drv_rtc.c @@ -107,7 +107,7 @@ static rt_err_t swm_rtc_configure(void) rtc_initstruct.MinuteIEn = 0; RTC_Init(RTC, &rtc_initstruct); RTC_Start(RTC); - + return RT_EOK; } @@ -148,7 +148,7 @@ int swm_rtc_init(void) rt_err_t result; swm_rtc_configure(); - + swm_rtc_device.ops = &swm_rtc_ops; result = rt_hw_rtc_register(&swm_rtc_device, "rtc", RT_DEVICE_FLAG_RDWR,RT_NULL); if (result != RT_EOK) diff --git a/bsp/synwit/swm320/drivers/drv_rtc.h b/bsp/synwit/libraries/SWM320_drivers/drv_rtc.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_rtc.h rename to bsp/synwit/libraries/SWM320_drivers/drv_rtc.h diff --git a/bsp/synwit/swm320/drivers/drv_sdio.c b/bsp/synwit/libraries/SWM320_drivers/drv_sdio.c similarity index 99% rename from bsp/synwit/swm320/drivers/drv_sdio.c rename to bsp/synwit/libraries/SWM320_drivers/drv_sdio.c index 7547d6f305a..08a9ae5dbe8 100644 --- a/bsp/synwit/swm320/drivers/drv_sdio.c +++ b/bsp/synwit/libraries/SWM320_drivers/drv_sdio.c @@ -118,13 +118,13 @@ static void swm_sdio_wait_completed(struct swm_sdio_device *sdio) SDIO->CR2 |= (1 << SDIO_CR2_RSTCMD_Pos); data->err = -RT_ERROR; } - + if (status & SDIO_IF_CMDTIMEOUT_Msk) { SDIO->CR2 |= (1 << SDIO_CR2_RSTCMD_Pos); cmd->err = -RT_ETIMEOUT; } - + if (status & SDIO_IF_DATCRCERR_Msk) { SDIO->CR2 |= (1 << SDIO_CR2_RSTDAT_Pos); diff --git a/bsp/synwit/swm320/drivers/drv_sdio.h b/bsp/synwit/libraries/SWM320_drivers/drv_sdio.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_sdio.h rename to bsp/synwit/libraries/SWM320_drivers/drv_sdio.h diff --git a/bsp/synwit/swm320/drivers/drv_soft_i2c.c b/bsp/synwit/libraries/SWM320_drivers/drv_soft_i2c.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_soft_i2c.c rename to bsp/synwit/libraries/SWM320_drivers/drv_soft_i2c.c diff --git a/bsp/synwit/swm320/drivers/drv_soft_i2c.h b/bsp/synwit/libraries/SWM320_drivers/drv_soft_i2c.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_soft_i2c.h rename to bsp/synwit/libraries/SWM320_drivers/drv_soft_i2c.h diff --git a/bsp/synwit/swm320/drivers/drv_spi.c b/bsp/synwit/libraries/SWM320_drivers/drv_spi.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_spi.c rename to bsp/synwit/libraries/SWM320_drivers/drv_spi.c diff --git a/bsp/synwit/swm320/drivers/drv_spi.h b/bsp/synwit/libraries/SWM320_drivers/drv_spi.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_spi.h rename to bsp/synwit/libraries/SWM320_drivers/drv_spi.h diff --git a/bsp/synwit/swm320/drivers/drv_sram.c b/bsp/synwit/libraries/SWM320_drivers/drv_sram.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_sram.c rename to bsp/synwit/libraries/SWM320_drivers/drv_sram.c diff --git a/bsp/synwit/swm320/drivers/drv_sram.h b/bsp/synwit/libraries/SWM320_drivers/drv_sram.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_sram.h rename to bsp/synwit/libraries/SWM320_drivers/drv_sram.h diff --git a/bsp/synwit/swm320/drivers/drv_uart.c b/bsp/synwit/libraries/SWM320_drivers/drv_uart.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_uart.c rename to bsp/synwit/libraries/SWM320_drivers/drv_uart.c diff --git a/bsp/synwit/swm320/drivers/drv_uart.h b/bsp/synwit/libraries/SWM320_drivers/drv_uart.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_uart.h rename to bsp/synwit/libraries/SWM320_drivers/drv_uart.h diff --git a/bsp/synwit/swm320/drivers/drv_wdt.c b/bsp/synwit/libraries/SWM320_drivers/drv_wdt.c similarity index 100% rename from bsp/synwit/swm320/drivers/drv_wdt.c rename to bsp/synwit/libraries/SWM320_drivers/drv_wdt.c diff --git a/bsp/synwit/swm320/drivers/drv_wdt.h b/bsp/synwit/libraries/SWM320_drivers/drv_wdt.h similarity index 100% rename from bsp/synwit/swm320/drivers/drv_wdt.h rename to bsp/synwit/libraries/SWM320_drivers/drv_wdt.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cachel1_armv7.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cachel1_armv7.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cachel1_armv7.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cachel1_armv7.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_armcc.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_armcc.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_armcc.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_armcc.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_armclang.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_armclang.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_armclang.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_armclang.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_armclang_ltm.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_armclang_ltm.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_armclang_ltm.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_armclang_ltm.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_compiler.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_compiler.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_compiler.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_compiler.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_gcc.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_gcc.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_gcc.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_gcc.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_iccarm.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_iccarm.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_iccarm.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_iccarm.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_version.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_version.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/cmsis_version.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/cmsis_version.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_armv81mml.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_armv81mml.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_armv81mml.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_armv81mml.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_armv8mbl.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_armv8mbl.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_armv8mbl.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_armv8mbl.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_armv8mml.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_armv8mml.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_armv8mml.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_armv8mml.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm0.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm0.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm0.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm0.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm0plus.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm0plus.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm0plus.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm0plus.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm1.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm1.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm1.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm1.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm23.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm23.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm23.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm23.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm3.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm3.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm3.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm3.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm33.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm33.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm33.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm33.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm35p.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm35p.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm35p.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm35p.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm4.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm4.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm4.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm4.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm55.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm55.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm55.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm55.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm7.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm7.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_cm7.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_cm7.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_sc000.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_sc000.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_sc000.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_sc000.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_sc300.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_sc300.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/core_sc300.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/core_sc300.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/mpu_armv7.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/mpu_armv7.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/mpu_armv7.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/mpu_armv7.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/mpu_armv8.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/mpu_armv8.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/mpu_armv8.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/mpu_armv8.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/pmu_armv8.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/pmu_armv8.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/pmu_armv8.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/pmu_armv8.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/CoreSupport/tz_context.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/tz_context.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/CoreSupport/tz_context.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/CoreSupport/tz_context.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/SWM341.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/SWM341.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/SWM341.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/SWM341.h diff --git a/bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s b/bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s diff --git a/bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/startup/gcc/startup_SWM341.s b/bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/startup/gcc/startup_SWM341.s similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/startup/gcc/startup_SWM341.s rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/startup/gcc/startup_SWM341.s diff --git a/bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/startup/iar/startup_SWM341.s b/bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/startup/iar/startup_SWM341.s similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/startup/iar/startup_SWM341.s rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/startup/iar/startup_SWM341.s diff --git a/bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/system_SWM341.c b/bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/system_SWM341.c similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/system_SWM341.c rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/system_SWM341.c diff --git a/bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/system_SWM341.h b/bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/system_SWM341.h similarity index 100% rename from bsp/synwit/swm341/libraries/CMSIS/DeviceSupport/system_SWM341.h rename to bsp/synwit/libraries/SWM341_CSL/CMSIS/DeviceSupport/system_SWM341.h diff --git a/bsp/synwit/swm341/libraries/SConscript b/bsp/synwit/libraries/SWM341_CSL/SConscript similarity index 61% rename from bsp/synwit/swm341/libraries/SConscript rename to bsp/synwit/libraries/SWM341_CSL/SConscript index 2f2824c8392..c235245d064 100644 --- a/bsp/synwit/swm341/libraries/SConscript +++ b/bsp/synwit/libraries/SWM341_CSL/SConscript @@ -1,9 +1,9 @@ from building import * import rtconfig -cwd = GetCurrentDir() -src = Glob('CMSIS/DeviceSupport/*.c') -CPPPATH = [cwd + '/CMSIS/CoreSupport', cwd + '/CMSIS/DeviceSupport', cwd + '/SWM341_StdPeriph_Driver'] +cwd = GetCurrentDir() + +src = Glob('CMSIS/DeviceSupport/*.c') src += Glob('SWM341_StdPeriph_Driver/*.c') if rtconfig.CROSS_TOOL == 'gcc': @@ -12,6 +12,12 @@ elif rtconfig.CROSS_TOOL == 'keil': src += ['CMSIS/DeviceSupport/startup/arm/startup_SWM341.s'] elif rtconfig.CROSS_TOOL == 'iar': src += ['CMSIS/DeviceSupport/startup/iar/startup_SWM341.s'] -group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH) + +inc = [cwd + '/CMSIS/CoreSupport', + cwd + '/CMSIS/DeviceSupport', + cwd + '/SWM341_StdPeriph_Driver' +] + +group = DefineGroup('Libraries', src, depend = [''], CPPPATH = inc) Return('group') diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_adc.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_adc.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_adc.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_adc.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_adc.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_adc.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_adc.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_adc.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_can.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_can.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_can.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_can.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_can.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_can.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_can.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_can.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_cordic.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_cordic.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_cordic.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_cordic.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_cordic.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_cordic.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_cordic.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_cordic.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_crc.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_crc.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_crc.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_crc.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_crc.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_crc.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_crc.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_crc.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dac.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dac.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dac.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dac.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dac.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dac.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dac.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dac.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_div.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_div.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_div.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_div.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_div.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_div.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_div.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_div.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma2d.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma2d.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma2d.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma2d.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma2d.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma2d.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dma2d.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_dma2d.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_exti.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_exti.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_exti.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_exti.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_exti.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_exti.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_exti.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_exti.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_flash.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.c similarity index 99% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_flash.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.c index f436f8be4fe..a41cbc520ec 100644 --- a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_flash.c +++ b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.c @@ -84,7 +84,7 @@ uint32_t FLASH_Write(uint32_t addr, uint32_t buff[], uint32_t count) ******************************************************************************************************************************************/ void Flash_Param_at_xMHz(uint32_t x) { - __disable_irq(); +// __disable_irq(); switch(x) { case 30: @@ -108,5 +108,5 @@ void Flash_Param_at_xMHz(uint32_t x) IAP_Flash_Param(0x16589, 0x4C74, 0x0B11FFAC); break; } - __enable_irq(); +// __enable_irq(); } diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_flash.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_flash.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_gpio.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_gpio.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_gpio.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_gpio.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_gpio.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_gpio.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_gpio.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_gpio.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_i2c.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_i2c.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_i2c.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_i2c.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_i2c.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_i2c.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_i2c.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_i2c.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_iofilt.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_iofilt.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_iofilt.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_iofilt.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_iofilt.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_iofilt.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_iofilt.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_iofilt.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_jpeg.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_jpeg.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_jpeg.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_jpeg.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_jpeg.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_jpeg.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_jpeg.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_jpeg.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_lcd.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_lcd.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_lcd.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_lcd.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_lcd.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_lcd.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_lcd.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_lcd.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_port.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_port.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_port.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_port.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_port.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_port.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_port.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_port.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_pwm.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_pwm.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_pwm.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_pwm.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_pwm.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_pwm.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_pwm.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_pwm.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_qei.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_qei.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_qei.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_qei.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_qei.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_qei.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_qei.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_qei.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_rtc.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_rtc.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_rtc.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_rtc.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_rtc.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_rtc.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_rtc.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_rtc.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdio.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdio.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdio.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdio.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdio.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdio.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdio.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdio.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdram.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdram.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdram.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdram.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdram.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdram.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sdram.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sdram.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sfc.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sfc.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sfc.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sfc.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sfc.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sfc.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sfc.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sfc.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sleep.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sleep.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sleep.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sleep.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sleep.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sleep.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_sleep.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_sleep.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_spi.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_spi.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_spi.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_spi.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_spi.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_spi.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_spi.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_spi.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_timr.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_timr.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_timr.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_timr.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_timr.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_timr.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_timr.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_timr.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_uart.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_uart.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_uart.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_uart.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_uart.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_uart.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_uart.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_uart.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usb.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usb.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usb.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usb.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbd.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbd.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbd.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbd.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbd.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbd.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbd.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbd.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbh.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbh.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbh.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbh.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbh.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbh.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_usbh.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_usbh.h diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_wdt.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_wdt.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_wdt.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_wdt.c diff --git a/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_wdt.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_wdt.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_wdt.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_wdt.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_core.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/CDC/usbh_cdc_funct.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_core.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_core.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_core.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_core.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_core.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_core.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_core.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_core.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_keybd.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/HID/usbh_hid_mouse.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_bot.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_core.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_core.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_core.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_core.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_core.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_core.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_core.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_core.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MSC/usbh_msc_scsi.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/MTP/usbh_mtp_ptp.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_core.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_core.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_core.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_core.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_core.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_core.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_core.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_core.h diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_stdreq.c b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_stdreq.c similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_stdreq.c rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_stdreq.c diff --git a/bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_stdreq.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_stdreq.h similarity index 100% rename from bsp/synwit/swm341/libraries/SWM341_UsbHost_Lib/usbh_stdreq.h rename to bsp/synwit/libraries/SWM341_CSL/SWM341_UsbHost_Lib/usbh_stdreq.h diff --git a/bsp/synwit/swm341/drivers/SConscript b/bsp/synwit/libraries/SWM341_drivers/SConscript similarity index 84% rename from bsp/synwit/swm341/drivers/SConscript rename to bsp/synwit/libraries/SWM341_drivers/SConscript index 7b5dd2220a5..8aacb2087fc 100644 --- a/bsp/synwit/swm341/drivers/SConscript +++ b/bsp/synwit/libraries/SWM341_drivers/SConscript @@ -1,12 +1,7 @@ from building import * -cwd = GetCurrentDir() - -CPPPATH = [cwd] - -src = Split(''' - board.c - ''') +cwd = GetCurrentDir() +src = [] if GetDepend(['RT_USING_SERIAL']): src += ['drv_uart.c'] @@ -53,6 +48,6 @@ if GetDepend(['BSP_USING_SDRAM']): if GetDepend(['BSP_USING_RGB_LCD']): src += ['drv_rgb_lcd.c'] -group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = [cwd]) Return('group') diff --git a/bsp/synwit/swm341/drivers/drv_adc.c b/bsp/synwit/libraries/SWM341_drivers/drv_adc.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_adc.c rename to bsp/synwit/libraries/SWM341_drivers/drv_adc.c diff --git a/bsp/synwit/swm341/drivers/drv_adc.h b/bsp/synwit/libraries/SWM341_drivers/drv_adc.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_adc.h rename to bsp/synwit/libraries/SWM341_drivers/drv_adc.h diff --git a/bsp/synwit/swm341/drivers/drv_can.c b/bsp/synwit/libraries/SWM341_drivers/drv_can.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_can.c rename to bsp/synwit/libraries/SWM341_drivers/drv_can.c diff --git a/bsp/synwit/swm341/drivers/drv_can.h b/bsp/synwit/libraries/SWM341_drivers/drv_can.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_can.h rename to bsp/synwit/libraries/SWM341_drivers/drv_can.h diff --git a/bsp/synwit/swm341/drivers/drv_crypto.c b/bsp/synwit/libraries/SWM341_drivers/drv_crypto.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_crypto.c rename to bsp/synwit/libraries/SWM341_drivers/drv_crypto.c diff --git a/bsp/synwit/swm341/drivers/drv_crypto.h b/bsp/synwit/libraries/SWM341_drivers/drv_crypto.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_crypto.h rename to bsp/synwit/libraries/SWM341_drivers/drv_crypto.h diff --git a/bsp/synwit/swm341/drivers/drv_dac.c b/bsp/synwit/libraries/SWM341_drivers/drv_dac.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_dac.c rename to bsp/synwit/libraries/SWM341_drivers/drv_dac.c diff --git a/bsp/synwit/swm341/drivers/drv_dac.h b/bsp/synwit/libraries/SWM341_drivers/drv_dac.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_dac.h rename to bsp/synwit/libraries/SWM341_drivers/drv_dac.h diff --git a/bsp/synwit/swm341/drivers/drv_gpio.c b/bsp/synwit/libraries/SWM341_drivers/drv_gpio.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_gpio.c rename to bsp/synwit/libraries/SWM341_drivers/drv_gpio.c diff --git a/bsp/synwit/swm341/drivers/drv_gpio.h b/bsp/synwit/libraries/SWM341_drivers/drv_gpio.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_gpio.h rename to bsp/synwit/libraries/SWM341_drivers/drv_gpio.h diff --git a/bsp/synwit/swm341/drivers/drv_hwtimer.c b/bsp/synwit/libraries/SWM341_drivers/drv_hwtimer.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_hwtimer.c rename to bsp/synwit/libraries/SWM341_drivers/drv_hwtimer.c diff --git a/bsp/synwit/swm341/drivers/drv_hwtimer.h b/bsp/synwit/libraries/SWM341_drivers/drv_hwtimer.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_hwtimer.h rename to bsp/synwit/libraries/SWM341_drivers/drv_hwtimer.h diff --git a/bsp/synwit/swm341/drivers/drv_log.h b/bsp/synwit/libraries/SWM341_drivers/drv_log.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_log.h rename to bsp/synwit/libraries/SWM341_drivers/drv_log.h diff --git a/bsp/synwit/swm341/drivers/drv_pwm.c b/bsp/synwit/libraries/SWM341_drivers/drv_pwm.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_pwm.c rename to bsp/synwit/libraries/SWM341_drivers/drv_pwm.c diff --git a/bsp/synwit/swm341/drivers/drv_pwm.h b/bsp/synwit/libraries/SWM341_drivers/drv_pwm.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_pwm.h rename to bsp/synwit/libraries/SWM341_drivers/drv_pwm.h diff --git a/bsp/synwit/swm341/drivers/drv_rgb_lcd.c b/bsp/synwit/libraries/SWM341_drivers/drv_rgb_lcd.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_rgb_lcd.c rename to bsp/synwit/libraries/SWM341_drivers/drv_rgb_lcd.c diff --git a/bsp/synwit/swm341/drivers/drv_rgb_lcd.h b/bsp/synwit/libraries/SWM341_drivers/drv_rgb_lcd.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_rgb_lcd.h rename to bsp/synwit/libraries/SWM341_drivers/drv_rgb_lcd.h diff --git a/bsp/synwit/swm341/drivers/drv_rtc.c b/bsp/synwit/libraries/SWM341_drivers/drv_rtc.c similarity index 99% rename from bsp/synwit/swm341/drivers/drv_rtc.c rename to bsp/synwit/libraries/SWM341_drivers/drv_rtc.c index 1207190f147..2fd1a243aac 100644 --- a/bsp/synwit/swm341/drivers/drv_rtc.c +++ b/bsp/synwit/libraries/SWM341_drivers/drv_rtc.c @@ -107,7 +107,7 @@ static rt_err_t swm_rtc_configure(void) rtc_initstruct.MinuteIEn = 0; RTC_Init(RTC, &rtc_initstruct); RTC_Start(RTC); - + return RT_EOK; } @@ -148,7 +148,7 @@ int swm_rtc_init(void) rt_err_t result; swm_rtc_configure(); - + swm_rtc_device.ops = &swm_rtc_ops; result = rt_hw_rtc_register(&swm_rtc_device, "rtc", RT_DEVICE_FLAG_RDWR,RT_NULL); if (result != RT_EOK) diff --git a/bsp/synwit/swm341/drivers/drv_rtc.h b/bsp/synwit/libraries/SWM341_drivers/drv_rtc.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_rtc.h rename to bsp/synwit/libraries/SWM341_drivers/drv_rtc.h diff --git a/bsp/synwit/swm341/drivers/drv_sdio.c b/bsp/synwit/libraries/SWM341_drivers/drv_sdio.c similarity index 99% rename from bsp/synwit/swm341/drivers/drv_sdio.c rename to bsp/synwit/libraries/SWM341_drivers/drv_sdio.c index 6c4eab4a101..f85ea63cd85 100644 --- a/bsp/synwit/swm341/drivers/drv_sdio.c +++ b/bsp/synwit/libraries/SWM341_drivers/drv_sdio.c @@ -118,13 +118,13 @@ static void swm_sdio_wait_completed(struct swm_sdio_device *sdio) SDIO->CR2 |= (1 << SDIO_CR2_RSTCMD_Pos); data->err = -RT_ERROR; } - + if (status & SDIO_IF_CMDTIMEOUT_Msk) { SDIO->CR2 |= (1 << SDIO_CR2_RSTCMD_Pos); cmd->err = -RT_ETIMEOUT; } - + if (status & SDIO_IF_DATCRCERR_Msk) { SDIO->CR2 |= (1 << SDIO_CR2_RSTDAT_Pos); diff --git a/bsp/synwit/swm341/drivers/drv_sdio.h b/bsp/synwit/libraries/SWM341_drivers/drv_sdio.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_sdio.h rename to bsp/synwit/libraries/SWM341_drivers/drv_sdio.h diff --git a/bsp/synwit/swm341/drivers/drv_sdram.c b/bsp/synwit/libraries/SWM341_drivers/drv_sdram.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_sdram.c rename to bsp/synwit/libraries/SWM341_drivers/drv_sdram.c diff --git a/bsp/synwit/swm341/drivers/drv_sdram.h b/bsp/synwit/libraries/SWM341_drivers/drv_sdram.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_sdram.h rename to bsp/synwit/libraries/SWM341_drivers/drv_sdram.h diff --git a/bsp/synwit/swm341/drivers/drv_soft_i2c.c b/bsp/synwit/libraries/SWM341_drivers/drv_soft_i2c.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_soft_i2c.c rename to bsp/synwit/libraries/SWM341_drivers/drv_soft_i2c.c diff --git a/bsp/synwit/swm341/drivers/drv_soft_i2c.h b/bsp/synwit/libraries/SWM341_drivers/drv_soft_i2c.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_soft_i2c.h rename to bsp/synwit/libraries/SWM341_drivers/drv_soft_i2c.h diff --git a/bsp/synwit/swm341/drivers/drv_spi.c b/bsp/synwit/libraries/SWM341_drivers/drv_spi.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_spi.c rename to bsp/synwit/libraries/SWM341_drivers/drv_spi.c diff --git a/bsp/synwit/swm341/drivers/drv_spi.h b/bsp/synwit/libraries/SWM341_drivers/drv_spi.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_spi.h rename to bsp/synwit/libraries/SWM341_drivers/drv_spi.h diff --git a/bsp/synwit/swm341/drivers/drv_uart.c b/bsp/synwit/libraries/SWM341_drivers/drv_uart.c similarity index 96% rename from bsp/synwit/swm341/drivers/drv_uart.c rename to bsp/synwit/libraries/SWM341_drivers/drv_uart.c index b2f221e1ddd..c64c759525d 100644 --- a/bsp/synwit/swm341/drivers/drv_uart.c +++ b/bsp/synwit/libraries/SWM341_drivers/drv_uart.c @@ -275,7 +275,17 @@ static void swm_uart_isr(struct rt_serial_device *serial_device) /* UART in mode Receiver -------------------------------------------------*/ if (UART_INTStat(uart_cfg->UARTx, UART_IT_RX_THR) || UART_INTStat(uart_cfg->UARTx, UART_IT_RX_TOUT)) { - rt_hw_serial_isr(serial_device, RT_SERIAL_EVENT_RX_IND); + if(!UART_IsRXFIFOEmpty(uart_cfg->UARTx)) + { + rt_hw_serial_isr(serial_device, RT_SERIAL_EVENT_RX_IND); + } + + if(UART_INTStat(uart_cfg->UARTx, UART_IT_RX_TOUT)) + { + UART_INTClr(uart_cfg->UARTx, UART_IT_RX_TOUT); + + rt_hw_serial_isr(serial_device, RT_SERIAL_EVENT_RX_TIMEOUT); + } } } diff --git a/bsp/synwit/swm341/drivers/drv_uart.h b/bsp/synwit/libraries/SWM341_drivers/drv_uart.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_uart.h rename to bsp/synwit/libraries/SWM341_drivers/drv_uart.h diff --git a/bsp/synwit/swm341/drivers/drv_wdt.c b/bsp/synwit/libraries/SWM341_drivers/drv_wdt.c similarity index 100% rename from bsp/synwit/swm341/drivers/drv_wdt.c rename to bsp/synwit/libraries/SWM341_drivers/drv_wdt.c diff --git a/bsp/synwit/swm341/drivers/drv_wdt.h b/bsp/synwit/libraries/SWM341_drivers/drv_wdt.h similarity index 100% rename from bsp/synwit/swm341/drivers/drv_wdt.h rename to bsp/synwit/libraries/SWM341_drivers/drv_wdt.h diff --git a/bsp/synwit/swm341/drivers/rgb_lcd_port.h b/bsp/synwit/libraries/SWM341_drivers/rgb_lcd_port.h similarity index 100% rename from bsp/synwit/swm341/drivers/rgb_lcd_port.h rename to bsp/synwit/libraries/SWM341_drivers/rgb_lcd_port.h diff --git "a/bsp/synwit/libraries/\346\263\250\346\204\217\344\272\213\351\241\271.md" "b/bsp/synwit/libraries/\346\263\250\346\204\217\344\272\213\351\241\271.md" new file mode 100644 index 00000000000..c5c2887166f --- /dev/null +++ "b/bsp/synwit/libraries/\346\263\250\346\204\217\344\272\213\351\241\271.md" @@ -0,0 +1,13 @@ +# 以下文件经过修改,替换lib时需要注意 + +## 1 + +SWM341_CSL\CMSIS\DeviceSupport\startup\gcc\startup_SWM341.s 文件经过修改。 + +SWM320_CSL\CMSIS\DeviceSupport\startup\gcc\startup_SWM320.s 文件经过修改。 + +## 2 + +SWM341_CSL\SWM341_StdPeriph_Driver\SWM341_flash.c 中函数 Flash_Param_at_xMHz() 注释掉 \_\_disable_irq() 和 \_\_enable_irq() 语句,避免在调度器启动之前使能全局中断 + +SWM320_CSL\SWM320_StdPeriph_Driver\SWM320_flash.c 中函数 Flash_Param_at_xMHz() 注释掉 \_\_disable_irq() 和 \_\_enable_irq() 语句,避免在调度器启动之前使能全局中断 diff --git a/bsp/synwit/swm320/.config b/bsp/synwit/swm320-mini/.config similarity index 95% rename from bsp/synwit/swm320/.config rename to bsp/synwit/swm320-mini/.config index 2c553f70f7a..66e80ba29cb 100644 --- a/bsp/synwit/swm320/.config +++ b/bsp/synwit/swm320-mini/.config @@ -9,8 +9,10 @@ CONFIG_RT_NAME_MAX=8 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set +# CONFIG_RT_USING_NANO is not set # CONFIG_RT_USING_AMP is not set # CONFIG_RT_USING_SMP is not set +CONFIG_RT_CPUS_NR=1 CONFIG_RT_ALIGN_SIZE=8 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -35,7 +37,7 @@ CONFIG_IDLE_THREAD_STACK_SIZE=256 CONFIG_RT_USING_DEBUG=y CONFIG_RT_DEBUGING_COLOR=y CONFIG_RT_DEBUGING_CONTEXT=y -# CONFIG_RT_DEBUGING_INIT is not set +# CONFIG_RT_DEBUGING_AUTO_INIT is not set # # Inter-Thread communication @@ -66,19 +68,15 @@ CONFIG_RT_USING_MEMHEAP_AUTO_BINDING=y # CONFIG_RT_USING_MEMTRACE is not set # CONFIG_RT_USING_HEAP_ISR is not set CONFIG_RT_USING_HEAP=y - -# -# Kernel Device Object -# CONFIG_RT_USING_DEVICE=y # CONFIG_RT_USING_DEVICE_OPS is not set -# CONFIG_RT_USING_DM is not set # CONFIG_RT_USING_INTERRUPT_INFO is not set CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart1" -CONFIG_RT_VER_NUM=0x50002 +CONFIG_RT_VER_NUM=0x50100 # CONFIG_RT_USING_STDC_ATOMIC is not set +CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32 # CONFIG_RT_USING_CACHE is not set CONFIG_RT_USING_HW_ATOMIC=y # CONFIG_ARCH_ARM_BOOTWITH_FLUSH_CACHE is not set @@ -122,6 +120,7 @@ CONFIG_FINSH_USING_OPTION_COMPLETION=y # # Device Drivers # +# CONFIG_RT_USING_DM is not set CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_UNAMED_PIPE_NUMBER=64 # CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set @@ -145,7 +144,6 @@ CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set # CONFIG_RT_USING_PM is not set -# CONFIG_RT_USING_FDT is not set # CONFIG_RT_USING_RTC is not set # CONFIG_RT_USING_SDIO is not set # CONFIG_RT_USING_SPI is not set @@ -216,6 +214,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_RT_USING_LWIP is not set # CONFIG_RT_USING_AT is not set +# +# Memory protection +# +# CONFIG_RT_USING_MEM_PROTECTION is not set +# CONFIG_RT_USING_HW_STACK_GUARD is not set + # # Utilities # @@ -268,6 +272,21 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # # CONFIG_PKG_USING_WLAN_WICED is not set # CONFIG_PKG_USING_RW007 is not set + +# +# CYW43012 WiFi +# +# CONFIG_PKG_USING_WLAN_CYW43012 is not set + +# +# BL808 WiFi +# +# CONFIG_PKG_USING_WLAN_BL808 is not set + +# +# CYW43439 WiFi +# +# CONFIG_PKG_USING_WLAN_CYW43439 is not set # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set @@ -289,7 +308,6 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_JIOT-C-SDK is not set # CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set # CONFIG_PKG_USING_JOYLINK is not set -# CONFIG_PKG_USING_EZ_IOT_OS is not set # CONFIG_PKG_USING_IOTSHARP_SDK is not set # CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set @@ -310,6 +328,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_NMEALIB is not set # CONFIG_PKG_USING_PDULIB is not set # CONFIG_PKG_USING_BTSTACK is not set +# CONFIG_PKG_USING_BT_CYW43012 is not set +# CONFIG_PKG_USING_CYW43XX is not set # CONFIG_PKG_USING_LORAWAN_ED_STACK is not set # CONFIG_PKG_USING_WAYZ_IOTKIT is not set # CONFIG_PKG_USING_MAVLINK is not set @@ -329,6 +349,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_ZFTP is not set # CONFIG_PKG_USING_WOL is not set # CONFIG_PKG_USING_ZEPHYR_POLLING is not set +# CONFIG_PKG_USING_MATTER_ADAPTATION_LAYER is not set +# CONFIG_PKG_USING_LHC_MODBUS is not set # # security packages @@ -375,7 +397,6 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # LVGL: powerful and easy-to-use embedded GUI library # # CONFIG_PKG_USING_LVGL is not set -# CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_LV_MUSIC_DEMO is not set # CONFIG_PKG_USING_GUI_GUIDER_DEMO is not set @@ -452,6 +473,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set # CONFIG_PKG_USING_VOFA_PLUS is not set # CONFIG_PKG_USING_RT_TRACE is not set +# CONFIG_PKG_USING_ZDEBUG is not set # # system packages @@ -488,6 +510,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_UC_COMMON is not set # CONFIG_PKG_USING_UC_MODBUS is not set # CONFIG_PKG_USING_FREERTOS_WRAPPER is not set +# CONFIG_PKG_USING_LITEOS_SDK is not set +# CONFIG_PKG_USING_TZ_DATABASE is not set # CONFIG_PKG_USING_CAIRO is not set # CONFIG_PKG_USING_PIXMAN is not set # CONFIG_PKG_USING_PARTITION is not set @@ -511,6 +535,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_QBOOT is not set # CONFIG_PKG_USING_PPOOL is not set # CONFIG_PKG_USING_OPENAMP is not set +# CONFIG_PKG_USING_RPMSG_LITE is not set # CONFIG_PKG_USING_LPM is not set # CONFIG_PKG_USING_TLSF is not set # CONFIG_PKG_USING_EVENT_RECORDER is not set @@ -524,6 +549,11 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_AGILE_UPGRADE is not set # CONFIG_PKG_USING_FLASH_BLOB is not set # CONFIG_PKG_USING_MLIBC is not set +# CONFIG_PKG_USING_TASK_MSG_BUS is not set +# CONFIG_PKG_USING_SFDB is not set +# CONFIG_PKG_USING_RTP is not set +# CONFIG_PKG_USING_REB is not set +# CONFIG_PKG_USING_R_RHEALSTONE is not set # # peripheral libraries and drivers @@ -588,6 +618,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_BALANCE is not set # CONFIG_PKG_USING_SHT2X is not set # CONFIG_PKG_USING_SHT3X is not set +# CONFIG_PKG_USING_SHT4X is not set # CONFIG_PKG_USING_AD7746 is not set # CONFIG_PKG_USING_ADT74XX is not set # CONFIG_PKG_USING_MAX17048 is not set @@ -688,6 +719,11 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_FINGERPRINT is not set # CONFIG_PKG_USING_BT_ECB02C is not set # CONFIG_PKG_USING_UAT is not set +# CONFIG_PKG_USING_ST7789 is not set +# CONFIG_PKG_USING_VS1003 is not set +# CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set +# CONFIG_PKG_USING_BT_MX01 is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -702,6 +738,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_QUEST is not set # CONFIG_PKG_USING_NAXOS is not set +# CONFIG_PKG_USING_R_TINYMAIX is not set # # Signal Processing and Control Algorithm Packages @@ -711,6 +748,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_UKAL is not set # CONFIG_PKG_USING_DIGITALCTRL is not set # CONFIG_PKG_USING_KISSFFT is not set +# CONFIG_PKG_USING_CMSIS_DSP is not set # # miscellaneous packages @@ -742,12 +780,14 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_PKG_USING_DONUT is not set # CONFIG_PKG_USING_COWSAY is not set # CONFIG_PKG_USING_MORSE is not set +# CONFIG_PKG_USING_TINYSQUARE is not set # CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_FASTLZ is not set # CONFIG_PKG_USING_MINILZO is not set # CONFIG_PKG_USING_QUICKLZ is not set # CONFIG_PKG_USING_LZMA is not set +# CONFIG_PKG_USING_RALARAM is not set # CONFIG_PKG_USING_MULTIBUTTON is not set # CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set # CONFIG_PKG_USING_CANFESTIVAL is not set @@ -932,6 +972,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_GFX_LIBRARY is not set # CONFIG_PKG_USING_ARDUINO_U8G2 is not set +# CONFIG_PKG_USING_ARDUINO_TFT_ESPI is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ST7735 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SSD1306 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ILI9341 is not set @@ -940,6 +981,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # # Timing # +# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set # CONFIG_PKG_USING_ARDUINO_MSTIMER2 is not set # CONFIG_PKG_USING_ARDUINO_TICKER is not set # CONFIG_PKG_USING_ARDUINO_TASKSCHEDULER is not set @@ -976,7 +1018,6 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI5351 is not set -# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set # # Signal IO diff --git a/bsp/synwit/swm320/Kconfig b/bsp/synwit/swm320-mini/Kconfig similarity index 76% rename from bsp/synwit/swm320/Kconfig rename to bsp/synwit/swm320-mini/Kconfig index bf5149e7c7e..4645aae1e02 100644 --- a/bsp/synwit/swm320/Kconfig +++ b/bsp/synwit/swm320-mini/Kconfig @@ -17,9 +17,4 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "drivers/Kconfig" - -config SOC_SWM320 - bool - select ARCH_ARM_CORTEX_M4 - default y +source "board/Kconfig" diff --git a/bsp/synwit/swm320/README.md b/bsp/synwit/swm320-mini/README.md similarity index 100% rename from bsp/synwit/swm320/README.md rename to bsp/synwit/swm320-mini/README.md diff --git a/bsp/synwit/swm320-mini/SConscript b/bsp/synwit/swm320-mini/SConscript new file mode 100644 index 00000000000..114efa835c9 --- /dev/null +++ b/bsp/synwit/swm320-mini/SConscript @@ -0,0 +1,11 @@ +import os +from building import * + +cwd = GetCurrentDir() +objs = [] + +for name in os.listdir(cwd): + if os.path.isfile(os.path.join(cwd, name, 'SConscript')): + objs += SConscript(os.path.join(name, 'SConscript')) + +Return('objs') diff --git a/bsp/synwit/swm320/SConstruct b/bsp/synwit/swm320-mini/SConstruct similarity index 75% rename from bsp/synwit/swm320/SConstruct rename to bsp/synwit/swm320-mini/SConstruct index 10cfbff3681..f771d5960d8 100644 --- a/bsp/synwit/swm320/SConstruct +++ b/bsp/synwit/swm320-mini/SConstruct @@ -37,5 +37,13 @@ Export('rtconfig') # prepare building environment objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) +libraries_path = os.path.join(GetCurrentDir(), '..', 'libraries') + +# include libraries +objs += SConscript(os.path.join(libraries_path, 'SWM320_CSL', 'SConscript'), variant_dir='build/libraries/SWM320_CSL', duplicate=0) + +# include drivers +objs += SConscript(os.path.join(libraries_path, 'SWM320_drivers', 'SConscript'), variant_dir='build/libraries/SWM320_drivers', duplicate=0) + # make a building DoBuilding(TARGET, objs) diff --git a/bsp/synwit/swm320/applications/SConscript b/bsp/synwit/swm320-mini/applications/SConscript similarity index 53% rename from bsp/synwit/swm320/applications/SConscript rename to bsp/synwit/swm320-mini/applications/SConscript index 7eaae205961..add84aabfe3 100644 --- a/bsp/synwit/swm320/applications/SConscript +++ b/bsp/synwit/swm320-mini/applications/SConscript @@ -1,9 +1,8 @@ from building import * -cwd = GetCurrentDir() -CPPPATH = [cwd] -src = Glob('*.c') + Glob('*.cpp') +cwd = GetCurrentDir() +src = Glob('*.c') + Glob('*.cpp') -group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = [cwd]) Return('group') diff --git a/bsp/synwit/swm320/applications/main.c b/bsp/synwit/swm320-mini/applications/main.c similarity index 100% rename from bsp/synwit/swm320/applications/main.c rename to bsp/synwit/swm320-mini/applications/main.c diff --git a/bsp/synwit/swm320/drivers/Kconfig b/bsp/synwit/swm320-mini/board/Kconfig similarity index 99% rename from bsp/synwit/swm320/drivers/Kconfig rename to bsp/synwit/swm320-mini/board/Kconfig index 6858ab0568a..6dab8a31efc 100644 --- a/bsp/synwit/swm320/drivers/Kconfig +++ b/bsp/synwit/swm320-mini/board/Kconfig @@ -2,6 +2,7 @@ menu "Hardware Drivers Config" config SOC_SWM320 bool + select ARCH_ARM_CORTEX_M4 select RT_USING_COMPONENTS_INIT select RT_USING_USER_MAIN default y diff --git a/bsp/synwit/swm320-mini/board/SConscript b/bsp/synwit/swm320-mini/board/SConscript new file mode 100644 index 00000000000..5e35a9a1ece --- /dev/null +++ b/bsp/synwit/swm320-mini/board/SConscript @@ -0,0 +1,8 @@ +from building import * + +cwd = GetCurrentDir() +src = Split('board.c') + +group = DefineGroup('Board', src, depend = [''], CPPPATH = [cwd]) + +Return('group') diff --git a/bsp/synwit/swm320/drivers/board.c b/bsp/synwit/swm320-mini/board/board.c similarity index 100% rename from bsp/synwit/swm320/drivers/board.c rename to bsp/synwit/swm320-mini/board/board.c diff --git a/bsp/synwit/swm320/drivers/board.h b/bsp/synwit/swm320-mini/board/board.h similarity index 100% rename from bsp/synwit/swm320/drivers/board.h rename to bsp/synwit/swm320-mini/board/board.h diff --git a/bsp/synwit/swm320/drivers/linker_scripts/link.icf b/bsp/synwit/swm320-mini/board/linker_scripts/link.icf similarity index 100% rename from bsp/synwit/swm320/drivers/linker_scripts/link.icf rename to bsp/synwit/swm320-mini/board/linker_scripts/link.icf diff --git a/bsp/synwit/swm320/drivers/linker_scripts/link.lds b/bsp/synwit/swm320-mini/board/linker_scripts/link.lds similarity index 100% rename from bsp/synwit/swm320/drivers/linker_scripts/link.lds rename to bsp/synwit/swm320-mini/board/linker_scripts/link.lds diff --git a/bsp/synwit/swm320/drivers/linker_scripts/link.sct b/bsp/synwit/swm320-mini/board/linker_scripts/link.sct similarity index 100% rename from bsp/synwit/swm320/drivers/linker_scripts/link.sct rename to bsp/synwit/swm320-mini/board/linker_scripts/link.sct diff --git a/bsp/synwit/swm320/project.ewp b/bsp/synwit/swm320-mini/project.ewp similarity index 96% rename from bsp/synwit/swm320/project.ewp rename to bsp/synwit/swm320-mini/project.ewp index 678e9908566..bd3246db63a 100644 --- a/bsp/synwit/swm320/project.ewp +++ b/bsp/synwit/swm320-mini/project.ewp @@ -777,7 +777,7 @@