Repository for the Oxocard Firmware including Cartridge scripts and Oxocard binaries.
- Make sure python and pip are installed
- Open a console and run:
pip install esptool
(Documentation: https://docs.espressif.com/projects/esptool/en/latest/esp32/) - Connect your Oxocard and find its port with
ls /dev/cu*
(macOS/linux) orchgport
(Windows) - Replace (PORT) and run:
esptool.py -p (PORT) erase_flash
- Navigate into the ".../oxocard_binaries/" directory
- In the following command: Make sure the paths to the binary files you want to flash are correct, replace (PORT) and run:
esptool.py -p (PORT) -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x1000 common/bootloader.bin 0x8000 common/partition-table.bin 0x10000 connect/oxocard_mini_connect_v142.bin
- On the very first startup, the HW test may have to be completed
Example of flashing an Oxocard Science using macOS:
esptool.py -p /dev/cu.wchusbserial1440 erase_flash
esptool.py -p /dev/cu.wchusbserial1440 -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x1000 common/bootloader.bin 0x8000 common/partition-table.bin 0x10000 science/oxocard_mini_science_v142.bin
Example of flashing an Oxocard Blockly using macOS:
esptool.py -p /dev/cu.wchusbserial1440 erase_flash
esptool.py -p /dev/cu.wchusbserial1440 -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x1000 blockly/bootloader.bin 0x8000 blockly/partition-table.bin 0x10000 blockly/oxocard_blockly_v219.bin
- Plug in an Oxocard Connect and connect it to the NanoPy environment via USB or WiFi
- Copy the "<cartridge_name>.npy" and "<cartridge_name>_autostart.npy" files of the cartridge you want to program, into the NanoPy editor
- Save the scripts as your own and rename them to fit the file names
- Load those scripts onto your Oxocard Connect using the "Load on card" function within "My Scripts"
- Copy the "<cartridge_name>_flasher.npy" file into the NanoPy editor and flash it on the Oxocard Connect using "Run code"
- Connect the cartridge with your Oxocard Connect (if you haven't yet) and click a button to write the data to the EERPOM on the cartridge
Instead of using the original esptool from espressif, there are several free tools, that runs in the browser. For instance, you may try to use esp.huhn.me. This require a Chrome-browser, because only this browser is supporting the Serial-API. Hints:
- ersase the card before you start flashing
- you have to add three files booloader.bin at address 0x1000, partition-table.bin at 0x8000 and the oxocard firmware file at 0x10000.
- It is perhaps still required to install the USB driver before you start with the flashing. if you cannot see the USB-connection, try to install the driver https://www.wch-ic.com/search?q=CH340&t=downloads before your start. Important note: plesae choose the right firmware file for your card.