GithubHelp home page GithubHelp logo

ve3wwg / teensy3_qemu Goto Github PK

View Code? Open in Web Editor NEW
16.0 6.0 5.0 10.2 MB

Changes to QEMU to accomodate the teensy3.x arm platform (Cortex-m4)

License: Other

C 94.13% C++ 1.86% Haxe 0.83% Objective-C 0.24% Assembly 0.61% Shell 0.79% Python 1.05% Perl 0.49%

teensy3_qemu's Introduction

teensy3_qemu

Changes to QEMU to accomodate the teensy3.x arm platform (Cortex-m4)

The 2.0.0 release of QEMU comes close to being useful for emulating the teensy-3.x platform, using the lm3s6965evb machine (Stellaris LM3S6965EVB). This board definition supports 256K flash, 64K SRAM and supports the Cortex-m3 arm CPU. However, the SRAM component is located at the incorrect offset for the Cortex-m4 (Freescale K20).

This repository of code changes are my attempt to support the teensy-3.1 specifically, with a view to building up Cortex-m4 support in the future.

An early patch experiment solved the SRAM starting offset problem, by patching the Stellaris machine. But in this repo, I'll be creating a separate teensy3 machine to properly reflect a different machine and to improve future maintenance.

CURRENT STATUS:

Fri Apr 18 09:32:44 2014

Using the machine name 'teensy-3.1' you now get a ARM CPU with the static ram in the correct place (address 0x1FFF8000 for 64K). The CPU emulation otherwise remains a Cortex-m3.

QEMU Command:

$ /usr/local/bin/qemu-system-arm -machine teensy-3.1 -nographic -monitor null -serial null -semihosting -kernel ./myarmprog.elf -gdb tcp::51234 -S

GDB:

$ arm-none-eabi-gdb --exec="myarmprog.elf" --se="myarmprog.elf" --ex="target remote localhost:51234" --ex "load" -ex "b main"

Startup remains tricky, in gdb you must:

  1. set $sp = *0
  2. set $lr = -1
  3. b ResetHandler
  4. j ResetHandler

From there you can single step (si) or whatever. A useful view in assembler is:

  1. layout asm
  2. layout regs

--

teensy3_qemu's People

Contributors

ve3wwg avatar

Stargazers

Renhao Zhang avatar  avatar Ken Stauffer avatar  avatar Lee Harrold avatar Jevin Sweval avatar  avatar Nic Newdigate avatar Vince van Oosten avatar Michael Morrissey avatar Rix avatar Perry Kundert avatar Yifei Teng avatar Jeff avatar Andreas Wagner avatar eugenio avatar

Watchers

Andreas Wagner avatar Jevin Sweval avatar Rafael Uchôa avatar Perry Kundert avatar eugenio avatar  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.