The first step is to get yotta and its dependencies onto your machine, to do this follow the install guide here.
For the micro:bit targets you currently still need the srecord tools, which can be installed on Windows from sourceforge.
srecord is used to create the final binaries for the micro:bit so is an essential dependency.
git clone https://github.com/lancaster-university/microbit-samples cd microbit-samples
A yotta target contains the information required by yotta in order to build a project for a specific combination of hardware. This includes the type of compiler. The microbit projects can build with both armcc and gcc, but as it gets installed with the yotta installer, we'll use gcc by default and choose a micro:bit specific target that knows about the hardware on the board.
You can use either yotta or yt, which is far easier to type!
yt target bbc-microbit-classic-gcc
Note
In microbit-samples this target will be configured by default.
You only need to set the target once per project. All future yotta commands will use this target information (for example, when resolving dependencies).
Build the project
yt build
The final step is to check your hex works.
The yt build command will place files in /build/<TARGET_NAME>/source. The file you will need to flash will be microbit-combined.hex. Simply drag and drop the hex onto the MICROBIT usb device.
In the case of our example, using bbc-microbit-classic-gcc we could flash the micro:bit (assuming it is plugged in and mounted at E:) as follows:
copy build\bbc-microbit-classic-gcc\source\microbit-samples-combined.hex E:
The expected result will be that the micro:bit will scroll HELLO WORLD! :) on its display.