-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from willingc/docs-devel
Add the basic structure for a Developer's Guide. This is great! Thank you!
- Loading branch information
Showing
6 changed files
with
240 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _devfaq: | ||
|
||
============= | ||
Developer FAQ | ||
============= | ||
|
||
.. note:: | ||
|
||
This project is under active development. Please help other | ||
developers by adding tips, how-tos, and Q&A to this document. | ||
Thanks! | ||
|
||
Where do I get a copy of the DAL? A: Ask Nicholas Toll for details. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.. _flashfirmware: | ||
|
||
================= | ||
Flashing Firmware | ||
================= | ||
|
||
Building firmware | ||
----------------- | ||
Use yotta to build. | ||
|
||
Use target bbc-microbit-classic-gcc-nosd:: | ||
|
||
yt target bbc-microbit-classic-gcc-nosd | ||
|
||
Run yotta update to fetch remote assets:: | ||
|
||
yt up | ||
|
||
Start the build:: | ||
|
||
yt build | ||
|
||
|
||
The result will be a microbit-micropython hex file (i.e. ``firmware.hex``) | ||
found in the build/bbc-microbit-classic-gcc-nosd/source from the root of the | ||
repository. You will use the hex file to flash onto the micro:bit device | ||
|
||
There is a also a Makefile provided that does some extra preprocessing of the source, | ||
which is needed only if you add new interned strings to ``qstrdefsport.h``. The | ||
Makefile also puts the resulting firmware at build/firmware.hex, and includes | ||
some convenience targets. | ||
|
||
Preparing firmware and a Python program | ||
--------------------------------------- | ||
|
||
tools/makecombined | ||
|
||
hexlify | ||
|
||
|
||
|
||
Flashing to the micro:bit | ||
------------------------- | ||
|
||
|
||
|
||
|
||
**Installation Scenarios** | ||
|
||
* :ref:`Windows <microbit-windows>` | ||
* :ref:`OS X <microbit-osx>` | ||
* :ref:`Linux <microbit-linux>` | ||
* :ref:`Debian and Ubuntu <microbit-debian-ubuntu>` | ||
* :ref:`Red Hat Fedora/CentOS <microbit-redhat>` | ||
* :ref:`Raspberry Pi <microbit-rpi>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
.. _install-dev: | ||
|
||
============ | ||
Installation | ||
============ | ||
|
||
This section will help you set up the tools and programs needed for | ||
developing programs and firmware to flash to the BBC micro:bit using MicroPython. | ||
|
||
Dependencies | ||
------------ | ||
|
||
|
||
Development Environment | ||
----------------------- | ||
|
||
You will need:: | ||
|
||
* git | ||
* yotta | ||
* | ||
|
||
Depending on your operating system, the installation instructions vary. Use | ||
the installation scenario that best suits your system. | ||
|
||
Installation Scenarios | ||
---------------------- | ||
|
||
* :ref:`Windows <microbit-windows>` | ||
* :ref:`OS X <microbit-osx>` | ||
* :ref:`Linux <microbit-linux>` | ||
* :ref:`Debian and Ubuntu <microbit-debian-ubuntu>` | ||
* :ref:`Red Hat Fedora/CentOS <microbit-redhat>` | ||
* :ref:`Raspberry Pi <microbit-rpi>` | ||
|
||
|
||
.. _microbit-windows: | ||
|
||
Windows | ||
~~~~~~~ | ||
|
||
|
||
.. _microbit-osx: | ||
|
||
OS X | ||
~~~~ | ||
|
||
|
||
.. _microbit-linux: | ||
|
||
Linux | ||
~~~~~ | ||
|
||
These steps will cover the basic flavors of Linux and working with the | ||
micro:bit and MicroPython. See also the specific sections for Raspberry Pi, | ||
Debian/Ubuntu, and Red Hat Fedora/Centos. | ||
|
||
|
||
.. _microbit-debian-ubuntu: | ||
|
||
Debian and Ubuntu | ||
^^^^^^^^^^^^^^^^^ | ||
|
||
sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded | ||
sudo add-apt-repository -y ppa:pmiller-opensource/ppa | ||
sudo apt-get update | ||
sudo apt-get install cmake ninja-build gcc-arm-none-eabi srecord | ||
pip3 install yotta | ||
|
||
|
||
.. _microbit-redhat: | ||
|
||
Red Hat Fedora/CentOS | ||
^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
|
||
.. _microbit-rpi: | ||
|
||
Raspberry Pi | ||
^^^^^^^^^^^^ | ||
|
||
|
||
|
||
.. _next-steps: | ||
|
||
Next steps | ||
---------- | ||
|
||
Congratulations. You have installed your development environment and are ready to | ||
begin :ref:`flashing firmware <flashfirmware>` to the micro:bit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _dev-repl: | ||
|
||
================== | ||
Accessing the REPL | ||
================== | ||
|
||
Accessing the REPL on the micro:bit requires: | ||
|
||
* Using a serial communication program | ||
* Determining the communication port identifier for the micro:bit | ||
* Establishing communication with the correct settings for your computer | ||
|
||
Serial communication | ||
-------------------- | ||
|
||
To access the REPL, you need to select a program to use for serial communication. | ||
Some common options are `picocom` and `screen`. You will need to install | ||
program and understand the basics of connecting to a device. | ||
|
||
Determining port | ||
---------------- | ||
|
||
The micro:bit will have a port identifier (tty, usb) that can be used by the computer for | ||
communicating. Before connecting to the micro:bit, we must determine the port identifier. | ||
|
||
Establishing communication with the micro:bit | ||
--------------------------------------------- | ||
|
||
Depending on your operating system, environment, and serial communication program, | ||
the settings and commands will vary a bit. Here are some common settings for different | ||
systems (please suggest additions that might help others) | ||
|
||
**Settings** | ||
|
||
* :ref:`Windows <microbit-windows>` | ||
* :ref:`OS X <microbit-osx>` | ||
* :ref:`Linux <microbit-linux>` | ||
* :ref:`Debian and Ubuntu <microbit-debian-ubuntu>` | ||
* :ref:`Red Hat Fedora/CentOS <microbit-redhat>` | ||
* :ref:`Raspberry Pi <microbit-rpi>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters