Settings, environment and files
One settings file serves every mcuctl front end. A value is taken from the first
of these that sets it: an explicit argument, the editor’s setting, the
environment variable, ~/.mcuctl/config.json, then the default.
Editor settings
Setting |
Default |
Purpose |
|---|---|---|
|
empty |
Python 3.9+ for the serial session. Empty on WSL means the Windows |
|
empty |
Path to |
|
|
Serial baud rate |
|
empty |
A device to connect to on start ( |
|
|
SHA-256 after each upload or download |
|
|
Compile |
|
|
After a hard reset, wait for the same port and reconnect |
|
|
Open File Transfer and the REPL when a board connects |
|
empty |
Firmware workspace: where mcuctl looks for omnipython-builds and MicroPython |
|
empty |
The omnipython-builds checkout to build with. Set, it wins over |
|
empty |
Override for the MicroPython tree |
|
empty |
Overrides for ESP-IDF and emsdk |
|
|
Extra cross-toolchain |
|
empty |
Python for the build engine. On WSL it must be a native Linux |
|
empty |
The esptool command for flashing esp32, such as a Windows |
|
|
Whether a WebREPL or Bluetooth password typed in VS Code is also written to |
~/.mcuctl/config.json and environment variables
The file takes the same names without the mcuctl. prefix, plus these:
Key |
Environment variable |
Purpose |
|---|---|---|
|
|
The Python for the session |
|
|
Serial baud rate |
|
|
Device to connect to |
|
|
Fallback WebREPL password |
|
|
Bluetooth password |
|
|
MicroPython tree |
|
|
Firmware workspace |
|
|
omnipython-builds checkout |
|
|
SDK locations |
|
|
Python for the build engine |
|
|
esptool command |
|
none |
Files never compiled by |
|
none |
Boards mcuctl remembers from serial connects |
Other variables: MCUCTL_RPC (an editor session’s address),
MCUCTL_SESSION_ID (a window’s session name), MCUCTL_PWA_PORT (the browser
interface’s port, default 8317).
Files under ~/.mcuctl
The tool used to be called mpftp and kept this folder as ~/.mpftp. The first run that finds ~/.mpftp and no ~/.mcuctl moves it, so your saved devices carry over. Environment variables and editor settings that began MPFTP_ or mpftp. now begin MCUCTL_ and mcuctl.; the old names are ignored.
Path |
What it holds |
|---|---|
|
The settings above |
|
Board passwords, plaintext, mode 0600 |
|
Which editor session serves which workspace folder |
|
Each window’s session claim |
|
NDJSON of connects, transfers, RPC calls and errors |
|
REPL I/O while a REPL is open |
|
A |
|
Downloaded firmware images and the catalog pages |
|
The package indexes |