Skip to content

[EN] TMA‐1 Configuration Tool Guide

LUFT-AQUILA edited this page Nov 1, 2023 · 9 revisions

This is a GUI tool for enabling/disabling the features of the TMA-1 and building firmware to upload to the device.

During firmware operations, the GUI may become unresponsive.

0. Prerequisites

TMA-1 Configuration Tool requires at least 5.5GB of free disk space and will download about 1.2GB toolchain from the Internet to build firmware for the first time.

1. Install

The security warnings are due to the pyinstaller, which the monolith is using to pack the Python scripts into the executable. (Related Issue)

  • The installer downloads the latest Monolith installation file (monolith-installer-<version>.exe) from the release page and extracts it to C:/monolith. Administrator permission is required to create a new directory in the path C:/.
  • Monolith will be installed in C:/monolith because a long path may cause a failure while building ESP32 firmware. (Windows Command-line string limitation)
  1. Download the latest Monolith installer (monolith-installer-<version>.exe) from the release.
  2. When you download or run the installation file, you'll see security warnings like the following:
    • Chrome SafeBrowsing

      Click the button on the right, then select Download suspicious file.

    • Windows Defender SmartScreen

      Click More info then select Run anyway

    • Other antiviruses
      Allow the downloaded installation file in your antivirus software.

  3. Run the installer and Monolith will be installed in the C:/monolith directory.
  4. When the message Installation complete! is printed, you can close the installer.

2. Run

  1. Open the File Explorer and navigate to the C:/monolith/builder directory.
  2. Run the main.exe file to launch the TMA-1 configuration tool.

3. STM32

The TMA-1's primary functions are handled by the STM32F4 development board. You need to upload firmware to the board first for it to work correctly.

Options

Refer to TMA‐1 Features and Usage Guide to enable the desired features.

  • Datalogging

    • Output
      • SD Card
        All logs will be stored on the Micro SD card. This is a default feature and cannot be disabled.
      • Telemetry
        Enables wireless real-time monitoring functionality.
      • Serial
        Transmit logs to the LTX pin using a 115200bps 3.3V UART. If not in use, it should be disabled for better performance.
    • Sensors
      Turn on each desired feature and turn off if not used. Input voltage and CPU temperature monitoring is a default feature and cannot be disabled.
  • Upload

    • Debug Mode
      Outputs debug messages from TMA-1 to the DEBUG UART port. This feature should turned off during the actual use, as this feature significantly drops performance. RTC synchronization via the DEBUG UART port will not affected by this option.

    • Release Build
      Compiles the firmware with release option (-O2). If disabled, the firmware will built with -g -gdwarf-2 options. Always keep this enabled unless you intend to use STLink runtime debugging.

Firmware Upload

STLink is used for uploading the firmware. You can use other similar products as well.

Before connecting STLink to your computer, make sure to install the STLink Driver.

Connect the STM32F4 development board and STLink by connecting SWDIO, SWCLK, and GND. Then connect STLink to your computer.

image

image

Power up the TMA-1 and press the FLASH TMA-1 button. The firmware will be automatically built and uploaded to the device.

If the operation fails, copy the messages from the console and post them as a Q&A in Discussions.

RTC Synchronization

Manually synchronize the RTC clock of the TMA-1 with your computer.

  1. Connect the TMA-1's DEBUG UART pin header to your computer via UART to USB converter.
  2. Connect the TX pin of the TMA-1 to the RX of the converter and vice versa.
  3. Press the Sync RTC button and select the COM port of the UART to USB converter for synchronization.
  • If synchronization fails multiple times, recycle the power of TMA-1 before trying again.
  • If you are using the telemetry feature, you don't need to do the manual sync since it will automatically synchronize the time when connected to the TMA-2 server.

4. ESP32

You need to upload firmware to the ESP32 for the telemetry feature to work.

Options

Configure the settings for the ESP32, such as the Wi-Fi Hotspot network and the telemetry channel.

The ESP32 will connect to the driver's smartphone hotspot network to access to the Internet(TMA-2 server).

  • Wi-Fi Hotspot SSID
    This is the name of the Wi-Fi hotspot network that the ESP32 will connect to.
  • Wi-Fi Hotspot Password
    This is the password for the hotspot network.
  • Channel Name
    This is the channel name you set while user registration.
  • Channel key
    This is the passkey you set while user registration.
  • Server Name
    This is the address of the TMA-2 telemetry server to be used. If you didn't configure your own TMA-2 server, leave it to the default value monolith.luftaquila.io.
  • COM Port
    This is the serial port used during firmware upload. The config tool will auto-detect the CP2102 UART chipset if you leave it blank. You can find the correct serial port in the device manager and put the port number manually if the auto-detect fails.

Firmware Upload

Connect the ESP32's Type-C USB port to the computer and simply press the Flash ESP32 button. The upload will be done automatically

However, the ESP32 needs to be in DOWNLOAD_BOOT mode during the firmware upload. There are two methods to put ESP32 in download mode.

KakaoTalk_20231020_154304966

1. 10uF Capacitor

If the ESP32 is attached to the TMA-1 board and a 10uF capacitor (C1) is installed on the board, the ESP32 will automatically enter the download mode.

To upload firmware to the ESP32 not on the TMA-1 board, you need to use the second method.

2. EN

The ESP32 development board has an EN (Enable) button. After pressing the Flash ESP32 button and waiting for a moment, you will see the following message on the console:

INFO: flashing TMA-1 ESP32 binary...
esptool.py v4.5.1
Serial port COM #

At this point, press the EN button on the ESP32, and the firmware upload will proceed. Keep pressing the button until you see the message Writing at 0x########... (## %) displayed, and then release it.

5. Uninstall

  1. Delete the C:/monolith directory.