GithubHelp home page GithubHelp logo

the-nerdery-dot-info / teensy3_qemu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ve3wwg/teensy3_qemu

0.0 2.0 0.0 10.2 MB

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

License: Other

Makefile 0.35% C 93.35% C++ 1.79% Haxe 0.82% Objective-C 0.17% Assembly 0.62% Python 1.50% NSIS 0.02% Shell 0.90% Perl 0.48%

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

Watchers

Michael Morrissey avatar James Cloos 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.