GithubHelp home page GithubHelp logo

microsoft / pxt-arcade-smart-shield Goto Github PK

View Code? Open in Web Editor NEW
5.0 11.0 1.0 300 KB

Firmware for MCU on Arcade shields

License: MIT License

Makefile 4.03% C 72.79% Tcl 1.46% Shell 0.19% Assembly 21.52%

pxt-arcade-smart-shield's Introduction

MakeCode Arcade smart shield firmware

Firmware for shields with screen/buttons that enable MakeCode Arcade. The shield drives the screen (in particular it can bit-bang a 320x240 parallel connection screen).

This firmware is just an example. Shield manufactures can use it as a base for their own development.

More information on Arcade shield can be found at in the Arcade shield spec and in particular in the PDF schematic.

Building

You will need a Unix-like environment to build the firmware. On Windows, you can use Windows Subsystem for Linux or mingw32.

  • install arm-none-eabi-gcc (we've been using 9-2019-q4-major)
  • install openocd (optional when using Black Magic Probe)
  • install GNU Make
  • run make; you should get a successful build

Upon first run of make, a Makefile.user file will be created. You will want to adjust the settings in there - there are comments in there that should guide you through the process.

To deploy the firmware to a module you will need a debugger interface. You have three options:

  • Black Magic Probe; you can also re-program other debuggers with BMP firmware
  • a CMSIS-DAP debugger; we've been using Particle Debugger; make sure to disconnect micro:bit USB port from your computer when using this
  • an ST-LINK/V2 or one of its clones - this is the default setting You will want to set the right interface in Makefile.user.

First deployment

Head to main.c, uncomment call to show_test_screen(). Now deploy your program by running make run (or make r for short). You'll likely need to have micro:bit connected to the shield to close the power circuit. You should see vertical stripes on the screen.

Vertical stripes showing on the shield screen

If you don't:

  • make sure the screen is hardware-configured as 8-bit parallel (and not 16-bit or SPI)
  • make sure the screen is using pins D[17:10] for communication (IM3-0 are 1001); see Section 4. of ILI9341 datasheet
  • make sure it's an ILI9341 screen; if not you may need to edit ili9341.c file

Once you have the screen running, comment out show_test_screen() and deploy again. You now should be able to run Arcade games on the micro:bit.

Space destroyer game showing on the shield screen

Notable make targets

Other than the building/deployment targets, the following might be of note:

  • make gdb - run GDB debugger
  • make clean - clean (duh!)

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

pxt-arcade-smart-shield's People

Contributors

microsoft-github-operations[bot] avatar microsoftopensource avatar mmoskal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxt-arcade-smart-shield's Issues

ACTION REQUIRED: Microsoft needs this repository to complete compliance info

There are open compliance tasks that need to be reviewed for your pxt-arcade-smart-shield repo.

Action required: 3 compliance tasks

To bring this repository to the standard required for 2021, we require Microsoft administrators of this GitHub repository to complete a small set of tasks within the next 60 days. This is critical work to ensure the compliance and security of your GitHub repo.

Microsoft repo admins: Please take a few minutes to complete the tasks at: https://repos.opensource.microsoft.com/orgs/microsoft/repos/pxt-arcade-smart-shield/compliance

You can close this work item once you have completed the compliance tasks, or it will automatically close within a day of taking action.

If you no longer need this repository, it might be quickest to delete the repo, too.

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.