====== Combined Hello World Demo with SWIs ====== This is the bare metal program running on both the i.MX53 QSB to test the TrustZone Secure-Normal World Transition and QEMU, with software interruptions or SWIs. This tutorial is similar to [[http://turbina.gsd.inesc-id.pt/wikis/trustpi_wiki/doku.php?id=trustpi:combined-helloworld&do=|Simple HelloWorld]], but this version contains SWIs for QEMU. The board will boot a bare-metal program to keep switching between secure and normal world. As for QEMU, the serial console will display a series of prints before and after the SWI calls. Based on: i.MX53 QSB - https://github.com/finallyjustice/imx53qsb-code/tree/master/trustzone-smc QEMU - https://github.com/avk7vk/arm-trustzone/tree/master/qemu_bare_metal ===== Setup Config ====== Assuming the viewers of this tutorial have first done the [[http://turbina.gsd.inesc-id.pt/wikis/trustpi_wiki/doku.php?id=trustpi:combined-helloworld&do=|Simple HelloWorld]] tutorial, there is no need for further configurations. ===== Requirements ===== The necessary files are the same as the first tutorial, with the addition of two new files for QEMU. - [[qemu_lib.c|qemu_lib.c]] - [[qemu_lib.h|qemu_lib.h]] ==== Compile ==== The [[compile:makefile-smc|Makefile]] used in this tutorial is similar to the first, with minor additions. Through this Makefile you can both compile and run for the board or QEMU separately or together. ==== Commands ==== Compile for both: make all Compile separately: make qemu.img or imx53.img Run/Deploy: make run-qemu or make run-imx (deploys onto the SD card). For QEMU, the output is shown in the console, as for the i.MX53 QSB, using minicom (see the Hello World Demo tutorial) you can receive the output in the serial port designated.