Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
Env
RT-Thread Studio
工程重新构建
ENV与RT-studio生成工程的差别问题
发布于 2022-03-11 11:30:55 浏览:1058
订阅该版
ENV中没有办法配置串口引脚。 RT-studio中可以配置引脚定义。 这个功能要想在ENV中使用是不是得自己写??? 因为RT-studio我用起来不习惯。 其中生成的board.h差别很大。 ENV生成的 ``` /* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-11-5 SummerGift 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 (1024 * 1024) #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE)) #define STM32_SRAM_SIZE (512) #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024) #if defined(__CC_ARM) || defined(__CLANG_ARM) extern int Image$$RW_IRAM1$$ZI$$Limit; #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit) #elif __ICCARM__ #pragma section="CSTACK" #define HEAP_BEGIN (__segment_end("CSTACK")) #else extern int __bss_end; #define HEAP_BEGIN (&__bss_end) #endif #define HEAP_END STM32_SRAM_END void SystemClock_Config(void); #ifdef __cplusplus } #endif #endif ``` rt-studio中生成的 ``` /* * Copyright (c) 2006-2022, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2022-03-11 RealThread first version */ #ifndef __BOARD_H__ #define __BOARD_H__ #include
#include
#ifdef __cplusplus extern "C" { #endif /*-------------------------- CHIP CONFIG BEGIN --------------------------*/ #define CHIP_FAMILY_STM32 #define CHIP_SERIES_STM32F7 #define CHIP_NAME_STM32F767IG /*-------------------------- CHIP CONFIG END --------------------------*/ /*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/ #define ROM_START ((uint32_t)0x08000000) #define ROM_SIZE (1024 * 1024) #define ROM_END ((uint32_t)(ROM_START + ROM_SIZE)) #define RAM_START (0x20020000) #define RAM_SIZE (384 * 1024) #define RAM_END (RAM_START + RAM_SIZE) /*-------------------------- ROM/RAM CONFIG END --------------------------*/ /*-------------------------- CLOCK CONFIG BEGIN --------------------------*/ #define BSP_CLOCK_SOURCE ("HSI") #define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0) #define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)180) /*-------------------------- CLOCK CONFIG END --------------------------*/ /*-------------------------- UART CONFIG BEGIN --------------------------*/ /** After configuring corresponding UART or UART DMA, you can use it. * * STEP 1, define macro define related to the serial port opening based on the serial port number * such as #define BSP_USING_UART1 * * STEP 2, according to the corresponding pin of serial port, define the related serial port information macro * such as #define BSP_UART1_TX_PIN "PA9" * #define BSP_UART1_RX_PIN "PA10" * * STEP 3, if you want using SERIAL DMA, you must open it in the RT-Thread Settings. * RT-Thread Setting -> Components -> Device Drivers -> Serial Device Drivers -> Enable Serial DMA Mode * * STEP 4, according to serial port number to define serial port tx/rx DMA function in the board.h file * such as #define BSP_UART1_RX_USING_DMA * */ #define BSP_USING_UART1 #define BSP_UART1_TX_PIN "PA9" #define BSP_UART1_RX_PIN "PA10" /*-------------------------- UART CONFIG END --------------------------*/ /*-------------------------- I2C CONFIG BEGIN --------------------------*/ /** if you want to use i2c bus(soft simulate) you can use the following instructions. * * STEP 1, open i2c driver framework(soft simulate) support in the RT-Thread Settings file * * STEP 2, define macro related to the i2c bus * such as #define BSP_USING_I2C1 * * STEP 3, according to the corresponding pin of i2c port, modify the related i2c port and pin information * such as #define BSP_I2C1_SCL_PIN GET_PIN(port, pin) -> GET_PIN(C, 11) * #define BSP_I2C1_SDA_PIN GET_PIN(port, pin) -> GET_PIN(C, 12) */ /*#define BSP_USING_I2C1*/ #ifdef BSP_USING_I2C1 #define BSP_I2C1_SCL_PIN GET_PIN(port, pin) #define BSP_I2C1_SDA_PIN GET_PIN(port, pin) #endif /*#define BSP_USING_I2C2*/ #ifdef BSP_USING_I2C2 #define BSP_I2C2_SCL_PIN GET_PIN(port, pin) #define BSP_I2C2_SDA_PIN GET_PIN(port, pin) #endif /*-------------------------- I2C CONFIG END --------------------------*/ /*-------------------------- SPI CONFIG BEGIN --------------------------*/ /** if you want to use spi bus you can use the following instructions. * * STEP 1, open spi driver framework support in the RT-Thread Settings file * * STEP 2, define macro related to the spi bus * such as #define BSP_USING_SPI1 * * STEP 3, copy your spi init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end of board.c file * such as void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) * * STEP 4, modify your stm32xxxx_hal_config.h file to support spi peripherals. define macro related to the peripherals * such as #define HAL_SPI_MODULE_ENABLED */ /*#define BSP_USING_SPI1*/ /*#define BSP_USING_SPI2*/ /*#define BSP_USING_SPI3*/ /*-------------------------- SPI CONFIG END --------------------------*/ /*-------------------------- QSPI CONFIG BEGIN --------------------------*/ /** if you want to use qspi you can use the following instructions. * * STEP 1, open qspi driver framework support in the RT-Thread Settings file * * STEP 2, define macro related to the qspi * such as #define BSP_USING_QSPI * * STEP 3, copy your qspi init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end of board.c file * such as void HAL_QSPI_MspInit(QSPI_HandleTypeDef* hqspi) * * STEP 4, modify your stm32xxxx_hal_config.h file to support qspi peripherals. define macro related to the peripherals * such as #define HAL_QSPI_MODULE_ENABLED * */ /*#define BSP_USING_QSPI*/ /*-------------------------- QSPI CONFIG END --------------------------*/ /*-------------------------- PWM CONFIG BEGIN --------------------------*/ /** if you want to use pwm you can use the following instructions. * * STEP 1, open pwm driver framework support in the RT-Thread Settings file * * STEP 2, define macro related to the pwm * such as #define BSP_USING_PWM1 * * STEP 3, copy your pwm timer init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end if board.c file * such as void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) and * void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim) * * STEP 4, modify your stm32xxxx_hal_config.h file to support pwm peripherals. define macro related to the peripherals * such as #define HAL_TIM_MODULE_ENABLED * */ /*#define BSP_USING_PWM1*/ /*#define BSP_USING_PWM2*/ /*#define BSP_USING_PWM3*/ /*-------------------------- PWM CONFIG END --------------------------*/ /*-------------------------- ADC CONFIG BEGIN --------------------------*/ /** if you want to use adc you can use the following instructions. * * STEP 1, open adc driver framework support in the RT-Thread Settings file * * STEP 2, define macro related to the adc * such as #define BSP_USING_ADC1 * * STEP 3, copy your adc init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end of board.c file * such as void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc) * * STEP 4, modify your stm32xxxx_hal_config.h file to support adc peripherals. define macro related to the peripherals * such as #define HAL_ADC_MODULE_ENABLED * */ /*#define BSP_USING_ADC1*/ /*#define BSP_USING_ADC2*/ /*#define BSP_USING_ADC3*/ /*-------------------------- ADC CONFIG END --------------------------*/ /*-------------------------- WDT CONFIG BEGIN --------------------------*/ /** if you want to use wdt you can use the following instructions. * * STEP 1, open wdt driver framework support in the RT-Thread Settings file * * STEP 2, modify your stm32xxxx_hal_config.h file to support wdt peripherals. define macro related to the peripherals * such as #define HAL_IWDG_MODULE_ENABLED * */ /*-------------------------- WDT CONFIG END --------------------------*/ /*-------------------------- HARDWARE TIMER CONFIG BEGIN --------------------------*/ /** if you want to use hardware timer you can use the following instructions. * * STEP 1, open hwtimer driver framework support in the RT-Thread Settings file * * STEP 2, define macro related to the hwtimer * such as #define BSP_USING_TIM and * #define BSP_USING_TIM1 * * STEP 3, copy your hardwire timer init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end of board.c file * such as void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) * * STEP 4, modify your stm32xxxx_hal_config.h file to support hardwere timer peripherals. define macro related to the peripherals * such as #define HAL_TIM_MODULE_ENABLED * */ /*#define BSP_USING_TIM*/ #ifdef BSP_USING_TIM /*#define BSP_USING_TIM15*/ /*#define BSP_USING_TIM16*/ /*#define BSP_USING_TIM17*/ #endif /*-------------------------- HAREWARE TIMER CONFIG END --------------------------*/ /*-------------------------- RTC CONFIG BEGIN --------------------------*/ /** if you want to use rtc(hardware) you can use the following instructions. * * STEP 1, open rtc driver framework(hardware) support in the RT-Thread Settings file * * STEP 2, define macro related to the rtc * such as BSP_USING_ONCHIP_RTC * * STEP 3, modify your stm32xxxx_hal_config.h file to support rtc peripherals. define macro related to the peripherals * such as #define HAL_RTC_MODULE_ENABLED * */ /*#define BSP_USING_ONCHIP_RTC*/ /*-------------------------- RTC CONFIG END --------------------------*/ /*-------------------------- SDIO CONFIG BEGIN --------------------------*/ /** if you want to use sdio you can use the following instructions. * * STEP 1, open sdio driver framework support in the RT-Thread Settings file * * STEP 2, define macro related to the sdio * such as BSP_USING_SDIO * * STEP 3, copy your sdio init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end of board.c file * such as void HAL_SD_MspInit(SD_HandleTypeDef* hsd) * * STEP 4, modify your stm32xxxx_hal_config.h file to support sdio peripherals. define macro related to the peripherals * such as #define HAL_SD_MODULE_ENABLED * * STEP 5, config your device file system or another applications * */ /*#define BSP_USING_SDIO*/ /*-------------------------- SDIO CONFIG END --------------------------*/ /*-------------------------- ETH CONFIG BEGIN --------------------------*/ /** if you want to use eth you can use the following instructions. * * STEP 1, define macro related to the eth * such as BSP_USING_ETH * * STEP 2, copy your eth init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end if board.c file * such as void HAL_ETH_MspInit(ETH_HandleTypeDef* heth) * * STEP 3, modify your stm32xxxx_hal_config.h file to support eth peripherals. define macro related to the peripherals * such as #define HAL_ETH_MODULE_ENABLED * * STEP 4, config your phy type * such as #define PHY_USING_LAN8720A * #define PHY_USING_DM9161CEP * #define PHY_USING_DP83848C * STEP 5, implement your phy reset function in the end of board.c file * void phy_reset(void) * * STEP 6, config your lwip or other network stack * */ /*#define BSP_USING_ETH*/ #ifdef BSP_USING_ETH /*#define PHY_USING_LAN8720A*/ /*#define PHY_USING_DM9161CEP*/ /*#define PHY_USING_DP83848C*/ #endif /*-------------------------- ETH CONFIG END --------------------------*/ /*-------------------------- USB HOST CONFIG BEGIN --------------------------*/ /** if you want to use usb host you can use the following instructions. * * STEP 1, open usb host driver framework support in the RT-Thread Settings file * * STEP 2, define macro related to the usb host * such as BSP_USING_USBHOST * * STEP 3, copy your usb host init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end of board.c file * such as void HAL_HCD_MspInit(HCD_HandleTypeDef* hhcd) * * STEP 4, config your usb peripheral clock in SystemClock_Config() generated by STM32CubeMX and replace this function in board.c * * STEP 5, modify your stm32xxxx_hal_config.h file to support usb host peripherals. define macro related to the peripherals * such as #define HAL_HCD_MODULE_ENABLED * */ /*#define BSP_USING_USBHOST*/ /*-------------------------- USB HOST CONFIG END --------------------------*/ /*-------------------------- USB DEVICE CONFIG BEGIN --------------------------*/ /** if you want to use usb device you can use the following instructions. * * STEP 1, open usb device driver framework support in the RT-Thread Settings file * * STEP 2 define macro related to the usb device * such as BSP_USING_USBDEVICE * * STEP 3, copy your usb device init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end of board.c file * such as void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) * * STEP 4, config your usb peripheral clock in SystemClock_Config() generated by STM32CubeMX and replace this function in board.c * * STEP 5, modify your stm32xxxx_hal_config.h file to support usb device peripherals. define macro related to the peripherals * such as #define HAL_PCD_MODULE_ENABLED * */ /*#define BSP_USING_USBDEVICE*/ /*-------------------------- USB DEVICE CONFIG END --------------------------*/ /*-------------------------- ON_CHIP_FLASH CONFIG BEGIN --------------------------*/ /** if you want to use on chip flash you can use the following instructions. * * STEP 1 define macro related to the on chip flash * such as BSP_USING_ON_CHIP_FLASH * * STEP 2, modify your stm32xxxx_hal_config.h file to support on chip flash peripherals. define macro related to the peripherals * such as #define HAL_FLASH_MODULE_ENABLED * */ /*#define BSP_USING_ON_CHIP_FLASH*/ /*-------------------------- ON_CHIP_FLASH CONFIG END --------------------------*/ #ifdef __cplusplus } #endif #endif /* __BOARD_H__ */ ``` 串口配置的差别 ``` /* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-10-30 SummerGift first version * 2019-01-03 zylx modify dma support */ #ifndef __UART_CONFIG_H__ #define __UART_CONFIG_H__ #include
#include
#ifdef __cplusplus extern "C" { #endif #if defined(BSP_USING_UART1) #ifndef UART1_CONFIG #define UART1_CONFIG \ { \ .name = "uart1", \ .Instance = USART1, \ .irq_type = USART1_IRQn, \ .tx_pin_name = BSP_UART1_TX_PIN, \ .rx_pin_name = BSP_UART1_RX_PIN, \ } #endif /* UART1_CONFIG */ #if defined(BSP_UART1_RX_USING_DMA) #ifndef UART1_DMA_RX_CONFIG #define UART1_DMA_RX_CONFIG \ { \ .Instance = UART1_RX_DMA_INSTANCE, \ .channel = UART1_RX_DMA_CHANNEL, \ .dma_rcc = UART1_RX_DMA_RCC, \ .dma_irq = UART1_RX_DMA_IRQ, \ } #endif /* UART1_DMA_RX_CONFIG */ #endif /* BSP_UART1_RX_USING_DMA */ #if defined(BSP_UART1_TX_USING_DMA) #ifndef UART1_DMA_TX_CONFIG #define UART1_DMA_TX_CONFIG \ { \ .Instance = UART1_TX_DMA_INSTANCE, \ .channel = UART1_TX_DMA_CHANNEL, \ .dma_rcc = UART1_TX_DMA_RCC, \ .dma_irq = UART1_TX_DMA_IRQ, \ } #endif /* UART1_DMA_TX_CONFIG */ #endif /* BSP_UART1_TX_USING_DMA */ #endif /* BSP_USING_UART1 */ #if defined(BSP_USING_UART2) #ifndef UART2_CONFIG #define UART2_CONFIG \ { \ .name = "uart2", \ .Instance = USART2, \ .irq_type = USART2_IRQn, \ .tx_pin_name = BSP_UART2_TX_PIN, \ .rx_pin_name = BSP_UART2_RX_PIN, \ } #endif /* UART2_CONFIG */ #if defined(BSP_UART2_RX_USING_DMA) #ifndef UART2_DMA_RX_CONFIG #define UART2_DMA_RX_CONFIG \ { \ .Instance = UART2_RX_DMA_INSTANCE, \ .channel = UART2_RX_DMA_CHANNEL, \ .dma_rcc = UART2_RX_DMA_RCC, \ .dma_irq = UART2_RX_DMA_IRQ, \ } #endif /* UART2_DMA_RX_CONFIG */ #endif /* BSP_UART2_RX_USING_DMA */ #if defined(BSP_UART2_TX_USING_DMA) #ifndef UART2_DMA_TX_CONFIG #define UART2_DMA_TX_CONFIG \ { \ .Instance = UART2_TX_DMA_INSTANCE, \ .channel = UART2_TX_DMA_CHANNEL, \ .dma_rcc = UART2_TX_DMA_RCC, \ .dma_irq = UART2_TX_DMA_IRQ, \ } #endif /* UART2_DMA_TX_CONFIG */ #endif /* BSP_UART2_TX_USING_DMA */ #endif /* BSP_USING_UART2 */ #if defined(BSP_USING_UART3) #ifndef UART3_CONFIG #define UART3_CONFIG \ { \ .name = "uart3", \ .Instance = USART3, \ .irq_type = USART3_IRQn, \ .tx_pin_name = BSP_UART3_TX_PIN, \ .rx_pin_name = BSP_UART3_RX_PIN, \ } #endif /* UART3_CONFIG */ #if defined(BSP_UART3_RX_USING_DMA) #ifndef UART3_DMA_RX_CONFIG #define UART3_DMA_RX_CONFIG \ { \ .Instance = UART3_RX_DMA_INSTANCE, \ .channel = UART3_RX_DMA_CHANNEL, \ .dma_rcc = UART3_RX_DMA_RCC, \ .dma_irq = UART3_RX_DMA_IRQ, \ } #endif /* UART3_DMA_RX_CONFIG */ #endif /* BSP_UART3_RX_USING_DMA */ #if defined(BSP_UART3_TX_USING_DMA) #ifndef UART3_DMA_TX_CONFIG #define UART3_DMA_TX_CONFIG \ { \ .Instance = UART3_TX_DMA_INSTANCE, \ .channel = UART3_TX_DMA_CHANNEL, \ .dma_rcc = UART3_TX_DMA_RCC, \ .dma_irq = UART3_TX_DMA_IRQ, \ } #endif /* UART3_DMA_TX_CONFIG */ #endif /* BSP_UART3_TX_USING_DMA */ #endif /* BSP_USING_UART3 */ #if defined(BSP_USING_UART4) #ifndef UART4_CONFIG #define UART4_CONFIG \ { \ .name = "uart4", \ .Instance = UART4, \ .irq_type = UART4_IRQn, \ .tx_pin_name = BSP_UART4_TX_PIN, \ .rx_pin_name = BSP_UART4_RX_PIN, \ } #endif /* UART4_CONFIG */ #if defined(BSP_UART4_RX_USING_DMA) #ifndef UART4_DMA_RX_CONFIG #define UART4_DMA_RX_CONFIG \ { \ .Instance = UART4_RX_DMA_INSTANCE, \ .channel = UART4_RX_DMA_CHANNEL, \ .dma_rcc = UART4_RX_DMA_RCC, \ .dma_irq = UART4_RX_DMA_IRQ, \ } #endif /* UART4_DMA_RX_CONFIG */ #endif /* BSP_UART4_RX_USING_DMA */ #if defined(BSP_UART4_TX_USING_DMA) #ifndef UART4_DMA_TX_CONFIG #define UART4_DMA_TX_CONFIG \ { \ .Instance = UART4_TX_DMA_INSTANCE, \ .channel = UART4_TX_DMA_CHANNEL, \ .dma_rcc = UART4_TX_DMA_RCC, \ .dma_irq = UART4_TX_DMA_IRQ, \ } #endif /* UART4_DMA_TX_CONFIG */ #endif /* BSP_UART4_RX_USING_DMA */ #endif /* BSP_USING_UART4 */ #if defined(BSP_USING_UART5) #ifndef UART5_CONFIG #define UART5_CONFIG \ { \ .name = "uart5", \ .Instance = UART5, \ .irq_type = UART5_IRQn, \ .tx_pin_name = BSP_UART5_TX_PIN, \ .rx_pin_name = BSP_UART5_RX_PIN, \ } #endif /* UART5_CONFIG */ #if defined(BSP_UART5_RX_USING_DMA) #ifndef UART5_DMA_RX_CONFIG #define UART5_DMA_RX_CONFIG \ { \ .Instance = UART5_RX_DMA_INSTANCE, \ .channel = UART5_RX_DMA_CHANNEL, \ .dma_rcc = UART5_RX_DMA_RCC, \ .dma_irq = UART5_RX_DMA_IRQ, \ } #endif /* UART5_DMA_RX_CONFIG */ #endif /* BSP_UART5_RX_USING_DMA */ #if defined(BSP_UART5_TX_USING_DMA) #ifndef UART5_DMA_TX_CONFIG #define UART5_DMA_TX_CONFIG \ { \ .Instance = UART5_TX_DMA_INSTANCE, \ .channel = UART5_TX_DMA_CHANNEL, \ .dma_rcc = UART5_TX_DMA_RCC, \ .dma_irq = UART5_TX_DMA_IRQ, \ } #endif /* UART5_DMA_TX_CONFIG */ #endif /* BSP_UART5_TX_USING_DMA */ #endif /* BSP_USING_UART5 */ #if defined(BSP_USING_UART6) #ifndef UART6_CONFIG #define UART6_CONFIG \ { \ .name = "uart6", \ .Instance = USART6, \ .irq_type = USART6_IRQn, \ .tx_pin_name = BSP_UART6_TX_PIN, \ .rx_pin_name = BSP_UART6_RX_PIN, \ } #endif /* UART6_CONFIG */ #if defined(BSP_UART6_RX_USING_DMA) #ifndef UART6_DMA_RX_CONFIG #define UART6_DMA_RX_CONFIG \ { \ .Instance = UART6_RX_DMA_INSTANCE, \ .channel = UART6_RX_DMA_CHANNEL, \ .dma_rcc = UART6_RX_DMA_RCC, \ .dma_irq = UART6_RX_DMA_IRQ, \ } #endif /* UART6_DMA_RX_CONFIG */ #endif /* BSP_UART6_RX_USING_DMA */ #if defined(BSP_UART6_TX_USING_DMA) #ifndef UART6_DMA_TX_CONFIG #define UART6_DMA_TX_CONFIG \ { \ .Instance = UART6_TX_DMA_INSTANCE, \ .channel = UART6_TX_DMA_CHANNEL, \ .dma_rcc = UART6_TX_DMA_RCC, \ .dma_irq = UART6_TX_DMA_IRQ, \ } #endif /* UART6_DMA_TX_CONFIG */ #endif /* BSP_UART6_TX_USING_DMA */ #endif /* BSP_USING_UART6 */ #if defined(BSP_USING_UART7) #ifndef UART7_CONFIG #define UART7_CONFIG \ { \ .name = "uart7", \ .Instance = UART7, \ .irq_type = UART7_IRQn, \ .tx_pin_name = BSP_UART7_TX_PIN, \ .rx_pin_name = BSP_UART7_RX_PIN, \ } #endif /* UART7_CONFIG */ #if defined(BSP_UART7_RX_USING_DMA) #ifndef UART7_DMA_RX_CONFIG #define UART7_DMA_RX_CONFIG \ { \ .Instance = UART7_RX_DMA_INSTANCE, \ .channel = UART7_RX_DMA_CHANNEL, \ .dma_rcc = UART7_RX_DMA_RCC, \ .dma_irq = UART7_RX_DMA_IRQ, \ } #endif /* UART7_DMA_RX_CONFIG */ #endif /* BSP_UART7_RX_USING_DMA */ #if defined(BSP_UART7_TX_USING_DMA) #ifndef UART7_DMA_TX_CONFIG #define UART7_DMA_TX_CONFIG \ { \ .Instance = UART7_TX_DMA_INSTANCE, \ .channel = UART7_TX_DMA_CHANNEL, \ .dma_rcc = UART7_TX_DMA_RCC, \ .dma_irq = UART7_TX_DMA_IRQ, \ } #endif /* UART7_DMA_TX_CONFIG */ #endif /* BSP_UART7_TX_USING_DMA */ #endif /* BSP_USING_UART7 */ #if defined(BSP_USING_UART8) #ifndef UART8_CONFIG #define UART8_CONFIG \ { \ .name = "uart8", \ .Instance = UART8, \ .irq_type = UART8_IRQn, \ .tx_pin_name = BSP_UART8_TX_PIN, \ .rx_pin_name = BSP_UART8_RX_PIN, \ } #endif /* UART8_CONFIG */ #if defined(BSP_UART8_RX_USING_DMA) #ifndef UART8_DMA_RX_CONFIG #define UART8_DMA_RX_CONFIG \ { \ .Instance = UART8_RX_DMA_INSTANCE, \ .channel = UART8_RX_DMA_CHANNEL, \ .dma_rcc = UART8_RX_DMA_RCC, \ .dma_irq = UART8_RX_DMA_IRQ, \ } #endif /* UART8_DMA_RX_CONFIG */ #endif /* BSP_UART8_RX_USING_DMA */ #if defined(BSP_UART8_TX_USING_DMA) #ifndef UART8_DMA_TX_CONFIG #define UART8_DMA_TX_CONFIG \ { \ .Instance = UART8_TX_DMA_INSTANCE, \ .channel = UART8_TX_DMA_CHANNEL, \ .dma_rcc = UART8_TX_DMA_RCC, \ .dma_irq = UART8_TX_DMA_IRQ, \ } #endif /* UART8_DMA_TX_CONFIG */ #endif /* BSP_UART8_TX_USING_DMA */ #endif /* BSP_USING_UART8 */ #ifdef __cplusplus } #endif #endif ``` ``` /* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-10-30 SummerGift first version * 2019-01-05 zylx modify dma support */ #ifndef __UART_CONFIG_H__ #define __UART_CONFIG_H__ #include
#ifdef __cplusplus extern "C" { #endif #if defined(BSP_USING_UART1) #ifndef UART1_CONFIG #define UART1_CONFIG \ { \ .name = "uart1", \ .Instance = USART1, \ .irq_type = USART1_IRQn, \ } #endif /* UART1_CONFIG */ #endif /* BSP_USING_UART1 */ #if defined(BSP_UART1_RX_USING_DMA) #ifndef UART1_DMA_RX_CONFIG #define UART1_DMA_RX_CONFIG \ { \ .Instance = UART1_RX_DMA_INSTANCE, \ .channel = UART1_RX_DMA_CHANNEL, \ .dma_rcc = UART1_RX_DMA_RCC, \ .dma_irq = UART1_RX_DMA_IRQ, \ } #endif /* UART1_DMA_RX_CONFIG */ #endif /* BSP_UART1_RX_USING_DMA */ #if defined(BSP_USING_UART2) #ifndef UART2_CONFIG #define UART2_CONFIG \ { \ .name = "uart2", \ .Instance = USART2, \ .irq_type = USART2_IRQn, \ } #endif /* UART2_CONFIG */ #endif /* BSP_USING_UART2 */ #if defined(BSP_UART2_RX_USING_DMA) #ifndef UART2_DMA_RX_CONFIG #define UART2_DMA_RX_CONFIG \ { \ .Instance = UART2_RX_DMA_INSTANCE, \ .channel = UART2_RX_DMA_CHANNEL, \ .dma_rcc = UART2_RX_DMA_RCC, \ .dma_irq = UART2_RX_DMA_IRQ, \ } #endif /* UART2_DMA_RX_CONFIG */ #endif /* BSP_UART2_RX_USING_DMA */ #if defined(BSP_USING_UART3) #ifndef UART3_CONFIG #define UART3_CONFIG \ { \ .name = "uart3", \ .Instance = USART3, \ .irq_type = USART3_IRQn, \ } #endif /* UART3_CONFIG */ #endif /* BSP_USING_UART3 */ #if defined(BSP_UART3_RX_USING_DMA) #ifndef UART3_DMA_RX_CONFIG #define UART3_DMA_RX_CONFIG \ { \ .Instance = UART3_RX_DMA_INSTANCE, \ .channel = UART3_RX_DMA_CHANNEL, \ .dma_rcc = UART3_RX_DMA_RCC, \ .dma_irq = UART3_RX_DMA_IRQ, \ } #endif /* UART3_DMA_RX_CONFIG */ #endif /* BSP_UART3_RX_USING_DMA */ #if defined(BSP_USING_UART4) #ifndef UART4_CONFIG #define UART4_CONFIG \ { \ .name = "uart4", \ .Instance = UART4, \ .irq_type = UART4_IRQn, \ } #endif /* UART4_CONFIG */ #endif /* BSP_USING_UART4 */ #if defined(BSP_UART4_RX_USING_DMA) #ifndef UART4_DMA_RX_CONFIG #define UART4_DMA_RX_CONFIG \ { \ .Instance = UART4_RX_DMA_INSTANCE, \ .channel = UART4_RX_DMA_CHANNEL, \ .dma_rcc = UART4_RX_DMA_RCC, \ .dma_irq = UART4_RX_DMA_IRQ, \ } #endif /* UART4_DMA_RX_CONFIG */ #endif /* BSP_UART4_RX_USING_DMA */ #if defined(BSP_USING_UART5) #ifndef UART5_CONFIG #define UART5_CONFIG \ { \ .name = "uart5", \ .Instance = UART5, \ .irq_type = UART5_IRQn, \ } #endif /* UART5_CONFIG */ #endif /* BSP_USING_UART5 */ #if defined(BSP_UART5_RX_USING_DMA) #ifndef UART5_DMA_RX_CONFIG #define UART5_DMA_RX_CONFIG \ { \ .Instance = UART5_RX_DMA_INSTANCE, \ .channel = UART5_RX_DMA_CHANNEL, \ .dma_rcc = UART5_RX_DMA_RCC, \ .dma_irq = UART5_RX_DMA_IRQ, \ } #endif /* UART5_DMA_RX_CONFIG */ #endif /* BSP_UART5_RX_USING_DMA */ #if defined(BSP_USING_UART6) #ifndef UART6_CONFIG #define UART6_CONFIG \ { \ .name = "uart6", \ .Instance = USART6, \ .irq_type = USART6_IRQn, \ } #endif /* UART6_CONFIG */ #endif /* BSP_USING_UART6 */ #if defined(BSP_UART6_RX_USING_DMA) #ifndef UART6_DMA_RX_CONFIG #define UART6_DMA_RX_CONFIG \ { \ .Instance = UART6_RX_DMA_INSTANCE, \ .channel = UART6_RX_DMA_CHANNEL, \ .dma_rcc = UART6_RX_DMA_RCC, \ .dma_irq = UART6_RX_DMA_IRQ, \ } #endif /* UART6_DMA_RX_CONFIG */ #endif /* BSP_UART6_RX_USING_DMA */ #ifdef __cplusplus } #endif #endif ``` 对比一下明显少了TX和RX引脚的定义
查看更多
RWZZ_6063
2022-12-16
这家伙很懒,什么也没写!
两个工具的bsp是完全 env 可以用 scons --pyconfig 也挺好用
3
个回答
默认排序
按发布时间排序
不开机
2022-12-15
这家伙很懒,什么也没写!
> https://club.rt-thread.org/ask/question/8e4de383993dbd25.html
用户名由3_15位
2022-03-11
这家伙很懒,什么也没写!
😰或者有没有办法使用RT-studio这个版本的RTT。 因为我去RT-studio目录中找到这个包使用ENV打开的话。没有了硬件配置选项 从GITEE中下载的有硬件配置选项 我下载的版本是3.15的完整版
撰写答案
登录
注册新账号
关注者
0
被浏览
1.1k
关于作者
用户名由3_15位
这家伙很懒,什么也没写!
提问
62
回答
229
被采纳
32
关注TA
发私信
相关问题
1
用scons构建代码出现问题
2
求助用scons生成不了mdk工程
3
关于使用scons编译的问题
4
关于scons 编译CPP问题求教
5
scons编译出现警告信息
6
SCons生成MDK5工程出错
7
realtouch的scons问题
8
SCons的PreAction能用吗?
9
scons 编译时出错。
10
求教:关于scons构建rtt时的两个问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
2
RT-Thread 发布 EtherKit开源以太网硬件!
3
rt-thread使用cherryusb实现虚拟串口
4
《C++20 图形界面程序:速度与渲染效率的双重优化秘籍》
5
《原子操作:程序世界里的“最小魔法单位”解析》
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
ulog
C++_cpp
at_device
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
13
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
本月文章贡献
程序员阿伟
7
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
3
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部