The Whitecat Console is a command line tool that allows the programmer to send and receive files to / from Lua RTOS compatible boards without using an IDE.
Go to your Go's workspace location
For example:
cd gows
Download and install
go get github.com/whitecatboard/whitecat-console
Go to the project source root
cd src/github.com/whitecatboard/whitecat-console
Build project
go build
For execute:
Linux / OSX:
./wcc
Windows:
wcc.exe
Please note you need probably to download and install drivers for your board's USB-TO-SERIAL adapter for Windows and Mac OSX versions. The GNU/Linux version usually doesn't need any drivers. This drivers are required for connect to your board through a serial port connection.
Board |
---|
WHITECAT ESP32 N1 |
ESP32 CORE |
ESP32 THING |
For Linux, the currently logged user should have read and write access the sUSB-TO-SERIAL device. On most Linux distributions, this is done by adding the user to dialout group with the following command:
$ sudo usermod -a -G dialout $USER
wcc -p port | -ports
[-ls path | [-down source destination] |
[-up source destination] | [-f | -ffs] | [-erase] | -d]
-ports: list all available serial ports on your computer
-p port: serial port device, for example /dev/tty.SLAB_USBtoUART
-ls path: list files present in path
-down src dst: transfer the source file (board) to destination file (computer)
-up src dst: transfer the source file (computer) to destination file (board)
-f: flash board with last firmware
-ffs: flash board with last filesystem
-erase: erase flash board
-d: show debug messages
List files in /examples directory
./wcc -p /dev/tty.SLAB_USBtoUART -ls /examples
Download system.lua file and store it as s.lua in your computer
./wcc -p /dev/tty.SLAB_USBtoUART -down system.lua s.lua
Upload s.lua file and store it as system.lua in your board
./wcc -p /dev/tty.SLAB_USBtoUART -up s.lua system.lua
Upgrade the board with last available firmware
./wcc -p /dev/tty.SLAB_USBtoUART -f
Upgrade the board with last available firmware and last available filesystem
./wcc -p /dev/tty.SLAB_USBtoUART -f -fs
Upgrade the board with available filesystem
./wcc -p /dev/tty.SLAB_USBtoUART -fs
Erase the flash memory
./wcc -p /dev/tty.SLAB_USBtoUART -erase