Merge pull request #4 from ZYQ-FEIYUE/main

support linux system
This commit is contained in:
WeAct Studio
2022-08-09 22:45:14 +08:00
committed by GitHub
130 changed files with 98 additions and 12 deletions

View File

@@ -13,7 +13,7 @@ WeActStudioAT32F4.build.core=arduino
WeActStudioAT32F4.build.extra_flags=-DAT32F403ACGU7 -USE_STDPERIPH_DRIVER
WeActStudioAT32F4.build.variant=AT32F403ACGU7
WeActStudioAT32F4.build.variant_system_lib=FrameLib.a
WeActStudioAT32F4.build.ldscript=linker_scripts\AT32F403AxG_FLASH.ld
WeActStudioAT32F4.build.ldscript=linker_scripts/AT32F403AxG_FLASH.ld
WeActStudioAT32F4.menu.pll_clock_source.hext_div2=high speed external crystal div 2
WeActStudioAT32F4.menu.pll_clock_source.hext_div2.build.f_pll_clock_source=2

View File

@@ -55,7 +55,7 @@ extern "C" {
#define max(a,b) ((a)>(b)?(a):(b))
#define ABS(x) (((x)>0)?(x):-(x)) //abs(x) is define in stdlib.h
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
//#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define radians(deg) ((deg)*DEG_TO_RAD)
#define degrees(rad) ((rad)*RAD_TO_DEG)
#define sq(x) ((x)*(x))
@@ -111,8 +111,8 @@ void yield(void);
# include "WCharacter.h"
# include "WString.h"
# include "WMath.h"
# include <libcore/Tone.h>
# include <libcore/HardwareSerial.h>
# include <Tone.h>
# include <HardwareSerial.h>
#endif
#endif

View File

@@ -44,7 +44,7 @@
#define SPI_I2S_GET_FLAG(spix, SPI_I2S_FLAG) (spix->sts & SPI_I2S_FLAG)
#define SPI_I2S_RXDATA(spix) (spix->dt)
#define SPI_I2S_RXDATA_VOLATILE(spix) volatile uint16_t vn = SPI_I2S_RXDATA(spix)
#define SPI_I2S_RXDATA_VOLATILE(spix) do{ volatile uint16_t vn = SPI_I2S_RXDATA(spix); vn = vn; } while(0)
#define SPI_I2S_TXDATA(spix, data) (spix->dt = (data))
#define SPI_I2S_WAIT_RX(spix) do{ while (!SPI_I2S_GET_FLAG(spix, SPI_I2S_RDBF_FLAG)); } while(0)
#define SPI_I2S_WAIT_TX(spix) do{ while (!SPI_I2S_GET_FLAG(spix, SPI_I2S_TDBE_FLAG)); } while(0)

View File

@@ -23,7 +23,7 @@
#ifndef __TONE_H
#define __TONE_H
#include "timer.h"
#include "libcore/timer.h"
#define TONE_DURATION_INFINITE 0xFFFFFFFFU

86
package_at32_index.json Normal file
View File

@@ -0,0 +1,86 @@
{
"packages": [
{
"name": "WeActStudio",
"maintainer": "WeActStudio",
"email": "",
"websiteURL": "https://github.com/WeActStudio/ArduinoCore-AT32F4/",
"help": {
"online": "https://github.com/WeActStudio/ArduinoCore-AT32F4/"
},
"platforms": [
{
"name": "AT32F403ACGU7 Core Board",
"architecture": "at32f403a",
"version": "0.0.1",
"category": "Contributed",
"url": "https://github.com/WeActStudio/ArduinoCore-AT32F4/archive/refs/heads/main.zip",
"archiveFileName": "ArduinoCore-AT32F4-main.zip",
"help": {
"online": ""
},
"boards": [
{
"name": "BlackPill AT32F403ACGU7"
}
],
"toolsDependencies": [
{
"packager": "WeActStudio",
"name": "xpack-arm-none-eabi-gcc",
"version": "11.2.1-1.2"
},
{
"packager": "WeActStudio",
"name": "Artery_ISP_Console",
"version": "0.0.1"
}
]
}
],
"tools": [
{
"name": "xpack-arm-none-eabi-gcc",
"version": "11.2.1-1.2",
"systems": [
{
"host": "i686-mingw32",
"url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-win32-x64.zip",
"archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-win32-x64.zip",
"checksum": "SHA-256:4a45e1df1c621f0a97a2bcb63977a3745ffcff7afc0e31ad2f3d5cc1272acf4b",
"size": "247612940"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64.tar.gz",
"archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64.tar.gz",
"checksum": "SHA-256:7479becc1ea98fbceecadf1f036ddaba8dc39c9cce5cb45f0a7a36e923d33c9a",
"size": "235243515"
}
]
},
{
"name": "Artery_ISP_Console",
"version": "0.0.1",
"systems": [
{
"host": "i686-mingw32",
"url": "https://github.com/WeActStudio/ArduinoCore-AT32F4/releases/download/0.0.1/Artery_ISP_Console_Win_V3.0.01.zip",
"archiveFileName": "Artery_ISP_Console_Win_V3.0.01.zip",
"size": "3890476",
"checksum": "SHA-256:785979348d5c6b9451650d2ba22233825f362d46adfdfb1e4794e3866b4d034f"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/WeActStudio/ArduinoCore-AT32F4/releases/download/0.0.1/Artery_ISP_Console_Linux_V3.0.01.tar.bz2",
"archiveFileName": "Artery_ISP_Console_Linux_V3.0.01.tar.bz2",
"size": "14810873",
"checksum": "SHA-256:ee2f97a878735e43f114c5ee806064e3a0e8d2a5eeb0879d9fbe31d5b8e02078"
}
]
}
]
}
]
}

View File

@@ -6,7 +6,7 @@ version=0.0.1
####AT32 compile variables
## compiler variables
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}\bin\
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/
##All the command
compiler.asm.cmd=arm-none-eabi-gcc
@@ -32,7 +32,7 @@ build.common_flags=-mthumb
##===============================================##
## In there,set the include path,for FrameLib use
compiler.FrameLib.c.flags="-I{build.system.path}\Drivers\CMSIS\Include" "-I{build.system.path}\AT32F403A" "-I{build.system.path}\Drivers\Firmware\inc" "-I{build.system.path}\libcore" "-I{build.system.path}\libcore\config"
compiler.FrameLib.c.flags="-I{build.system.path}/Drivers/CMSIS/Include" "-I{build.system.path}/AT32F403A" "-I{build.system.path}/Drivers/Firmware/inc" "-I{build.system.path}/libcore" "-I{build.system.path}/libcore/config"
##===============================================##
@@ -44,7 +44,7 @@ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -m
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}"
recipe.c.combine.pattern="{compiler.path}{compiler.elf.cmd}" {compiler.elf.flags} -mcpu={build.mcu} "-L{build.variant.path}" "-T{build.variant.path}\{build.ldscript}" {object_files} "{archive_file_path}" "{build.variant.path}\{build.variant_system_lib}" -o "{build.path}/{build.project_name}.elf"
recipe.c.combine.pattern="{compiler.path}{compiler.elf.cmd}" {compiler.elf.flags} -mcpu={build.mcu} "-L{build.variant.path}" "-T{build.variant.path}/{build.ldscript}" {object_files} "{archive_file_path}" "{build.variant.path}/{build.variant_system_lib}" -o "{build.path}/{build.project_name}.elf"
##recipe.c.combine.pattern="{compiler.path}{compiler.elf.cmd}" {compiler.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} -Wl,--whole-archive "{archive_file_path}" -Wl,--no-whole-archive -Wl,--end-group
recipe.objcopy.eep.pattern=
@@ -53,16 +53,16 @@ recipe.objcopy.hex.pattern="{compiler.path}{compiler.hex.cmd}" {compiler.hex.fla
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=\.text\s+([0-9]+).*
recipe.size.regex=/.text/s+([0-9]+).*
# Uploader tools
# -------------------
tools.Artery_ISP_Console.cmd=WeAct Studio Download Tool.bat
tools.Artery_ISP_Console.cmd=DFU_download.sh
tools.Artery_ISP_Console.cmd.windows=WeAct Studio Download Tool.bat
tools.Artery_ISP_Console.path={runtime.tools.Artery_ISP_Console.path}
tools.Artery_ISP_Console.upload.params.verbose=-d
tools.Artery_ISP_Console.upload.params.quiet=
tools.Artery_ISP_Console.upload.pattern="{path}\{cmd}" "{build.path}/{build.project_name}.hex"
tools.Artery_ISP_Console.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.hex"

Some files were not shown because too many files have changed in this diff Show More