mirror of https://github.com/rusefi/rusefi.git
a bit of AT32
This commit is contained in:
parent
b9c17be200
commit
fa98b04909
|
@ -2,6 +2,14 @@
|
|||
BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::D13
|
||||
|
||||
IS_AT32F435 = yes
|
||||
|
||||
# Stock board.c from ChibiOS
|
||||
BOARD_C = $(CHIBIOS)/os/hal/boards/AT_START_F435/board.c
|
||||
|
||||
# Configuration directorys
|
||||
CONFDIR = $(PROJECT_DIR)/hw_layer/ports/at32/at32f4/cfg
|
||||
|
||||
DDEFS += -DFIRMWARE_ID=\"at_start_f435\"
|
||||
DDEFS += -DDEFAULT_ENGINE_TYPE=MINIMAL_PINS
|
||||
DDEFS += -DSHORT_BOARD_NAME=at_start_f435
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
SCRIPT_NAME="compile_at_start_f435.sh"
|
||||
echo "Entering $SCRIPT_NAME"
|
||||
|
||||
bash ../common_make.sh at_start_f435 ARCH_STM32F4
|
||||
bash ../common_make.sh at_start_f435 ARCH_AT32F4
|
||||
|
|
|
@ -45,7 +45,11 @@
|
|||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f4xx.h"
|
||||
#ifdef AT32F4XX
|
||||
#include "at32f4xx.h"
|
||||
#else
|
||||
#include "stm32f4xx.h"
|
||||
#endif
|
||||
//#include "Legacy/stm32_hal_legacy.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -104,7 +108,7 @@ typedef enum
|
|||
|
||||
#if (USE_RTOS == 1)
|
||||
/* Reserved for future use */
|
||||
#error “USE_RTOS should be 0 in the current HAL release”
|
||||
#error <EFBFBD>USE_RTOS should be 0 in the current HAL release<73>
|
||||
#else
|
||||
#define __HAL_LOCK(__HANDLE__) \
|
||||
do{ \
|
||||
|
|
|
@ -61,11 +61,16 @@ else ifeq ($(PROJECT_CPU),ARCH_STM32H7)
|
|||
#CPU_PLATFORM = $(CHIBIOS)/os/hal/ports/STM32/STM32H7xx/platform.mk
|
||||
CPU_PLATFORM = ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/STM32H7xx/platform.mk
|
||||
CPU_HWLAYER = ports/stm32/stm32h7
|
||||
else ifeq ($(PROJECT_CPU),ARCH_AT32F4)
|
||||
CPU_STARTUP = startup_at32f4xx.mk
|
||||
CPU_PLATFORM = $(CHIBIOS)/os/hal/ports/AT32/AT32F4xx/platform.mk
|
||||
# Reuse STM32F4 port
|
||||
CPU_HWLAYER = ports/stm32/stm32f4
|
||||
else ifeq ($(PROJECT_CPU),custom_platform)
|
||||
include $(BOARD_DIR)/custom_platform.mk
|
||||
$(info Using custom CPU_STARTUP_DIR $(CPU_STARTUP_DIR))
|
||||
$(info Using custom CPU_PLATFORM $(CPU_PLATFORM))
|
||||
$(info Using custom CPU_HWLAYER $(CPU_HWLAYER))
|
||||
include $(BOARD_DIR)/custom_platform.mk
|
||||
$(info Using custom CPU_STARTUP_DIR $(CPU_STARTUP_DIR))
|
||||
$(info Using custom CPU_PLATFORM $(CPU_PLATFORM))
|
||||
$(info Using custom CPU_HWLAYER $(CPU_HWLAYER))
|
||||
else ifeq ($(PROJECT_CPU),simulator)
|
||||
else
|
||||
$(error Unexpected PROJECT_CPU [$(PROJECT_CPU)])
|
||||
|
|
Loading…
Reference in New Issue