summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/qemu/boards/MPS3_AN547/mpconfigboard.mk16
-rw-r--r--ports/qemu/mcu/arm/mps3.ld49
2 files changed, 65 insertions, 0 deletions
diff --git a/ports/qemu/boards/MPS3_AN547/mpconfigboard.mk b/ports/qemu/boards/MPS3_AN547/mpconfigboard.mk
new file mode 100644
index 000000000..772853935
--- /dev/null
+++ b/ports/qemu/boards/MPS3_AN547/mpconfigboard.mk
@@ -0,0 +1,16 @@
+QEMU_ARCH = arm
+QEMU_MACHINE = mps3-an547
+
+CFLAGS += -mthumb -mcpu=cortex-m55 -mfloat-abi=hard -mfpu=fpv5-d16
+CFLAGS += -DQEMU_SOC_MPS3
+CFLAGS += -DMICROPY_HW_MCU_NAME='"Cortex-M55"'
+CFLAGS += -DCPU_FREQ_HZ=32000000
+
+LDSCRIPT = mcu/arm/mps3.ld
+
+SRC_BOARD_O = shared/runtime/gchelper_generic.o
+
+MPY_CROSS_FLAGS += -march=armv7emdp
+
+MICROPY_FLOAT_IMPL ?= double
+SUPPORTS_HARDWARE_FP_DOUBLE ?= 1
diff --git a/ports/qemu/mcu/arm/mps3.ld b/ports/qemu/mcu/arm/mps3.ld
new file mode 100644
index 000000000..6a576f355
--- /dev/null
+++ b/ports/qemu/mcu/arm/mps3.ld
@@ -0,0 +1,49 @@
+/* This file is part of the MicroPython project, http://micropython.org/
+ * The MIT License (MIT)
+ * Copyright (c) 2018 Damien P. George
+ */
+
+MEMORY
+{
+ ITCM : ORIGIN = 0x00000000, LENGTH = 512K
+ RAM : ORIGIN = 0x01000000, LENGTH = 2M
+}
+
+_estack = ORIGIN(RAM) + LENGTH(RAM);
+
+SECTIONS
+{
+ .isr_vector : {
+ KEEP(*(.isr_vector))
+ . = ALIGN(4);
+ } > ITCM
+
+ .text : {
+ *(.text*)
+ *(.rodata*)
+ . = ALIGN(4);
+ *(.ARM.exidx*)
+ . = ALIGN(4);
+ _etext = .;
+ _sidata = _etext;
+ } > RAM
+
+ .data : AT ( _sidata )
+ {
+ . = ALIGN(4);
+ _sdata = .;
+ *(.data*)
+ . = ALIGN(4);
+ _edata = .;
+ } >RAM
+
+ .bss :
+ {
+ . = ALIGN(4);
+ _sbss = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .;
+ } >RAM
+}