Build CircuitPython for Your Board
Update the board name to match your board name, and verify that the three other piece of information are correct. Then, build CircuitPython the same way you did initially, however, this time, you build for your board, where your_board_name
is what you chose to rename the duplicated board folder:
make BOARD=your_board_name
Don't forget to run that from within the port directory, such as circuitpython/ports/atmel-samd
Once that process is complete, find the firmware file. In this case you see it's in build-pyruler/firmware.uf2 but there will be a few formats available such as bin and elf, for your convenience
Load the created firmware onto your board using a bootloader or programmer. The CIRCUITPY drive should automatically appear over USB if you have a FLASH chip connected properly (or if the internal FLASH is being used).
If you don't get a disk, you should still get a USB serial connection to test the REPL, check your OS for the COM or Serial port created. If you aren't getting a REPL check over your work from before - did you select the right chip variant and crystal setup?
Connect to your board via serial, and press enter to start the REPL.
Success! This verifies that the most crucial information is accurate and that the build works on your board.
From the REPL, try the following:
import microcontroller dir(microcontroller.pin)
You will see a list of all the pins available to CircuitPython.
Depending on which board you chose to duplicate, the microcontroller.pin
module may not have access to all of the pins set up on your board. This is determined by an ignored pin list found in mpconfigboard.h. Let's take a look!
Page last edited April 05, 2024
Text editor powered by tinymce.