Skip to content

Commit 9a1cc37

Browse files
authored
增加对Air401的适配 (#90)
* add: 添加Air401的Drivers * add: 添加Air401的system依赖 * add: 添加Air401的board * add: 添加Air401的变体 * add: 添加Air401依赖 * fix: 修改重复的宏定义 * update: 更新Air401Drivers * fix: 修复Air401一些错误的外设定义 * add: 增加一些Air401相关的宏定义 * update: 更新版本
1 parent 1743e71 commit 9a1cc37

Some content is hidden

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

72 files changed

+5429
-13
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "system/Air32F103-Drivers"]
55
path = system/Air32F103-Drivers
66
url = https://github.com/Air-duino/Air32F103-Drivers.git
7+
[submodule "system/Air401-Drivers"]
8+
path = system/Air401-Drivers
9+
url = https://github.com/Air-duino/Air401-Drivers.git

boards.txt

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,121 @@ Air001Dev.menu.BootConnection.direct=direct connect
175175
Air001Dev.menu.BootConnection.direct.upload.boot=direct_connect
176176

177177
Air001Dev.build.extra_flags={build.temp} -DF_CPU={build.f_cpu} {build.lsc_temp} {build.sv_tmp} -DAIR001_DEV
178-
# Upload menu
178+
179+
###############################
180+
# Air401 Dev
181+
###############################
182+
183+
Air401Dev.name=Air401 Dev Chip
184+
185+
Air401Dev.upload.maximum_size=20480
186+
Air401Dev.upload.maximum_data_size=3072
187+
188+
Air401Dev.upload.tool=AirISP
189+
Air401Dev.upload.tool.default=AirISP
190+
191+
Air401Dev.build.core=AirMCU
192+
Air401Dev.build.board=AIR401_DEV
193+
Air401Dev.build.mcu=cortex-m0plus
194+
Air401Dev.build.series=AIR401xx
195+
Air401Dev.build.cmsis_lib_gcc=arm_cortexM0l_math
196+
Air401Dev.build.product_line=AIR401
197+
Air401Dev.build.variant=AIR401/AIR401_DEV
198+
Air401Dev.build.air_extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
199+
Air401Dev.build.drivers_include="-I{build.system.path}/Air401-Drivers/{build.series}_HAL_Driver/Inc" "-I{build.system.path}/Air401-Drivers/{build.series}_HAL_Driver/Src" "-I{build.system.path}/{build.series}" "-I{build.system.path}/Air401-Drivers/CMSIS/Device/{build.series}/Include/" "-I{build.system.path}/Air401-Drivers/CMSIS/Device/{build.series}/Source/gcc/"
200+
201+
Air401Dev.menu.UploadSpeed.115200=115200
202+
Air401Dev.menu.UploadSpeed.115200.upload.speed=115200
203+
Air401Dev.menu.UploadSpeed.57600=57600
204+
Air401Dev.menu.UploadSpeed.57600.upload.speed=57600
205+
Air401Dev.menu.UploadSpeed.38400=38400
206+
Air401Dev.menu.UploadSpeed.38400.upload.speed=38400
207+
Air401Dev.menu.UploadSpeed.19200=19200
208+
Air401Dev.menu.UploadSpeed.19200.upload.speed=19200
209+
Air401Dev.menu.UploadSpeed.9600=9600
210+
Air401Dev.menu.UploadSpeed.9600.upload.speed=9600
211+
Air401Dev.menu.UploadSpeed.4800=4800
212+
Air401Dev.menu.UploadSpeed.4800.upload.speed=4800
213+
Air401Dev.menu.UploadSpeed.2400=2400
214+
Air401Dev.menu.UploadSpeed.2400.upload.speed=2400
215+
Air401Dev.menu.UploadSpeed.1200=1200
216+
Air401Dev.menu.UploadSpeed.1200.upload.speed=1200
217+
218+
# HSI/HSE选择和主频
219+
220+
Air401Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M=HSI 24Mhz, HCLK 24Mhz
221+
Air401Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.temp=-D{build.series}_HSI_24M_HCLK_24M
222+
Air401Dev.menu.ClockSourceAndFrequency.HSI24M_HCLK24M.build.f_cpu=24000000L
223+
224+
Air401Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M=HSE 24Mhz, HCLK 24Mhz
225+
Air401Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.temp=-D{build.series}_HSE_24M_HCLK_24M
226+
Air401Dev.menu.ClockSourceAndFrequency.HSE24M_HCLK24M.build.f_cpu=24000000L
227+
228+
Air401Dev.menu.LowSpeedClockSource.None=None
229+
Air401Dev.menu.LowSpeedClockSource.None.build.lsc_temp=-D{build.series}_LSC_NONE
230+
231+
Air401Dev.menu.LowSpeedClockSource.LSI=LSI 32.768Khz
232+
Air401Dev.menu.LowSpeedClockSource.LSI.build.lsc_temp=-D{build.series}_LSC_LSI
233+
234+
Air401Dev.menu.LowSpeedClockSource.LSE=LSE 32.768Khz
235+
Air401Dev.menu.LowSpeedClockSource.LSE.build.lsc_temp=-D{build.series}_LSC_LSE
236+
237+
Air401Dev.menu.xserial.generic=Enabled (generic 'Serial')
238+
Air401Dev.menu.xserial.none=Enabled (no generic 'Serial')
239+
Air401Dev.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
240+
Air401Dev.menu.xserial.disabled=Disabled (no Serial support)
241+
Air401Dev.menu.xserial.disabled.build.xSerial=
242+
243+
# debug
244+
Air401Dev.menu.dbg.none=None
245+
Air401Dev.menu.dbg.enable_sym=Symbols Enabled (-g)
246+
Air401Dev.menu.dbg.enable_sym.build.flags.debug=-g -DNDEBUG
247+
Air401Dev.menu.dbg.enable_log=Core logs Enabled
248+
Air401Dev.menu.dbg.enable_log.build.flags.debug=
249+
Air401Dev.menu.dbg.enable_all=Core Logs and Symbols Enabled (-g)
250+
Air401Dev.menu.dbg.enable_all.build.flags.debug=-g
251+
252+
# optimize
253+
Air401Dev.menu.opt.osstd=Smallest (-Os default)
254+
Air401Dev.menu.opt.oslto=Smallest (-Os) with LTO
255+
Air401Dev.menu.opt.oslto.build.flags.optimize=-Os -flto
256+
Air401Dev.menu.opt.o1std=Fast (-O1)
257+
Air401Dev.menu.opt.o1std.build.flags.optimize=-O1
258+
Air401Dev.menu.opt.o1lto=Fast (-O1) with LTO
259+
Air401Dev.menu.opt.o1lto.build.flags.optimize=-O1 -flto
260+
Air401Dev.menu.opt.o2std=Faster (-O2)
261+
Air401Dev.menu.opt.o2std.build.flags.optimize=-O2
262+
Air401Dev.menu.opt.o2lto=Faster (-O2) with LTO
263+
Air401Dev.menu.opt.o2lto.build.flags.optimize=-O2 -flto
264+
Air401Dev.menu.opt.o3std=Fastest (-O3)
265+
Air401Dev.menu.opt.o3std.build.flags.optimize=-O3
266+
Air401Dev.menu.opt.o3lto=Fastest (-O3) with LTO
267+
Air401Dev.menu.opt.o3lto.build.flags.optimize=-O3 -flto
268+
Air401Dev.menu.opt.ogstd=Debug (-Og)
269+
Air401Dev.menu.opt.ogstd.build.flags.optimize=-Og
270+
Air401Dev.menu.opt.o0std=No Optimization (-O0)
271+
Air401Dev.menu.opt.o0std.build.flags.optimize=-O0
272+
273+
Air401Dev.menu.SupplyVoltage.3V3=3.3V
274+
Air401Dev.menu.SupplyVoltage.3V3.build.sv_tmp=-DVDD_3V3
275+
Air401Dev.menu.SupplyVoltage.1V8=1.8V
276+
Air401Dev.menu.SupplyVoltage.3V3.build.sv_tmp=-DVDD_1V8
277+
Air401Dev.menu.SupplyVoltage.2V5=2.5V
278+
Air401Dev.menu.SupplyVoltage.3V3.build.sv_tmp=-DVDD_2V5
279+
Air401Dev.menu.SupplyVoltage.2V8=2.8V
280+
Air401Dev.menu.SupplyVoltage.3V3.build.sv_tmp=-DVDD_2V8
281+
Air401Dev.menu.SupplyVoltage.3V8=3.8V
282+
Air401Dev.menu.SupplyVoltage.3V3.build.sv_tmp=-DVDD_3V8
283+
Air401Dev.menu.SupplyVoltage.5V=5V
284+
Air401Dev.menu.SupplyVoltage.5V.build.sv_tmp=-DVDD_5V
285+
286+
# boot
287+
Air401Dev.menu.BootConnection.defaule=default isp circuit
288+
Air401Dev.menu.BootConnection.defaule.upload.boot=default_reset
289+
Air401Dev.menu.BootConnection.direct=direct connect
290+
Air401Dev.menu.BootConnection.direct.upload.boot=direct_connect
291+
292+
Air401Dev.build.extra_flags={build.temp} -DF_CPU={build.f_cpu} {build.lsc_temp} {build.sv_tmp} -DAIR401_DEV
179293

180294
###############################
181295
# Air32F103xx

cores/AirMCU/air/LL/airyyxx_ll_adc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_adc.h"
13+
#elif defined(AIR401xx)
14+
#include "air401xx_ll_adc.h"
1315
#elif defined(AIR32F103xx)
1416
#include "air32f1xx_ll_adc.h"
1517
#endif

cores/AirMCU/air/LL/airyyxx_ll_bus.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_bus.h"
13+
#elif defined(AIR401xxs)
14+
#include "air401xx_ll_bus.h"
1315
#elif defined(AIR32F103xx)
1416
#include "air32f1xx_ll_bus.h"
1517
#endif

cores/AirMCU/air/LL/airyyxx_ll_comp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_comp.h"
13+
#elif defined(AIR401xx)
14+
#include "air401xx_ll_comp.h"
1315
#elif defined(AIR32F103xx)
1416
#include "air32f1xx_ll_comp.h"
1517
#endif

cores/AirMCU/air/LL/airyyxx_ll_cortex.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_cortex.h"
13+
#elif defined AIR401xx
14+
#include "air401xx_ll_cortex.h"
1315
#elif defined AIR32F103xx
1416
#include "air32f1xx_ll_cortex.h"
1517
#endif

cores/AirMCU/air/LL/airyyxx_ll_crc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_crc.h"
13+
#elif defined(AIR401xx)
14+
#include "air401xx_ll_crc.h"
1315
#elif defined(AIR32F103xx)
1416
#include "air32f1xx_ll_crc.h"
1517
#endif

cores/AirMCU/air/LL/airyyxx_ll_exti.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_exti.h"
13+
#elif defined(AIR401xx)
14+
#include "air401xx_ll_exti.h"
1315
#elif defined(AIR32F103xx)
1416
#include "air32f1xx_ll_exti.h"
1517
#endif

cores/AirMCU/air/LL/airyyxx_ll_gpio.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_gpio.h"
13+
#elif defined(AIR401xx)
14+
#include "air401xx_ll_gpio.h"
1315
#elif defined(AIR32F103xx)
1416
#include "air32f1xx_ll_gpio.h"
1517
#endif

cores/AirMCU/air/LL/airyyxx_ll_i2c.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#ifdef AIR001xx
1212
#include "air001xx_ll_i2c.h"
13+
#elif defined(AIR401xx)
14+
#include "air401xx_ll_i2c.h"
1315
#elif
1416
#include "air32f1xx_ll_i2c.h"
1517
#endif

0 commit comments

Comments
 (0)