Bootstrap a CODAL-based project from a single Python script.
An example of creating a microbit-v2 project from just one initial build file:
- Download a copy of
./build.py
( curl/wget/download link ) from this repository and put in a new folder for your project - In the terminal/console run
./build.py
to retrieve a list of valid targets - Run
./build.py codal-microbit-v2
(replacecodal-microbit-v2
with your selected target) - Write your code in the newly created
source/
directory
Any further runs of ./build.py
will now use the latest downloaded version of the build tools, and will take the same arguments as traditional builds (see ./build.py --help
for deatils).
Some additional targets can be included by including new URLs to build.py
's TARGET_LIST
variable, by default this is as follows:
TARGET_LIST = [
"https://raw.githubusercontent.com/lancaster-university/codal/master/utils/targets.json"
]
To add the beta-targets list, include the URL: https://raw.githubusercontent.com/lancaster-university/codal-bootstrap/main/beta-targets.json
like so:
TARGET_LIST = [
"https://raw.githubusercontent.com/lancaster-university/codal/master/utils/targets.json",
"https://raw.githubusercontent.com/lancaster-university/codal-bootstrap/main/beta-targets.json"
]
To force bootstrap mode to run again, simply remove the codal.json
file in your project directory, and follow the installation steps above.
You may also want to remove your libraries
folder entirely to force all libraries to be re-downloaded.