
4 Reference Design
4.1 Project Code
IPUG546-1.1E
16(17)
4
Reference Design
4.1
Project Code
The key files in the AE250 embedded project template are as follows:
1.
src/bsp/ae250/ae250.h: This file contains the system clock definition,
peripheral register definition, peripheral register address mapping
definition, and interrupts source number definition. The clock definition
must be consistent with the AE250 parameters configuration.
2.
src/bsp/ae250/ae250.c: The reset_handler function is the entry to start
the embedded program. In the entry, UART initialization is performed
before the main function is executed. The required UART port is
selected and the required baud rate is configured according to the
parameter configuration of AE250.
3.
src/bsp/ae250/interrupt.c: This file is the definition of interrupt handler
functions of AE250
4.
src/bsp/config/config.h: This file contains the macro definition that
control compilation method. #define BUILD_MODE can be defined as
BUILD_LOAD or BUILD_BURN. BUILD_LOAD means that the
program is loaded directly into ILM, and it is generally used when
debugging. BUILD_BURN means the program is downloaded to SPI
Flash, and the program is read from SPI Flash to ILM first after power
on, and then run, which is applicable to release version program.
5.
Start.S: The starter file written in assembly language.
6.
src/bsp/loader.c: bootloader file, which is used to start from SPI Flash.
7.
ae250.sag: Sag is the scattering-and-Gathering format script. It's used
to generate linker script. It should be noted that the memory map
parameters in ae250.sag need to be consistent with those in AE250.
8.
src/bsp/driver: This directory contains two folders, ae250 is AE250