Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yunke120
rt-thread
提交
9dc0bbb8
R
rt-thread
项目概览
yunke120
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9dc0bbb8
编写于
11月 20, 2020
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'gitee/gitee_master'
上级
8c00fa35
05777266
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
97 addition
and
2 deletion
+97
-2
bsp/stm32/stm32f103-atk-warshipv3/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h
...tk-warshipv3/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h
+1
-1
bsp/stm32/stm32f103-atk-warshipv3/board/CubeMX_Config/Src/stm32f1xx_hal_msp.c
...atk-warshipv3/board/CubeMX_Config/Src/stm32f1xx_hal_msp.c
+67
-0
bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig
bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig
+12
-1
tools/rtthread.mk
tools/rtthread.mk
+17
-0
未找到文件。
bsp/stm32/stm32f103-atk-warshipv3/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h
浏览文件 @
9dc0bbb8
...
...
@@ -35,7 +35,7 @@
#define HAL_MODULE_ENABLED
/*#define HAL_ADC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */
/*#define HAL_CAN_MODULE_ENABLED */
#define HAL_CAN_MODULE_ENABLED
/*#define HAL_CAN_LEGACY_MODULE_ENABLED */
/*#define HAL_CEC_MODULE_ENABLED */
/*#define HAL_CORTEX_MODULE_ENABLED */
...
...
bsp/stm32/stm32f103-atk-warshipv3/board/CubeMX_Config/Src/stm32f1xx_hal_msp.c
浏览文件 @
9dc0bbb8
...
...
@@ -294,6 +294,73 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
}
}
/**
* @brief CAN MSP Initialization
* This function configures the hardware resources used in this example
* @param hcan: CAN handle pointer
* @retval None
*/
void
HAL_CAN_MspInit
(
CAN_HandleTypeDef
*
hcan
)
{
GPIO_InitTypeDef
GPIO_InitStruct
=
{
0
};
if
(
hcan
->
Instance
==
CAN1
)
{
/* USER CODE BEGIN CAN1_MspInit 0 */
/* USER CODE END CAN1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_CAN1_CLK_ENABLE
();
__HAL_RCC_GPIOA_CLK_ENABLE
();
/**CAN GPIO Configuration
PA11 ------> CAN_RX
PA12 ------> CAN_TX
*/
GPIO_InitStruct
.
Pin
=
GPIO_PIN_11
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_INPUT
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
HAL_GPIO_Init
(
GPIOA
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_12
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_HIGH
;
HAL_GPIO_Init
(
GPIOA
,
&
GPIO_InitStruct
);
/* USER CODE BEGIN CAN1_MspInit 1 */
/* USER CODE END CAN1_MspInit 1 */
}
}
/**
* @brief CAN MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hcan: CAN handle pointer
* @retval None
*/
void
HAL_CAN_MspDeInit
(
CAN_HandleTypeDef
*
hcan
)
{
if
(
hcan
->
Instance
==
CAN1
)
{
/* USER CODE BEGIN CAN1_MspDeInit 0 */
/* USER CODE END CAN1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_CAN1_CLK_DISABLE
();
/**CAN GPIO Configuration
PA11 ------> CAN_RX
PA12 ------> CAN_TX
*/
HAL_GPIO_DeInit
(
GPIOA
,
GPIO_PIN_11
|
GPIO_PIN_12
);
/* USER CODE BEGIN CAN1_MspDeInit 1 */
/* USER CODE END CAN1_MspDeInit 1 */
}
}
static
uint32_t
FSMC_Initialized
=
0
;
...
...
bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig
浏览文件 @
9dc0bbb8
...
...
@@ -188,7 +188,18 @@ menu "On-chip Peripheral Drivers"
bool "Enable ADC1"
default n
endif
menuconfig BSP_USING_CAN
bool "Enable CAN"
default n
select RT_USING_CAN
if BSP_USING_CAN
config BSP_USING_CAN1
bool "Enable CAN1"
default n
config BSP_USING_CAN2
bool "Enable CAN2"
default n
endif
config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH"
default n
...
...
tools/rtthread.mk
浏览文件 @
9dc0bbb8
...
...
@@ -55,6 +55,20 @@ $(if $(strip $(LOCALS)),$(eval $(LOCALS): $(S_SRC)
@
$(CROSS_COMPILE)
gcc
$
$(AFLAGS)
-c
$$
<
-o
$$
@
))
endef
define
add_s_file
$(eval S_SRC
:
= $(1:$(BSP_ROOT)/%=%))
\
$(eval S_SRC := $(S_SRC:$(RTT_ROOT)/%=%))
\
$(eval SOBJ := $(1:%.s=%.o))
\
$(eval SOBJ := $(SOBJ:$(BSP_ROOT)/%=$(BSP_BUILD_DIR)/%))
\
$(eval SOBJ := $(SOBJ:$(RTT_ROOT)/%=$(RTT_BUILD_DIR)/%))
\
$(eval LOCALS := $(addprefix $(BUILD_DIR)/
,
$(SOBJ)))
\
$(eval OBJS += $(LOCALS))
\
$(if $(strip $(LOCALS))
,
$(eval $(LOCALS): $(S_SRC)
@
if
[
!
-d
$$
(
@D
)
]
;
then
mkdir
-p
$$
(
@D
)
;
fi
@
echo
cc
$$
<
@
$(CROSS_COMPILE)
gcc
$
$(AFLAGS)
-c
$$
<
-o
$$
@
))
endef
add_flg
=
$(
eval
CFLAGS +
=
$1
)
\
$(
eval
AFLAGS +
=
$1
)
\
$(
eval
CXXFLAGS +
=
$1
)
...
...
@@ -89,6 +103,9 @@ $(if $(SRCS),$(foreach f,$(SRCS),$(call add_cxx_file,$(f))))
SRCS
:=
$(
strip
$(
filter
%.S,
$(SRC_FILES)
))
$(if
$(SRCS),$(foreach
f,$(SRCS),$(call
add_S_file,$(f))))
SRCS
:=
$(
strip
$(
filter
%.s,
$(SRC_FILES)
))
$(if
$(SRCS),$(foreach
f,$(SRCS),$(call
add_s_file,$(f))))
CFLAGS
+=
$(CPPPATHS)
CXXFLAGS
+=
$(CPPPATHS)
AFLAGS
+=
$(CPPPATHS)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录