Skip to main content
Version: v2.4.0 (Current)

Deployment Overview

Once you have finished designing your HMI in Artok Studio, you need to transfer the generated ui.bin to your hardware's external flash memory (typically W25Qxx). Artok supports several deployment paths, with the primary method being the integrated "Flash Device" feature within the Studio.


⚡ 1. Artok Studio Integrated Flashing (Standard)

This is the most efficient method during development. Artok Studio handles the compilation and the serial transfer in one seamless workflow.

  • Best for: Rapid prototyping and daily development cycles.
  • Mechanism: Uses the Flash Device button in the top toolbar to stream data over a Serial/UART bridge.
  • Hardware Required: A standard USB-to-UART bridge (CH340, CP2102, etc.) connected to your MCU's command RX/TX pins.
  • Log Output: Real-time feedback is provided in the System Output console within the Studio.

💾 2. SD Card / Mass Storage Loading

For devices equipped with an SD card slot, you can bypass the serial connection for the initial asset load or for large updates.

  • Best for: Field updates where a PC running Artok Studio is not available.
  • Process: 1. Click Build Binary in Artok Studio. 2. Locate the ui.bin file (usually in your project's simulator/ or dist/ folder). 3. Copy ui.bin to the root of a FAT32 formatted SD card.
  • Implementation: Your firmware logic should check for the presence of this file on boot and use your write_flash HAL function to move the data into the SPI Flash.

☁️ 3. Over-the-Air (OTA) Updates

For connected platforms like the ESP32-S3 or Raspberry Pi, the binary can be deployed remotely via network protocols.

  • Best for: IoT products and remote maintenance.
  • Protocols: HTTP, HTTPS, or MQTT.
  • Advantage: Allows you to update the entire UI layout and Lua logic without physical access to the device.

🛠 Deployment Workflow

Regardless of the method, every deployment follows the same underlying logic:

Step A: The Build Process

When you click Build Binary, Artok Studio "cooks" your assets. It converts PNGs to RGB565, packs TrueType fonts into bitmapped arrays, and compiles Lua scripts into efficient bytecode.

Step B: Memory Mapping

You must ensure the physical address where you flash the binary matches the address defined in your source code:

// If you flash to offset 0x200000 (2MB mark)
ART_StartHMI(0x00200000, &hmi_hal);

Step C: Verification

The Artok Runtime performs a CRC check on the binary header. If the transfer was corrupted (e.g., a serial cable was unplugged), the runtime will fail to start and enter a "Safety Mode," preventing the system from crashing.