micropython/ports/qemu-arm
David Lechner 3446d440f6 shared/runtime/gchelper: Drop cpu directive from ARM asm helpers.
This drops the `.cpu` directive from the ARM gchelper_*.s files.  Having
this directive breaks the linker when targeting older CPUs (e.g. `-mthumb
-mthumb-interwork` for `-mcpu=arm7tdmi`).  The actual target CPU should be
determined by the compiler options.

The exact CPU doesn't actually matter, but rather the supported assembly
instruction set.  So the files are renamed to *_thumb1.s and *thumb2.s to
indicate the instruction set support instead of the CPU support.

Signed-off-by: David Lechner <david@pybricks.com>
2023-01-28 15:51:38 +11:00
..
test-frzmpy qemu-arm/test-frzmpy: Add test for freezing constant tuples. 2022-04-14 23:52:14 +10:00
Makefile shared/runtime/gchelper: Drop cpu directive from ARM asm helpers. 2023-01-28 15:51:38 +11:00
Makefile.test all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
README.md docs: Update links for Arm GCC toolchain. 2022-08-11 14:27:06 +10:00
imx6.ld qemu-arm: Add support for Cortex-A9 via sabrelite board. 2021-05-26 16:24:00 +10:00
main.c ports: Use default VFS config for import_stat and builtin_open. 2022-05-25 13:04:45 +10:00
modmachine.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
mpconfigport.h py/objstr: Add hex/fromhex to bytes/memoryview/bytearray. 2022-08-12 12:44:30 +10:00
mphalport.h qemu-arm: Rework to run bare-metal on boards with Cortex-M CPUs. 2019-02-12 13:50:01 +11:00
mps2.ld qemu-arm: Rework to run bare-metal on boards with Cortex-M CPUs. 2019-02-12 13:50:01 +11:00
nrf51.ld qemu-arm: Rework to run bare-metal on boards with Cortex-M CPUs. 2019-02-12 13:50:01 +11:00
qstrdefsport.h all: Add *FORMAT-OFF* in various places. 2020-02-28 10:31:07 +11:00
startup.c qemu-arm: Add support for Cortex-A9 via sabrelite board. 2021-05-26 16:24:00 +10:00
stm32.ld qemu-arm: Rework to run bare-metal on boards with Cortex-M CPUs. 2019-02-12 13:50:01 +11:00
test_main.c ports: Use default VFS config for import_stat and builtin_open. 2022-05-25 13:04:45 +10:00
uart.c qemu-arm: Add support for Cortex-A9 via sabrelite board. 2021-05-26 16:24:00 +10:00
uart.h qemu-arm: Rework to run bare-metal on boards with Cortex-M CPUs. 2019-02-12 13:50:01 +11:00

README.md

This is experimental, community-supported port for Cortex-M emulation as provided by QEMU (http://qemu.org).

The purposes of this port are to enable:

  1. Continuous integration
    • run tests against architecture-specific parts of code base
  2. Experimentation
    • simulation & prototyping of anything that has architecture-specific code
    • exploring instruction set in terms of optimising some part of MicroPython or a module
  3. Streamlined debugging
    • no need for JTAG or even an MCU chip itself
    • no need to use OpenOCD or anything else that might slow down the process in terms of plugging things together, pressing buttons, etc.

This port will only work with the [GNU ARM Embedded Toolchain]( https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads and not with CodeSourcery toolchain. You will need to modify LDFLAGS if you want to use CodeSourcery's version of arm-none-eabi. The difference is that CodeSourcery needs -T generic-m-hosted.ld while ARM's version requires --specs=nano.specs --specs=rdimon.specs to be passed to the linker.

To build and run image with builtin testsuite:

make -f Makefile.test test