Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Build CircuitPython in a Github-Codespace

To build CircuitPython within a Github codespace, you need to perform the following steps.

  1. checkout the code to a codespace
  • click on the green "<> Code"-button
  • select the Codespaces-tab
  • choose "+ new with options..." from the "..."-menu
  • in the following screen select the branch and then
  • select the port instead of "Default project configuration" (unsupported: ports not using cortex-m or esp-idf)
  • update region as necessary
  • finally, click on the green "Create codespace" button
  1. Your codespace is created. Cloning the image and the repo is quite fast, but preparing it for CircuitPython-development takes about 10 minutes. But this is a one-time task: once created, your codespace exists until you explicitly delete it or until it times out (default: 30 days).
    (Technical note: due to a bug in codespace creation, the setup is triggered from $HOME/.bashrc and runs in the background).

  2. During creation, you can run the command tail -f /workspaces/install_build_env.log.active to see what is going on. Once finished the log file is available as /workspaces/install_build_env.log.

  3. To actually build CircuitPython, open a new terminal and run e.g.

    cd ports/raspberrypi
    make -j $(nproc) BOARD=whatever TRANSLATION=xx_XX
    

    This takes about 2m40s. The new terminal is necessary since the setup of the build environment also changes $HOME/.bashrc and sets important environment variables in that file.

As a normal user, you have 120 CPU-hours and 15GB per month free. Since the smallest machine has two CPUs, you effectively have 60 hours active time available.

All scripts are in circuitpython/.devcontainer and can also be executed manually which should usually not be necessary. With small changes, they should also work on a Linux-PC or laptop.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.