Skip to content

Commit 24c8326

Browse files
committed
update for moving SDK to online package
1 parent 2bb3db7 commit 24c8326

File tree

1,147 files changed

+44416
-617312
lines changed

Some content is hidden

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

1,147 files changed

+44416
-617312
lines changed

bsp/at32/at32a403a-start/.config

Lines changed: 307 additions & 39 deletions
Large diffs are not rendered by default.

bsp/at32/at32a403a-start/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,17 @@ AT32A403A-START板级包支持MDK4﹑MDK5﹑IAR开发环境和GCC编译器,以
116116

117117
#### 编译下载
118118

119-
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
119+
首先需抓取 HAL-SDK,并生成对应工程,步骤如下:
120+
121+
1. 在 bsp 下打开 env 工具。
122+
123+
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
124+
125+
3. 输入`pkgs --update`命令更新软件包。
126+
127+
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
128+
129+
打开工程文件,如 MDK5 工程 project.uvprojx 文件,,编译并下载程序到开发板。
120130

121131
> 工程默认配置使用AT-LINK SWD下载程序,在通过AT-LINK SWD连接开发板的基础上,点击下载按钮即可下载程序到开发板
122132

bsp/at32/at32a403a-start/SConscript

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

56
cwd = GetCurrentDir()
67
objs = []
7-
88
list = os.listdir(cwd)
9+
910
for d in list:
1011
path = os.path.join(cwd, d)
1112
if os.path.isfile(os.path.join(path, 'SConscript')):

bsp/at32/at32a403a-start/SConstruct

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if rtconfig.PLATFORM in ['iccarm']:
3030
env.Replace(ARFLAGS = [''])
3131
env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
3232

33+
Export('env')
3334
Export('RTT_ROOT')
3435
Export('rtconfig')
3536

@@ -46,11 +47,8 @@ Export('SDK_LIB')
4647
# prepare building environment
4748
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4849

49-
at32_library = 'AT32A403A_Firmware_Library'
50-
rtconfig.BSP_LIBRARY_TYPE = at32_library
51-
52-
# include libraries
53-
objs.extend(SConscript(os.path.join(libraries_path_prefix, at32_library, 'SConscript')))
50+
# include cmsis
51+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'cmsis', 'SConscript')))
5452

5553
# include usb libraries
5654
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'usbd_library', 'SConscript')))

bsp/at32/at32a403a-start/board/SConscript

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import os
22
import rtconfig
33
from building import *
44

5-
Import('SDK_LIB')
6-
75
cwd = GetCurrentDir()
86

97
# add general drivers
@@ -15,15 +13,6 @@ src/at32_msp.c
1513
path = [cwd]
1614
path += [cwd + '/inc']
1715

18-
startup_path_prefix = SDK_LIB
19-
20-
if rtconfig.PLATFORM in ['gcc']:
21-
src += [startup_path_prefix + '/AT32A403A_Firmware_Library/cmsis/cm4/device_support/startup/gcc/startup_at32a403a.s']
22-
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
23-
src += [startup_path_prefix + '/AT32A403A_Firmware_Library/cmsis/cm4/device_support/startup/mdk/startup_at32a403a.s']
24-
elif rtconfig.PLATFORM in ['iccarm']:
25-
src += [startup_path_prefix + '/AT32A403A_Firmware_Library/cmsis/cm4/device_support/startup/iar/startup_at32a403a.s']
26-
2716
CPPDEFINES = ['AT32A403AVGT7']
2817
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
2918
Return('group')

0 commit comments

Comments
 (0)