Skip to content

Commit e5d314d

Browse files
authored
Merge pull request #407 from qmk-arterytek/at32f415_update
New patch update for AT32F415
2 parents 5621625 + d839f5d commit e5d314d

File tree

143 files changed

+20353
-2995
lines changed

Some content is hidden

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

143 files changed

+20353
-2995
lines changed

demos/AT32/.keep

Whitespace-only changes.

testhal/AT32/AT32F415/USB_CDC/.cproject renamed to demos/AT32/RT-AT-START-F415/.cproject

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
33
<storageModule moduleId="org.eclipse.cdt.core.settings">
4-
<cconfiguration id="0.539548154">
5-
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.539548154" moduleId="org.eclipse.cdt.core.settings" name="Default">
4+
<cconfiguration id="0.1413744523">
5+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1413744523" moduleId="org.eclipse.cdt.core.settings" name="Default">
66
<externalSettings/>
77
<extensions>
88
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
@@ -14,20 +14,20 @@
1414
</extensions>
1515
</storageModule>
1616
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
17-
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.539548154" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
18-
<folderInfo id="0.539548154." name="/" resourcePath="">
19-
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1743759718" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
20-
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1743759718.163416004" name=""/>
21-
<builder autoBuildTarget="all" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.1496776929" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
22-
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1194238367" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
23-
<tool id="org.eclipse.cdt.build.core.settings.holder.781013241" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
24-
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.424462599" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
17+
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1413744523" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
18+
<folderInfo id="0.1413744523." name="/" resourcePath="">
19+
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.269595716" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
20+
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.269595716.1141107066" name=""/>
21+
<builder autoBuildTarget="all" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.2129274930" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
22+
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1772759319" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
23+
<tool id="org.eclipse.cdt.build.core.settings.holder.2136515191" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
24+
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1437726415" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
2525
</tool>
26-
<tool id="org.eclipse.cdt.build.core.settings.holder.1280737601" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
27-
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.49735864" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
26+
<tool id="org.eclipse.cdt.build.core.settings.holder.1423420271" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
27+
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1083076961" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
2828
</tool>
29-
<tool id="org.eclipse.cdt.build.core.settings.holder.1205432135" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
30-
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1755774820" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
29+
<tool id="org.eclipse.cdt.build.core.settings.holder.1120713120" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
30+
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.279633077" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
3131
</tool>
3232
</toolChain>
3333
</folderInfo>
@@ -37,18 +37,18 @@
3737
</cconfiguration>
3838
</storageModule>
3939
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
40-
<project id="RT-STM32F103RB-NUCLEO64.null.494699019" name="RT-STM32F103RB-NUCLEO64"/>
40+
<project id="RT-STM32F103-MAPLEMINI.null.1831709739" name="RT-STM32F103-MAPLEMINI"/>
4141
</storageModule>
4242
<storageModule moduleId="scannerConfiguration">
4343
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
44-
<scannerConfigBuildInfo instanceId="0.539548154">
44+
<scannerConfigBuildInfo instanceId="0.1413744523">
4545
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
4646
</scannerConfigBuildInfo>
4747
</storageModule>
4848
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
4949
<storageModule moduleId="refreshScope" versionNumber="2">
5050
<configuration configurationName="Default">
51-
<resource resourceType="PROJECT" workspacePath="/RT-STM32F103RB-NUCLEO64"/>
51+
<resource resourceType="PROJECT" workspacePath="/RT-STM32F103-MAPLEMINI"/>
5252
</configuration>
5353
</storageModule>
5454
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>

demos/AT32/RT-AT-START-F415/.project

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>RT-AT-START-F415</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
<dictionary>
13+
<key>?name?</key>
14+
<value></value>
15+
</dictionary>
16+
<dictionary>
17+
<key>org.eclipse.cdt.make.core.append_environment</key>
18+
<value>true</value>
19+
</dictionary>
20+
<dictionary>
21+
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
22+
<value>all</value>
23+
</dictionary>
24+
<dictionary>
25+
<key>org.eclipse.cdt.make.core.buildArguments</key>
26+
<value></value>
27+
</dictionary>
28+
<dictionary>
29+
<key>org.eclipse.cdt.make.core.buildCommand</key>
30+
<value>mingw32-make</value>
31+
</dictionary>
32+
<dictionary>
33+
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
34+
<value>clean</value>
35+
</dictionary>
36+
<dictionary>
37+
<key>org.eclipse.cdt.make.core.contents</key>
38+
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
39+
</dictionary>
40+
<dictionary>
41+
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
42+
<value>false</value>
43+
</dictionary>
44+
<dictionary>
45+
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
46+
<value>true</value>
47+
</dictionary>
48+
<dictionary>
49+
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
50+
<value>true</value>
51+
</dictionary>
52+
<dictionary>
53+
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
54+
<value>all</value>
55+
</dictionary>
56+
<dictionary>
57+
<key>org.eclipse.cdt.make.core.stopOnError</key>
58+
<value>true</value>
59+
</dictionary>
60+
<dictionary>
61+
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
62+
<value>false</value>
63+
</dictionary>
64+
</arguments>
65+
</buildCommand>
66+
<buildCommand>
67+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
68+
<triggers>full,incremental,</triggers>
69+
<arguments>
70+
</arguments>
71+
</buildCommand>
72+
</buildSpec>
73+
<natures>
74+
<nature>org.eclipse.cdt.core.cnature</nature>
75+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
76+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
77+
</natures>
78+
</projectDescription>

testhal/AT32/AT32F415/USB_CDC/Makefile renamed to demos/AT32/RT-AT-START-F415/Makefile

Lines changed: 25 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ endif
1010

1111
# C specific options here (added to USE_OPT).
1212
ifeq ($(USE_COPT),)
13-
USE_COPT =
13+
USE_COPT =
1414
endif
1515

1616
# C++ specific options here (added to USE_OPT).
@@ -25,19 +25,14 @@ endif
2525

2626
# Linker extra options here.
2727
ifeq ($(USE_LDOPT),)
28-
USE_LDOPT =
28+
USE_LDOPT =
2929
endif
3030

3131
# Enable this if you want link time optimizations (LTO).
3232
ifeq ($(USE_LTO),)
3333
USE_LTO = yes
3434
endif
3535

36-
# If enabled, this option allows to compile the application in THUMB mode.
37-
ifeq ($(USE_THUMB),)
38-
USE_THUMB = yes
39-
endif
40-
4136
# Enable this if you want to see the full log while compiling.
4237
ifeq ($(USE_VERBOSE_COMPILE),)
4338
USE_VERBOSE_COMPILE = no
@@ -49,6 +44,11 @@ ifeq ($(USE_SMART_BUILD),)
4944
USE_SMART_BUILD = yes
5045
endif
5146

47+
# Enable this if you want to use bitbang I2C.
48+
ifeq ($(USE_HAL_I2C_FALLBACK),)
49+
USE_HAL_I2C_FALLBACK = no
50+
endif
51+
5252
#
5353
# Build global options
5454
##############################################################################
@@ -74,6 +74,11 @@ ifeq ($(USE_FPU),)
7474
USE_FPU = no
7575
endif
7676

77+
# FPU-related options.
78+
ifeq ($(USE_FPU_OPT),)
79+
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
80+
endif
81+
7782
#
7883
# Architecture or project specific options
7984
##############################################################################
@@ -85,9 +90,12 @@ endif
8590
# Define project name here
8691
PROJECT = ch
8792

93+
# Target settings.
94+
MCU = cortex-m4
95+
8896
# Imported source files and paths.
89-
CHIBIOS := ../../../../../ChibiOS
90-
CHIBIOS_CONTRIB := ../../../../
97+
CHIBIOS := ../../../../ChibiOS
98+
CHIBIOS_CONTRIB := ../../..
9199
CONFDIR := ./cfg
92100
BUILDDIR := ./build
93101
DEPDIR := ./.dep
@@ -104,95 +112,45 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
104112
# RTOS files (optional).
105113
include $(CHIBIOS)/os/rt/rt.mk
106114
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
115+
# Auto-build files in ./source recursively.
116+
include $(CHIBIOS)/tools/mk/autobuild.mk
107117
# Other files (optional).
108118
include $(CHIBIOS)/os/test/test.mk
109119
include $(CHIBIOS)/test/rt/rt_test.mk
110120
include $(CHIBIOS)/test/oslib/oslib_test.mk
111121
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
112122
include $(CHIBIOS)/os/various/shell/shell.mk
113123

114-
# Define linker script file here
124+
# Define linker script file here.
115125
LDSCRIPT= $(STARTUPLD_CONTRIB)/AT32F415xC.ld
116126

117127
# C sources that can be compiled in ARM or THUMB mode depending on the global
118128
# setting.
119129
CSRC = $(ALLCSRC) \
120130
$(TESTSRC) \
121-
usbcfg.c main.c
131+
main.c
122132

123133
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
124134
# setting.
125135
CPPSRC = $(ALLCPPSRC)
126136

127-
# C sources to be compiled in ARM mode regardless of the global setting.
128-
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
129-
# option that results in lower performance and larger code size.
130-
ACSRC =
131-
132-
# C++ sources to be compiled in ARM mode regardless of the global setting.
133-
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
134-
# option that results in lower performance and larger code size.
135-
ACPPSRC =
136-
137-
# C sources to be compiled in THUMB mode regardless of the global setting.
138-
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
139-
# option that results in lower performance and larger code size.
140-
TCSRC =
141-
142-
# C sources to be compiled in THUMB mode regardless of the global setting.
143-
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
144-
# option that results in lower performance and larger code size.
145-
TCPPSRC =
146-
147137
# List ASM source files here.
148138
ASMSRC = $(ALLASMSRC)
139+
149140
# List ASM with preprocessor source files here.
150141
ASMXSRC = $(ALLXASMSRC)
151142

152143
# Inclusion directories.
153144
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
154145

155-
#
156-
# Project, sources and paths
157-
##############################################################################
158-
159-
##############################################################################
160-
# Compiler settings
161-
#
162-
163-
MCU = cortex-m4
164-
165-
#TRGT = arm-elf-
166-
TRGT = arm-none-eabi-
167-
CC = $(TRGT)gcc
168-
CPPC = $(TRGT)g++
169-
# Enable loading with g++ only if you need C++ runtime support.
170-
# NOTE: You can use C++ even without C++ support if you are careful. C++
171-
# runtime support makes code size explode.
172-
LD = $(TRGT)gcc
173-
#LD = $(TRGT)g++
174-
CP = $(TRGT)objcopy
175-
AS = $(TRGT)gcc -x assembler-with-cpp
176-
AR = $(TRGT)ar
177-
OD = $(TRGT)objdump
178-
SZ = $(TRGT)size
179-
HEX = $(CP) -O ihex
180-
BIN = $(CP) -O binary
181-
182-
# ARM-specific options here
183-
AOPT =
184-
185-
# THUMB-specific options here
186-
TOPT = -mthumb -DTHUMB
187-
188146
# Define C warning options here.
189147
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
190148

191149
# Define C++ warning options here.
192150
CPPWARN = -Wall -Wextra -Wundef
193151

194152
#
195-
# Compiler settings
153+
# Project, target, sources and paths
196154
##############################################################################
197155

198156
##############################################################################
@@ -215,14 +173,15 @@ ULIBDIR =
215173
ULIBS =
216174

217175
#
218-
# End of user defines
176+
# End of user section
219177
##############################################################################
220178

221179
##############################################################################
222180
# Common rules
223181
#
224182

225183
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
184+
include $(RULESPATH)/arm-none-eabi.mk
226185
include $(RULESPATH)/rules.mk
227186

228187
#

testhal/AT32/AT32F415/PWM-ICU/cfg/chconf.h renamed to demos/AT32/RT-AT-START-F415/cfg/chconf.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,19 @@
141141
#define CH_CFG_NO_IDLE_THREAD FALSE
142142
#endif
143143

144+
/**
145+
* @brief Kernel hardening level.
146+
* @details This option is the level of functional-safety checks enabled
147+
* in the kerkel. The meaning is:
148+
* - 0: No checks, maximum performance.
149+
* - 1: Reasonable checks.
150+
* - 2: All checks.
151+
* .
152+
*/
153+
#if !defined(CH_CFG_HARDENING_LEVEL)
154+
#define CH_CFG_HARDENING_LEVEL 0
155+
#endif
156+
144157
/** @} */
145158

146159
/*===========================================================================*/
@@ -362,6 +375,16 @@
362375
#define CH_CFG_USE_MAILBOXES TRUE
363376
#endif
364377

378+
/**
379+
* @brief Memory checks APIs.
380+
* @details If enabled then the memory checks APIs are included in the kernel.
381+
*
382+
* @note The default is @p TRUE.
383+
*/
384+
#if !defined(CH_CFG_USE_MEMCHECKS)
385+
#define CH_CFG_USE_MEMCHECKS TRUE
386+
#endif
387+
365388
/**
366389
* @brief Core Memory Manager APIs.
367390
* @details If enabled then the core memory manager APIs are included

0 commit comments

Comments
 (0)