Skip to content

Commit 1426e57

Browse files
authored
Merge branch 'RT-Thread:master' into hal
2 parents 2ae8a05 + 277bb73 commit 1426e57

File tree

706 files changed

+70878
-206624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

706 files changed

+70878
-206624
lines changed

.github/workflows/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
- {RTT_BSP: "asm9260t", RTT_TOOL_CHAIN: "sourcery-arm"}
3636
- {RTT_BSP: "at91sam9260", RTT_TOOL_CHAIN: "sourcery-arm"}
3737
- {RTT_BSP: "allwinner_tina", RTT_TOOL_CHAIN: "sourcery-arm"}
38-
- {RTT_BSP: "efm32", RTT_TOOL_CHAIN: "sourcery-arm"}
3938
- {RTT_BSP: "gd32e230k-start", RTT_TOOL_CHAIN: "sourcery-arm"}
4039
- {RTT_BSP: "gd32303e-eval", RTT_TOOL_CHAIN: "sourcery-arm"}
4140
- {RTT_BSP: "gd32450z-eval", RTT_TOOL_CHAIN: "sourcery-arm"}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# files format check exclude path, please follow the instructions below to modify;
2+
# If you need to exclude an entire folder, add the folder path in dir_path;
3+
# If you need to exclude a file, add the path to the file in file_path.
4+
5+
dir_path:
6+
- libraries
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mainmenu "RT-Thread Configuration"
1+
mainmenu "RT-Thread Project Configuration"
22

33
config BSP_DIR
44
string
@@ -8,7 +8,7 @@ config BSP_DIR
88
config RTT_DIR
99
string
1010
option env="RTT_ROOT"
11-
default "../../.."
11+
default "../.."
1212

1313
config PKGS_DIR
1414
string
@@ -18,10 +18,5 @@ config PKGS_DIR
1818
source "$RTT_DIR/Kconfig"
1919
source "$PKGS_DIR/Kconfig"
2020

21-
config SOC_ES32F0271LT
22-
bool
23-
select RT_USING_COMPONENTS_INIT
24-
select RT_USING_USER_MAIN
25-
default y
21+
source "$BSP_DIR/drivers/Kconfig"
2622

27-
source "drivers/Kconfig"

bsp/acm32f4xx-nucleo/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# acm32f0x0板级支持包
2+
3+
## 1. 简介
4+
5+
ACM32F4xx芯片是上海爱信诺航芯电子科技有限公司(后续简称上海航芯)一系列支持多种低功耗模式的通用MCU。包括如下硬件特性:
6+
7+
|--------------------------|--------------------|
8+
| 硬件 | 描述 |
9+
| -------------------------|--------------------|
10+
|芯片型号 | ACM32F4XX系列 |
11+
|CPU | ARM Cortex-M33 |
12+
|主频 | 180MHz |
13+
|片内SRAM | 192K |
14+
|片内Flash | 512K |
15+
|--------------------------|--------------------|
16+
17+
具体型号及资源请参考上海航芯官方网站[ACM32F4](www.aisinochip.com/index.php/product/child1/id/219.html)
18+
19+
## 2. 编译说明
20+
21+
推荐使用[env工具][1],可以在console下进入到`bsp/acm32f4xx-nucleo`目录中,运行以下命令:
22+
23+
`scons`
24+
25+
来编译这个板级支持包。如果编译正确无误,会产生rtthread.elf、rtthread.bin文件。其中rtthread.bin需要烧写到设备中进行运行。
26+
27+
也可以通过`scons --target=mdk5`生成keil工程,再使用keil进行编译。
28+
29+
## 3. 烧写及执行
30+
31+
开发板的使用请参考上海航芯官方网站相应型号的[开发工具](www.aisinochip.com/index.php/product/detail/id/25.html)
32+
33+
### 3.1 运行结果
34+
35+
如果编译 & 烧写无误,当复位设备后,会在串口上看到RT-Thread的启动logo信息:
36+
37+
## 4. 驱动支持情况及计划
38+
39+
| **片上外设** | **支持情况** | **备注** |
40+
| ------------- | ------------ | ------------------------------------- |
41+
| GPIO | 支持 | PA0, PA1... PF4 ---> PIN: 0, 1...83 |
42+
| UART | 支持 | UART1/UART2 |
43+
| LED | 支持 | LED1 |
44+
45+
## 5. 联系人信息
46+
47+
维护人:AisinoChip < [email protected] >
48+
49+
## 6. 参考
50+
51+
* 板子[数据手册][2]
52+
* 芯片[数据手册][3]
53+
54+
[1]: https://www.rt-thread.org/page/download.html
55+
[2]: www.aisinochip.com/index.php/product/detail/id/50.html
56+
[3]: www.aisinochip.com/index.php/product/detail/id/50.html

bsp/essemi/es32f0334/SConscript renamed to bsp/acm32f4xx-nucleo/SConscript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# for module compiling
22
import os
3-
Import('RTT_ROOT')
3+
from building import *
44

5+
cwd = GetCurrentDir()
56
objs = []
6-
cwd = str(Dir('#'))
77
list = os.listdir(cwd)
88

99
for d in list:

bsp/acm32f4xx-nucleo/SConstruct

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import os
2+
import sys
3+
import rtconfig
4+
5+
if os.getenv('RTT_ROOT'):
6+
RTT_ROOT = os.getenv('RTT_ROOT')
7+
else:
8+
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
9+
10+
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
11+
from building import *
12+
13+
TARGET = 'rtthread_acm32f4xx.' + rtconfig.TARGET_EXT
14+
15+
env = Environment(tools = ['mingw'],
16+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
17+
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
18+
AR = rtconfig.AR, ARFLAGS = '-rc',
19+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
20+
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
21+
22+
if rtconfig.PLATFORM == 'iar':
23+
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
24+
env.Replace(ARFLAGS = [''])
25+
env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
26+
27+
Export('RTT_ROOT')
28+
Export('rtconfig')
29+
30+
# prepare building environment
31+
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
32+
33+
# make a building
34+
DoBuilding(TARGET, objs)

bsp/essemi/es32f0271/applications/SConscript renamed to bsp/acm32f4xx-nucleo/applications/SConscript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ Import('RTT_ROOT')
22
Import('rtconfig')
33
from building import *
44

5-
cwd = os.path.join(str(Dir('#')), 'applications')
6-
src = Glob('*.c')
7-
5+
cwd = os.path.join(str(Dir('#')), 'applications')
6+
src = Glob('*.c')
87
CPPPATH = [cwd, str(Dir('#'))]
8+
99
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
1010

1111
Return('group')
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2021-09-17 AisinoChip the first version
9+
*/
10+
11+
#include <rthw.h>
12+
#include <rtthread.h>
13+
#include "board.h"
14+
#include <drivers/pin.h>
15+
16+
#define LED_PIN_NUM 83 /* PF3 */
17+
18+
int main(void)
19+
{
20+
rt_pin_mode(LED_PIN_NUM, PIN_MODE_OUTPUT);
21+
22+
while (1)
23+
{
24+
rt_pin_write(LED_PIN_NUM, PIN_LOW);
25+
rt_thread_delay(RT_TICK_PER_SECOND / 2);
26+
rt_pin_write(LED_PIN_NUM, PIN_HIGH);
27+
rt_thread_delay(RT_TICK_PER_SECOND / 2);
28+
}
29+
}

0 commit comments

Comments
 (0)