Giter Site home page Giter Site logo

xidongxu / qemu-mps2-trustzone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from introduction-to-system-on-chip/qemu_an505

0.0 0.0 0.0 46 KB

C code on QEMU AN505 to experiment on Arm TrustZone for Cortex M.

C 80.09% Assembly 15.39% Makefile 4.43% GDB 0.09%

qemu-mps2-trustzone's Introduction

cortex-mv8-experiments

Based on

Clone the project as follow:

git clone --recurse-submodules <URL> 

Get QEMU

sudo apt-get -y install libglib2.0-dev libpixman-1-dev ninja-build libncurses5

# This is already done through the submodule
##  git clone https://github.com/qemu/qemu.git
cd qemu
mkdir -p build
./configure
make

QEMU needs at least the following patches: http://next.patchew.org/QEMU/[email protected]/[email protected]/

Get Arm toolchain

Get the toolchain from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads. Tested using gcc-arm-none-eabi-8-2018-q4-major.

wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2?revision=c34d758a-be0c-476e-a2de-af8c6e16a8a2?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,8-2019-q3-update" -O gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2

# Extract the archive
tar xvf gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2

Get CMSIS

# This is already done through the submodule
##  git clone https://github.com/ARM-software/CMSIS_5.git

Tested with commit-id 5865a4a5e511ab094bac46862bd358859ce5ccb4

Linker script is extracted from $(CMSIS)/Device/ARM/ARMCM33/Source/GCC/gcc_arm.ld and adapted for an505. See Chapter "SIE-200 Memory Map Overview" of Application Note AN505.

Build and start

  • Update path to toolchain, CMSIS and Qemu in the Makefile.
  • Compile using make and start with make run. Note: You might need to adjust CMSIS_PATH, QEMU_PATH and TOOLCHAIN_PATH if they are not at the same place.
  • Debug using make gdbserver and (in another terminal) make gdb.

References

qemu-mps2-trustzone's People

Contributors

pokitoz avatar xidongxu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.