Added AT32F425

This commit is contained in:
V24473
2022-03-25 19:10:10 +08:00
parent 6a27b4ad69
commit f2cb3b41a2
78 changed files with 25932 additions and 97 deletions

View File

@@ -1 +0,0 @@
custom: https://platformio.org/donate

View File

@@ -1,76 +0,0 @@
name: Examples
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
python-version: [3.7]
example:
- "examples/arduino-blink"
- "examples/arduino-external-libs"
- "examples/arduino-internal-libs"
- "examples/arduino-mbed-doom"
- "examples/arduino-mbed-rpc"
- "examples/arduino-mxchip-azureiot"
- "examples/arduino-mxchip-filesystem"
- "examples/arduino-mxchip-sensors"
- "examples/arduino-mxchip-wifiscan"
- "examples/cmsis-blink"
- "examples/libopencm3-1bitsy"
- "examples/libopencm3-blink"
- "examples/libopencm3-usb-cdcacm"
- "examples/mbed-rtos-blink-baremetal"
- "examples/mbed-rtos-custom-target"
- "examples/mbed-rtos-ethernet-tls"
- "examples/mbed-rtos-events"
- "examples/mbed-rtos-filesystem"
- "examples/mbed-rtos-mesh-minimal"
- "examples/mbed-rtos-serial"
- "examples/mbed-rtos-usb-keyboard"
- "examples/mbed-rtos-wifi"
- "examples/mbed-legacy-examples/mbed-blink"
- "examples/mbed-legacy-examples/mbed-custom-target"
- "examples/mbed-legacy-examples/mbed-dsp"
- "examples/mbed-legacy-examples/mbed-events"
- "examples/mbed-legacy-examples/mbed-filesystem"
- "examples/mbed-legacy-examples/mbed-rtos"
- "examples/mbed-legacy-examples/mbed-rtos-ethernet-tls"
- "examples/mbed-legacy-examples/mbed-rtos-mesh-minimal"
- "examples/mbed-legacy-examples/mbed-serial"
- "examples/spl-blink"
- "examples/stm32cube-hal-blink"
- "examples/stm32cube-hal-eeprom-emulation"
- "examples/stm32cube-hal-extmem-boot"
- "examples/stm32cube-hal-iap"
- "examples/stm32cube-hal-lcd"
- "examples/stm32cube-hal-usb-device-dfu"
- "examples/stm32cube-hal-wifi-client"
- "examples/stm32cube-ll-blink"
- "examples/zephyr-blink"
- "examples/zephyr-cpp-synchronization"
- "examples/zephyr-drivers-can"
- "examples/zephyr-net-civetweb"
- "examples/zephyr-net-https-client"
- "examples/zephyr-subsys-usb-hid-mouse"
- "tests/arduino-blink-different-cores"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install file://.
- name: Build examples
run: |
platformio run -d ${{ matrix.example }}

View File

@@ -0,0 +1,47 @@
{
"build": {
"core": "at32",
"cpu": "cortex-m4",
"extra_flags": "-DAT32F425R8T7 -DAT_START_F425_V1",
"f_cpu": "96000000L",
"hwids": [
[
"0x2E3C",
"0xDF11"
]
],
"mcu": "at32f425x8",
"product_line": "AT32F425",
"variant": "AT32F4xx/F425(T-U)"
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "AT32F425x8x",
"openocd_extra_args": [
"-c",
"reset_config none"
],
"openocd_target": "stm32f4x",
"svd_path": "STM32F425xx.svd"
},
"frameworks": [
"cmsis"
],
"name": "AT-START-F425",
"upload": {
"maximum_ram_size": 20480,
"maximum_size": 65536,
"protocol": "serial",
"protocols": [
"jlink",
"cmsis-dap",
"stlink",
"serial",
"blackmagic"
]
},
"url": "https://www.arterychip.com/en/product/AT32F425.jsp",
"vendor": "Artery"
}

View File

@@ -24,7 +24,7 @@ env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],
CCFLAGS=[
"-Os", # optimize for size
"-O3", # optimize for size
"-ffunction-sections", # place each function in its own section
"-fdata-sections",
"-Wall",
@@ -41,7 +41,7 @@ env.Append(
],
LINKFLAGS=[
"-Os",
"-O3",
"-Wl,--gc-sections,--relax",
"-mthumb",
],
@@ -50,14 +50,15 @@ env.Append(
)
#Floating point unit: hard (hardware) | softfp (software)
if (
any(cpu in board_config.get("build.cpu") for cpu in ("cortex-m4"))
):
env.Append(
CFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"],
CCFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"],
LINKFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"],
)
#if (
# any(cpu in board_config.get("build.cpu") for cpu in ("cortex-m4"))
#):
# env.Append(
# CFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"],
# CCFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"],
# LINKFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard", "-u _printf_float"],
# )
if "BOARD" in env:
env.Append(

View File

@@ -58,7 +58,7 @@ SConscript(build_script)
CMSIS_DIR = platform.get_package_dir("framework-cmsis")
CMSIS_DEVICE_DIR = platform.get_package_dir("framework-cmsis-" + mcu[0:7])
LDSCRIPTS_DIR = platform.get_package_dir("tool-ldscripts-at32")
LDSCRIPTS_DIR = join('%s' % platform.get_dir() or "", "ldscripts")
assert all(os.path.isdir(d) for d in (CMSIS_DIR, CMSIS_DEVICE_DIR, LDSCRIPTS_DIR))
@@ -81,9 +81,9 @@ def generate_ldscript(default_ldscript_path):
def get_linker_script():
ldscript_match = glob.glob(os.path.join(
LDSCRIPTS_DIR, mcu[0:7], mcu[0:11].upper() + "*_FLASH.ld"))
#print(os.path.join(LDSCRIPTS_DIR, mcu[0:7], mcu[0:11].upper() + "*_FLASH.ld"))
if ldscript_match and os.path.isfile(ldscript_match[0]):
print("LD Script file: " +ldscript_match[0])
return ldscript_match[0]
default_ldscript = os.path.join(
@@ -99,7 +99,7 @@ def get_linker_script():
def prepare_startup_file(src_path):
startup_file = os.path.join(src_path, "gcc", "startup_%s.S" % product_line.lower())
startup_file = os.path.join(src_path, "gcc", "startup_%s.s" % product_line.lower())
print("Startup file: " + startup_file)
# Change file extension to uppercase:
if not os.path.isfile(startup_file) and os.path.isfile(startup_file[:-2] + ".s"):

View File

@@ -0,0 +1,2 @@
.pio
.vscode

View File

@@ -0,0 +1,67 @@
# Continuous Integration (CI) is the practice, in software
# engineering, of merging all developer working copies with a shared mainline
# several times a day < https://docs.platformio.org/page/ci/index.html >
#
# Documentation:
#
# * Travis CI Embedded Builds with PlatformIO
# < https://docs.travis-ci.com/user/integration/platformio/ >
#
# * PlatformIO integration with Travis CI
# < https://docs.platformio.org/page/ci/travis.html >
#
# * User Guide for `platformio ci` command
# < https://docs.platformio.org/page/userguide/cmd_ci.html >
#
#
# Please choose one of the following templates (proposed below) and uncomment
# it (remove "# " before each line) or use own configuration according to the
# Travis CI documentation (see above).
#
#
# Template #1: General project. Test it using existing `platformio.ini`.
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio run
#
# Template #2: The project is intended to be used as a library with examples.
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# env:
# - PLATFORMIO_CI_SRC=path/to/test/file.c
# - PLATFORMIO_CI_SRC=examples/file.ino
# - PLATFORMIO_CI_SRC=path/to/test/directory
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N

View File

@@ -0,0 +1,46 @@
/**
**************************************************************************
* @file at32f425_clock.h
* @version v2.0.0
* @date 2021-12-31
* @brief header file of clock program
**************************************************************************
* Copyright notice & Disclaimer
*
* The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery.
* Artery authorizes customers to use, copy, and distribute the BSP
* software and its related documentation for the purpose of design and
* development in conjunction with Artery microcontrollers. Use of the
* software is governed by this copyright notice and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
*
**************************************************************************
*/
/* define to prevent recursive inclusion -------------------------------------*/
#ifndef __AT32F425_CLOCK_H
#define __AT32F425_CLOCK_H
#ifdef __cplusplus
extern "C" {
#endif
/* includes ------------------------------------------------------------------*/
#include "at32f425.h"
/* exported functions ------------------------------------------------------- */
void system_clock_config(void);
#ifdef __cplusplus
}
#endif
#endif /* __AT32F425_CLOCK_H */

View File

@@ -0,0 +1,146 @@
/**
**************************************************************************
* @file at32f425_conf.h
* @version v2.0.0
* @date 2021-12-31
* @brief at32f425 config header file
**************************************************************************
* Copyright notice & Disclaimer
*
* The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery.
* Artery authorizes customers to use, copy, and distribute the BSP
* software and its related documentation for the purpose of design and
* development in conjunction with Artery microcontrollers. Use of the
* software is governed by this copyright notice and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
*
**************************************************************************
*/
/* define to prevent recursive inclusion -------------------------------------*/
#ifndef __AT32F425_CONF_H
#define __AT32F425_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief in the following line adjust the value of high speed exernal crystal (hext)
* used in your application
*
* tip: to avoid modifying this file each time you need to use different hext, you
* can define the hext value in your toolchain compiler preprocessor.
*
*/
#if !defined HEXT_VALUE
#define HEXT_VALUE ((uint32_t)8000000) /*!< value of the high speed exernal crystal in hz */
#endif
/**
* @brief in the following line adjust the high speed exernal crystal (hext) startup
* timeout value
*/
#define HEXT_STARTUP_TIMEOUT ((uint16_t)0x3000) /*!< time out for hext start up */
#define HICK_VALUE ((uint32_t)8000000) /*!< value of the high speed internal clock in hz */
/* module define -------------------------------------------------------------*/
#define ACC_MODULE_ENABLED
#define CRM_MODULE_ENABLED
#define TMR_MODULE_ENABLED
#define ERTC_MODULE_ENABLED
#define GPIO_MODULE_ENABLED
#define I2C_MODULE_ENABLED
#define CAN_MODULE_ENABLED
#define USB_MODULE_ENABLED
#define USART_MODULE_ENABLED
#define PWC_MODULE_ENABLED
#define ADC_MODULE_ENABLED
#define SPI_MODULE_ENABLED
#define DMA_MODULE_ENABLED
#define DEBUG_MODULE_ENABLED
#define FLASH_MODULE_ENABLED
#define CRC_MODULE_ENABLED
#define WWDT_MODULE_ENABLED
#define WDT_MODULE_ENABLED
#define EXINT_MODULE_ENABLED
#define MISC_MODULE_ENABLED
#define SCFG_MODULE_ENABLED
/* includes ------------------------------------------------------------------*/
#ifdef ACC_MODULE_ENABLED
#include "at32f425_acc.h"
#endif
#ifdef CRM_MODULE_ENABLED
#include "at32f425_crm.h"
#endif
#ifdef CAN_MODULE_ENABLED
#include "at32f425_can.h"
#endif
#ifdef USB_MODULE_ENABLED
#include "at32f425_usb.h"
#endif
#ifdef TMR_MODULE_ENABLED
#include "at32f425_tmr.h"
#endif
#ifdef ERTC_MODULE_ENABLED
#include "at32f425_ertc.h"
#endif
#ifdef GPIO_MODULE_ENABLED
#include "at32f425_gpio.h"
#endif
#ifdef I2C_MODULE_ENABLED
#include "at32f425_i2c.h"
#endif
#ifdef USART_MODULE_ENABLED
#include "at32f425_usart.h"
#endif
#ifdef PWC_MODULE_ENABLED
#include "at32f425_pwc.h"
#endif
#ifdef ADC_MODULE_ENABLED
#include "at32f425_adc.h"
#endif
#ifdef SPI_MODULE_ENABLED
#include "at32f425_spi.h"
#endif
#ifdef DMA_MODULE_ENABLED
#include "at32f425_dma.h"
#endif
#ifdef DEBUG_MODULE_ENABLED
#include "at32f425_debug.h"
#endif
#ifdef FLASH_MODULE_ENABLED
#include "at32f425_flash.h"
#endif
#ifdef CRC_MODULE_ENABLED
#include "at32f425_crc.h"
#endif
#ifdef WWDT_MODULE_ENABLED
#include "at32f425_wwdt.h"
#endif
#ifdef WDT_MODULE_ENABLED
#include "at32f425_wdt.h"
#endif
#ifdef EXINT_MODULE_ENABLED
#include "at32f425_exint.h"
#endif
#ifdef MISC_MODULE_ENABLED
#include "at32f425_misc.h"
#endif
#ifdef SCFG_MODULE_ENABLED
#include "at32f425_scfg.h"
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,58 @@
/**
**************************************************************************
* @file at32f425_int.h
* @version v2.0.0
* @date 2021-12-31
* @brief header file of main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer
*
* The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery.
* Artery authorizes customers to use, copy, and distribute the BSP
* software and its related documentation for the purpose of design and
* development in conjunction with Artery microcontrollers. Use of the
* software is governed by this copyright notice and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
*
**************************************************************************
*/
/* define to prevent recursive inclusion -------------------------------------*/
#ifndef __AT32F425_INT_H
#define __AT32F425_INT_H
#ifdef __cplusplus
extern "C" {
#endif
/* includes ------------------------------------------------------------------*/
#include "at32f425.h"
/* exported types ------------------------------------------------------------*/
/* exported constants --------------------------------------------------------*/
/* exported macro ------------------------------------------------------------*/
/* exported functions ------------------------------------------------------- */
void NMI_Handler(void);
void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,28 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[env:led_toggle]
platform = at32
framework = cmsis
board = AT-START-F425
build_flags = -I include
monitor_speed = 115200 ;serial monitor baudrate
;Use the following for jlink upload
upload_protocol = jlink
;Use the following for serial upload via bootloader (PA9, PA10)
;upload_protocol = serial
;upload_speed = 115200 ;default: 115200
;Use the following for custom uploader
;upload_protocol = custom
;upload_port = COM16
;upload_speed = 115200
;upload_command = ${platformio.packages_dir}/framework-cmsis-at32f40/tools/stm32flash/stm32flash -b $UPLOAD_SPEED -w $SOURCE -g 0x8000000 $UPLOAD_PORT

View File

@@ -0,0 +1,11 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.0
* @date 2021-12-31
* @brief readme
**************************************************************************
*/
this demo is based on the at-start board, in this demo, configure systick
timer used for delay function.

View File

@@ -0,0 +1,93 @@
/**
**************************************************************************
* @file at32f425_clock.c
* @version v2.0.0
* @date 2021-12-31
* @brief system clock config program
**************************************************************************
* Copyright notice & Disclaimer
*
* The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery.
* Artery authorizes customers to use, copy, and distribute the BSP
* software and its related documentation for the purpose of design and
* development in conjunction with Artery microcontrollers. Use of the
* software is governed by this copyright notice and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
*
**************************************************************************
*/
/* includes ------------------------------------------------------------------*/
#include "at32f425_clock.h"
/**
* @brief system clock config program
* @note the system clock is configured as follow:
* - system clock = hext * pll_mult
* - system clock source = pll (hext)
* - hext = 8000000
* - sclk = 96000000
* - ahbdiv = 1
* - ahbclk = 96000000
* - apb2div = 1
* - apb2clk = 96000000
* - apb1div = 1
* - apb1clk = 96000000
* - pll_mult = 12
* - flash_wtcyc = 2 cycle
* @param none
* @retval none
*/
void system_clock_config(void)
{
/* config flash psr register */
flash_psr_set(FLASH_WAIT_CYCLE_2);
/* reset crm */
crm_reset();
crm_clock_source_enable(CRM_CLOCK_SOURCE_HEXT, TRUE);
/* wait till hext is ready */
while(crm_hext_stable_wait() == ERROR)
{
}
/* config pll clock resource */
crm_pll_config(CRM_PLL_SOURCE_HEXT, CRM_PLL_MULT_12);
/* enable pll */
crm_clock_source_enable(CRM_CLOCK_SOURCE_PLL, TRUE);
/* wait till pll is ready */
while(crm_flag_get(CRM_PLL_STABLE_FLAG) != SET)
{
}
/* config ahbclk */
crm_ahb_div_set(CRM_AHB_DIV_1);
/* config apb2clk */
crm_apb2_div_set(CRM_APB2_DIV_1);
/* config apb1clk */
crm_apb1_div_set(CRM_APB1_DIV_1);
/* select pll as system clock source */
crm_sysclk_switch(CRM_SCLK_PLL);
/* wait till pll is used as system clock source */
while(crm_sysclk_switch_status_get() != CRM_SCLK_PLL)
{
}
/* update system_core_clock global variable */
system_core_clock_update();
}

View File

@@ -0,0 +1,142 @@
/**
**************************************************************************
* @file at32f425_int.c
* @version v2.0.0
* @date 2021-12-31
* @brief main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer
*
* The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery.
* Artery authorizes customers to use, copy, and distribute the BSP
* software and its related documentation for the purpose of design and
* development in conjunction with Artery microcontrollers. Use of the
* software is governed by this copyright notice and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
*
**************************************************************************
*/
/* includes ------------------------------------------------------------------*/
#include "at32f425_int.h"
/** @addtogroup AT32F425_periph_examples
* @{
*/
/** @addtogroup 425_GPIO_led_toggle
* @{
*/
/**
* @brief this function handles nmi exception.
* @param none
* @retval none
*/
void NMI_Handler(void)
{
}
/**
* @brief this function handles hard fault exception.
* @param none
* @retval none
*/
void HardFault_Handler(void)
{
/* go to infinite loop when hard fault exception occurs */
while(1)
{
}
}
/**
* @brief this function handles memory manage exception.
* @param none
* @retval none
*/
void MemManage_Handler(void)
{
/* go to infinite loop when memory manage exception occurs */
while(1)
{
}
}
/**
* @brief this function handles bus fault exception.
* @param none
* @retval none
*/
void BusFault_Handler(void)
{
/* go to infinite loop when bus fault exception occurs */
while(1)
{
}
}
/**
* @brief this function handles usage fault exception.
* @param none
* @retval none
*/
void UsageFault_Handler(void)
{
/* go to infinite loop when usage fault exception occurs */
while(1)
{
}
}
/**
* @brief this function handles svcall exception.
* @param none
* @retval none
*/
void SVC_Handler(void)
{
}
/**
* @brief this function handles debug monitor exception.
* @param none
* @retval none
*/
void DebugMon_Handler(void)
{
}
/**
* @brief this function handles pendsv_handler exception.
* @param none
* @retval none
*/
void PendSV_Handler(void)
{
}
/**
* @brief this function handles systick handler.
* @param none
* @retval none
*/
void SysTick_Handler(void)
{
}
/**
* @}
*/
/**
* @}
*/

View File

@@ -0,0 +1,67 @@
/**
**************************************************************************
* @file main.c
* @version v2.0.0
* @date 2021-12-31
* @brief main program
**************************************************************************
* Copyright notice & Disclaimer
*
* The software Board Support Package (BSP) that is made available to
* download from Artery official website is the copyrighted work of Artery.
* Artery authorizes customers to use, copy, and distribute the BSP
* software and its related documentation for the purpose of design and
* development in conjunction with Artery microcontrollers. Use of the
* software is governed by this copyright notice and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
*
**************************************************************************
*/
#include "at32f425_board.h"
#include "at32f425_clock.h"
/** @addtogroup AT32F425_periph_examples
* @{
*/
/** @addtogroup 425_GPIO_led_toggle GPIO_led_toggle
* @{
*/
/**
* @brief main function.
* @param none
* @retval none
*/
int main(void)
{
system_clock_config();
at32_board_init();
while(1)
{
at32_led_toggle(LED2);
delay_ms(200);
at32_led_toggle(LED3);
delay_ms(200);
at32_led_toggle(LED4);
delay_ms(200);
}
}
/**
* @}
*/
/**
* @}
*/

View File

@@ -54,12 +54,18 @@
"owner": "platformio",
"version": "~1.0.0"
},
"framework-cmsis-at32f43": {
"framework-cmsis-at32f42": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.0.0"
},
"framework-cmsis-at32f43": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.0.0"
},
"tool-openocd": {
"type": "uploader",
"optional": true,
@@ -97,11 +103,6 @@
"optional": true,
"owner": "platformio",
"version": "^3.0.0"
},
"tool-ldscripts-at32": {
"optional": true,
"owner": "platformio",
"version": "~0.1.1"
}
}
}