Add QEMU support for XiUOS based on Cortex-M4

This commit is contained in:
bj 2021-08-26 19:40:08 +08:00
parent 0ddb5bfd1f
commit f1755006a4
7 changed files with 44 additions and 4 deletions

View File

@ -5,7 +5,7 @@ MAKEFLAGS += --no-print-directory
.PHONY:COMPILE_APP COMPILE_KERNEL
support :=kd233 stm32f407-st-discovery maix-go stm32f407zgt6 aiit-riscv64-board aiit-arm32-board hifive1-rev-B hifive1-emulator k210-emulator cortex-m3-emulator ok1052-c
support :=kd233 stm32f407-st-discovery maix-go stm32f407zgt6 aiit-riscv64-board aiit-arm32-board hifive1-rev-B hifive1-emulator k210-emulator cortex-m3-emulator cortex-m4-emulator ok1052-c
SRC_DIR:=
export BOARD ?=kd233

View File

@ -5,6 +5,10 @@ ifeq ($(CONFIG_BOARD_CORTEX_M3_EVB),y)
SRC_DIR +=cortex-m3
endif
ifeq ($(CONFIG_BOARD_CORTEX_M4_EVB),y)
SRC_DIR +=cortex-m4
endif
ifeq ($(CONFIG_BOARD_STM32F407_EVB),y)
SRC_DIR +=cortex-m4
endif

View File

@ -105,6 +105,7 @@ BSSInit:
BSSInitEnd:
bl SystemInit
bl stm32f407_start
# bl stm32f407_start
bl entry
bx lr
.size Reset_Handler, .-Reset_Handler

View File

@ -10,7 +10,7 @@ config KERNEL_DIR
option env="KERNEL_ROOT"
default "../.."
config BOARD_STM32F407_EVB
config BOARD_CORTEX_M4_EVB
bool
select ARCH_ARM
default y

View File

@ -29,8 +29,12 @@
#define SAMPLE_UART_NAME "/dev/uart3_dev3"
#endif
#ifdef BOARD_STM32F407_EVB
#define SAMPLE_UART_NAME "/dev/usart3_dev3"
#define SAMPLE_UART_NAME "/dev/usart3_dev3"
#endif
#ifdef BOARD_CORTEX_M4_EVB
#define SAMPLE_UART_NAME "/dev/usart3_dev3"
#endif
static int serial_fd;
static int32_t bluetooth_receive;

View File

@ -27,8 +27,11 @@
#define EXT_UART_NO 2
#elif defined BOARD_STM32F407_EVB
#define EXT_UART_NO 4
#elif defined BOARD_CORTEX_M4_EVB
#define EXT_UART_NO 4
#endif
#define DATA_BUFF_SIZE 255
static struct Bus *bus;
@ -94,6 +97,8 @@ static void TestCh438Init(void)
dev = BusFindDevice(bus, CH438_DEVICE_NAME_2);
#elif defined BOARD_STM32F407_EVB
dev = BusFindDevice(bus, CH438_DEVICE_NAME_4);
#elif defined BOARD_CORTEX_M4_EVB
dev = BusFindDevice(bus, CH438_DEVICE_NAME_4);
#endif
struct SerialCfgParam serial_cfg;

View File

@ -132,6 +132,32 @@ KERNELPATHS :=-I$(BSP_ROOT) \
-I$(BSP_ROOT)/include #
endif
ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/cortex-m4-emulator)
KERNELPATHS :=-I$(BSP_ROOT) \
-I$(KERNEL_ROOT)/arch/arm/cortex-m4 \
-I$(BSP_ROOT)/third_party_driver \
-I$(BSP_ROOT)/third_party_driver/sdio \
-I$(BSP_ROOT)/include \
-I$(BSP_ROOT)/third_party_driver/include \
-I$(BSP_ROOT)/third_party_driver/uart \
-I$(BSP_ROOT)/third_party_driver/usb/STM32_USB_OTG_Driver/inc \
-I$(BSP_ROOT)/third_party_driver/ethernet \
-I$(KERNEL_ROOT)/include \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/include \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/compat \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/netif \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip/apps \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip/priv \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip/prot \
-I$(KERNEL_ROOT)/resources/ethernet/LwIP/arch \
-I$(BSP_ROOT)/include #
endif
ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/ok1052-c)
KERNELPATHS :=-I$(BSP_ROOT) \
-I$(KERNEL_ROOT)/arch/arm/cortex-m7 \