/zig-armv8m-test

Minimal Zig-based app for Armv8-M + TrustZone

Primary LanguageZigApache License 2.0Apache-2.0

Zig on Cortex-M33

This repository includes a small example application that runs on AN505, a Cortex-M33-based prototyping system on FPGA. Written mostly in Zig and partly in assembler.

Usage

You need the following things before running this example:

  • Either of the following:
    • QEMU 4.0.0 or later. Older versions are not tested but might work.
    • Arm MPS2+ FPGA prototyping board configured with AN505. The encrypted FPGA image of AN505 is available from Arm's website.
  • Zig 2cb1f93 (Aug 16, 2019) or later

Do the following:

$ zig build -Drelease-small qemu
(Hit ^A X to quit QEMU)
The Secure code is running!
Booting the Non-Secure code...
NS: Hello from the Non-Secure world!
\

asciicast

License

This project is dual-licensed under the Apache License Version 2.0 and the MIT License.