Adaptation T190 T114 Boards #9

Open
opened 2026-10-05 05:58:37 +02:00 by adam · 10 comments
Owner
No description provided.
<!-- github-sync-id:2504018403 -->
Author
Owner

T114 board unfortunately not supported because it uses nRF52840 chip and not ESP32

T114 board unfortunately not supported because it uses nRF52840 chip and not ESP32 <!-- github-comment-id:2515506175 -->
Author
Owner

Today I flashed two T190 boards. One at 433, the other at 900 MHz. Both are flashed only after adding to lib_deps :
ArduinoJson
ESP Async Web Server.

Both boards do not work after the firmware, the screens do not start, and the interface sees them as firmware mode.

After these actions, the boards are stitched back meshtastic without problems. I haven't found the problem yet.

Today I flashed two T190 boards. One at 433, the other at 900 MHz. Both are flashed only after adding to lib_deps : ArduinoJson ESP Async Web Server. Both boards do not work after the firmware, the screens do not start, and the interface sees them as firmware mode. After these actions, the boards are stitched back meshtastic without problems. I haven't found the problem yet. <!-- github-comment-id:2518045743 -->
Author
Owner

For T190 this helped me:

  • Press “Boot” and hold
  • Press “Reset” short and release button
  • Release "Boot

Then flash. And no changes to libs were necessary for me.

For T190 this helped me: - Press “Boot” and hold - Press “Reset” short and release button - Release "Boot Then flash. And no changes to libs were necessary for me. <!-- github-comment-id:2518778057 -->
Author
Owner

Also you should change env and src folder in the platformio.ini. And yes
some board requires boot mode. But if boot error you don’t have library
errors I think you did not changed SRC folder. TFT display has separate
code base

On Wed, Dec 4, 2024 at 3:40 PM Konrad Iturbe @.***>
wrote:

For T190 this helped me:

  • Press “Boot” and hold
  • Press “Reset” short and release button
  • Release "Boot

Then flash. And no changes to libs were necessary for me.

—
Reply to this email directly, view it on GitHub
https://github.com/Genaker/LoraSA/issues/28#issuecomment-2518778057, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGJNZWLSSZH22G6664LMJL2D6HGDAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYG43TQMBVG4
.
You are receiving this because you authored the thread.Message ID:
@.***>

Also you should change env and src folder in the platformio.ini. And yes some board requires boot mode. But if boot error you don’t have library errors I think you did not changed SRC folder. TFT display has separate code base On Wed, Dec 4, 2024 at 3:40 PM Konrad Iturbe ***@***.***> wrote: > For T190 this helped me: > > - Press “Boot” and hold > - Press “Reset” short and release button > - Release "Boot > > Then flash. And no changes to libs were necessary for me. > > — > Reply to this email directly, view it on GitHub > <https://github.com/Genaker/LoraSA/issues/28#issuecomment-2518778057>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACGJNZWLSSZH22G6664LMJL2D6HGDAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYG43TQMBVG4> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > <!-- github-comment-id:2518877184 -->
Author
Owner

My bad. I change SRC to tft_src and all work.

My bad. I change SRC to tft_src and all work. <!-- github-comment-id:2520158099 -->
Author
Owner

But T114, we are not supporting. T190 only. I don't have T114 to test

On Thu, Dec 5, 2024 at 12:42 AM JerryDerik @.***> wrote:

#include <ArduinoJson.h>
^~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio\build\vision-master-t190\libc81\Adafruit
BusIO\Adafruit_BusIO_Register.cpp.o
*** [.pio\build\vision-master-t190\src\main.cpp.o] Error 1

[FAILED] Took 11.08 seconds

Environment Status Duration

vision-master-t190 FAILED 00:00:11.079

1 failed, 0 succeeded in 00:00:11.079

—
Reply to this email directly, view it on GitHub
https://github.com/Genaker/LoraSA/issues/28#issuecomment-2519632845, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGJNZVZDJLMYIW6AOK6P6T2EAGWXAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGYZTEOBUGU
.
You are receiving this because you authored the thread.Message ID:
@.***>

But T114, we are not supporting. T190 only. I don't have T114 to test On Thu, Dec 5, 2024 at 12:42 AM JerryDerik ***@***.***> wrote: > #include <ArduinoJson.h> > ^~~~~~~~~~~~~~~ > compilation terminated. > Compiling .pio\build\vision-master-t190\libc81\Adafruit > BusIO\Adafruit_BusIO_Register.cpp.o > *** [.pio\build\vision-master-t190\src\main.cpp.o] Error 1 > ================================================================================================== > [FAILED] Took 11.08 seconds > ================================================================================================== > > Environment Status Duration > ------------------------------ > > vision-master-t190 FAILED 00:00:11.079 > ============================================================================================= > 1 failed, 0 succeeded in 00:00:11.079 > ============================================================================================= > > — > Reply to this email directly, view it on GitHub > <https://github.com/Genaker/LoraSA/issues/28#issuecomment-2519632845>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACGJNZVZDJLMYIW6AOK6P6T2EAGWXAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGYZTEOBUGU> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > <!-- github-comment-id:2520897628 -->
Author
Owner

T114 or T190 work?

On Thu, Dec 5, 2024 at 4:16 AM JerryDerik @.***> wrote:

My bad. I change SRC to tft_src and all work.

—
Reply to this email directly, view it on GitHub
https://github.com/Genaker/LoraSA/issues/28#issuecomment-2520158099, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGJNZVBXT23LQ7QX54KK4L2EA7ZDAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRQGE2TQMBZHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

T114 or T190 work? On Thu, Dec 5, 2024 at 4:16 AM JerryDerik ***@***.***> wrote: > My bad. I change SRC to tft_src and all work. > > — > Reply to this email directly, view it on GitHub > <https://github.com/Genaker/LoraSA/issues/28#issuecomment-2520158099>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACGJNZVBXT23LQ7QX54KK4L2EA7ZDAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRQGE2TQMBZHE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > <!-- github-comment-id:2520900111 -->
Author
Owner

T114 or T190 work?

On Thu, Dec 5, 2024 at 4:16 AM JerryDerik @.***> wrote:

My bad. I change SRC to tft_src and all work.

—
Reply to this email directly, view it on GitHub
https://github.com/Genaker/LoraSA/issues/28#issuecomment-2520158099, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGJNZVBXT23LQ7QX54KK4L2EA7ZDAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRQGE2TQMBZHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

T190 in both frequency modules.

> T114 or T190 work? > > On Thu, Dec 5, 2024 at 4:16 AM JerryDerik ***@***.***> wrote: > > > My bad. I change SRC to tft_src and all work. > > > > — > > Reply to this email directly, view it on GitHub > > <https://github.com/Genaker/LoraSA/issues/28#issuecomment-2520158099>, or > > unsubscribe > > <https://github.com/notifications/unsubscribe-auth/ACGJNZVBXT23LQ7QX54KK4L2EA7ZDAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRQGE2TQMBZHE> > > . > > You are receiving this because you authored the thread.Message ID: > > ***@***.***> > > > T190 in both frequency modules. <!-- github-comment-id:2520964480 -->
Author
Owner

T190 works for me too nicely

T114 doesn't use some chip we can program easily (nRF chip)

T190 works for me too nicely T114 doesn't use some chip we can program easily (nRF chip) <!-- github-comment-id:2521062249 -->
Author
Owner

Can you adopt this code for T114 - T190? Screenen size can be easily
configured.

I think just platformio.ini must be changed new environment added

Adapting ESP32 source code to work with an nRF chip (such as nRF52 or nRF53
series) in PlatformIO involves several steps. Both ESP32 and nRF chips use
distinct architectures, toolchains, and SDKs, so modifications in hardware
configurations, libraries, and build settings will be required.

Here’s a structured approach:

  1. Update platformio.ini

Your platformio.ini must define the nRF chip as the target platform.
Example configuration for an nRF52-based board:

[env:nrf52]

platform = nordicnrf52

board = adafruit_feather_nrf52832 ; Replace with your board

framework = arduino ; Or "zephyr" if using Zephyr RTOS

build_flags = -DNRF52832 ; Define the specific MCU

upload_protocol = nrfutil ; For DFU-based flashing

monitor_speed = 115200

If you are using the Zephyr framework (often recommended for nRF chips),
your platformio.ini might look like this:

[env:nrf52_zephyr]

platform = nordicnrf52

board = nrf52_dk ; Replace with your board

framework = zephyr

upload_protocol = jlink ; J-Link for SWD debugging

monitor_speed = 115200

  1. Replace ESP32-Specific Code

a. GPIO Configuration

ESP32 uses GPIO-specific functions like pinMode() and digitalWrite(). These
can be replaced with equivalent nRF functions:

• For Arduino framework, pinMode() and digitalWrite() will work.

• For Zephyr framework, use the GPIO API (gpio_pin_configure, gpio_pin_set,
etc.).

Example (Zephyr GPIO):

#include <zephyr.h>

#include <device.h>

#include <drivers/gpio.h>

#define LED_PIN 13

#define LED_PORT DT_LABEL(DT_NODELABEL(gpio0))

const struct device *gpio_dev;

void setup() {

gpio_dev = device_get_binding(LED_PORT);

gpio_pin_configure(gpio_dev, LED_PIN, GPIO_OUTPUT_ACTIVE);

}

void loop() {

gpio_pin_set(gpio_dev, LED_PIN, 1); // Turn on LED

k_msleep(1000); // Delay

gpio_pin_set(gpio_dev, LED_PIN, 0); // Turn off LED

k_msleep(1000);

}

b. Wi-Fi/Bluetooth

• ESP32 uses Wi-Fi and Bluetooth libraries like WiFi.h or BluetoothSerial.h.

• nRF chips do not have Wi-Fi but support Bluetooth Low Energy (BLE).

• For Arduino: Use libraries like Adafruit_Bluefruit or NimBLE.

• For Zephyr: Use the native Bluetooth stack.

Replace ESP32 Wi-Fi code with BLE initialization.

Example (Arduino BLE):

#include <bluefruit.h>

void setup() {

Bluefruit.begin();

Bluefruit.setName("nRF BLE Device");

Serial.println("BLE started");

}

void loop() {

// BLE advertising code here

}

c. Timer Functions

• Replace ESP32-specific timers with nrf_timer APIs or use the Arduino
millis()/micros() for simpler cases.

• For Zephyr, use the k_timer module.

Example (Zephyr Timer):

#include <zephyr.h>

void timer_expiry_function(struct k_timer *timer) {

printk("Timer expired\n");

}

K_TIMER_DEFINE(my_timer, timer_expiry_function, NULL);

void main() {

k_timer_start(&my_timer, K_SECONDS(1), K_SECONDS(1));

}

d. Analog Input/Output (ADC/PWM)

• For ADC: Use analogRead() for Arduino, or Zephyr’s ADC API
(adc_channel_setup, adc_read).

• For PWM: Use analogWrite() for Arduino, or Zephyr’s PWM API
(pwm_pin_set_cycles).

  1. Adjust Peripheral-Specific Features

a. I2C/SPI

Both nRF and ESP32 support I2C/SPI, but you may need to update pin
configurations:

• Use Arduino’s Wire and SPI libraries for simplicity.

• For Zephyr, configure the peripherals in the prj.conf and device tree.

Example (Zephyr I2C):

#include <device.h>

#include <drivers/i2c.h>

#define I2C_DEV_NAME DT_LABEL(DT_NODELABEL(i2c0))

const struct device *i2c_dev;

void setup() {

i2c_dev = device_get_binding(I2C_DEV_NAME);

}

void loop() {

uint8_t data[2];

i2c_write(i2c_dev, data, 2, 0x40); // Write to I2C address 0x40

}

b. Flash Memory

ESP32 uses SPIFFS or LittleFS for flash storage. On nRF:

• Use Arduino’s LittleFS library for Arduino framework.

• Use Zephyr’s File System (FS) APIs for Zephyr.

  1. Update Build Flags

Check your code for platform-specific definitions and replace ESP32 flags
with nRF equivalents. Example:

• Replace #ifdef ESP32 with #ifdef NRF52832.

• Use build flags in platformio.ini:

build_flags = -DNRF52832

  1. Test Peripheral Compatibility

• Ensure all peripherals (GPIO, UART, I2C, etc.) are compatible with the
nRF chip.

• Replace ESP32-specific libraries (e.g., WiFi.h, esp_system.h) with
nRF-compatible equivalents.

  1. Example platformio.ini for nRF

Here’s a complete example for adapting ESP32 code to nRF using the Arduino
framework:

[env:nrf52]

platform = nordicnrf52

board = adafruit_feather_nrf52832 ; Replace with your board

framework = arduino

build_flags =

-DNRF52832                      ; Define the nRF chip

-DARDUINO_BLE                   ; Optional BLE-related flag

upload_protocol = nrfutil

monitor_speed = 115200

For Zephyr framework:

[env:nrf52_zephyr]

platform = nordicnrf52

board = nrf52_dk ; Replace with your board

framework = zephyr

build_flags =

-DCONFIG_BT=y                  ; Enable Bluetooth

-DCONFIG_GPIO=y                ; Enable GPIO

-DCONFIG_I2C=y                 ; Enable I2C

upload_protocol = jlink

monitor_speed = 115200

Summary

• Update your platformio.ini to target the nRF platform.

• Replace ESP32-specific functions (Wi-Fi, timers, ADC, etc.) with
nRF-compatible alternatives.

• Use the Arduino framework for simpler migration or Zephyr for advanced
features and performance.

• Test and debug peripheral compatibility to ensure smooth adaptation.

On Thu, Dec 5, 2024 at 9:55 AM Konrad Iturbe @.***>
wrote:

T190 works for me too nicely

T114 doesn't use some chip we can program easily (nRF chip)

—
Reply to this email directly, view it on GitHub
https://github.com/Genaker/LoraSA/issues/28#issuecomment-2521062249, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGJNZUNLUOQVKFL4LBFSRT2ECHSFAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRRGA3DEMRUHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

Can you adopt this code for T114 - T190? Screenen size can be easily configured. I think just platformio.ini must be changed new environment added Adapting ESP32 source code to work with an nRF chip (such as nRF52 or nRF53 series) in PlatformIO involves several steps. Both ESP32 and nRF chips use distinct architectures, toolchains, and SDKs, so modifications in hardware configurations, libraries, and build settings will be required. Here’s a structured approach: 1. Update platformio.ini Your platformio.ini must define the nRF chip as the target platform. Example configuration for an nRF52-based board: [env:nrf52] platform = nordicnrf52 board = adafruit_feather_nrf52832 ; Replace with your board framework = arduino ; Or "zephyr" if using Zephyr RTOS build_flags = -DNRF52832 ; Define the specific MCU upload_protocol = nrfutil ; For DFU-based flashing monitor_speed = 115200 If you are using the Zephyr framework (often recommended for nRF chips), your platformio.ini might look like this: [env:nrf52_zephyr] platform = nordicnrf52 board = nrf52_dk ; Replace with your board framework = zephyr upload_protocol = jlink ; J-Link for SWD debugging monitor_speed = 115200 2. Replace ESP32-Specific Code a. GPIO Configuration ESP32 uses GPIO-specific functions like pinMode() and digitalWrite(). These can be replaced with equivalent nRF functions: • For Arduino framework, pinMode() and digitalWrite() will work. • For Zephyr framework, use the GPIO API (gpio_pin_configure, gpio_pin_set, etc.). Example (Zephyr GPIO): #include <zephyr.h> #include <device.h> #include <drivers/gpio.h> #define LED_PIN 13 #define LED_PORT DT_LABEL(DT_NODELABEL(gpio0)) const struct device *gpio_dev; void setup() { gpio_dev = device_get_binding(LED_PORT); gpio_pin_configure(gpio_dev, LED_PIN, GPIO_OUTPUT_ACTIVE); } void loop() { gpio_pin_set(gpio_dev, LED_PIN, 1); // Turn on LED k_msleep(1000); // Delay gpio_pin_set(gpio_dev, LED_PIN, 0); // Turn off LED k_msleep(1000); } b. Wi-Fi/Bluetooth • ESP32 uses Wi-Fi and Bluetooth libraries like WiFi.h or BluetoothSerial.h. • nRF chips do not have Wi-Fi but support Bluetooth Low Energy (BLE). • For Arduino: Use libraries like Adafruit_Bluefruit or NimBLE. • For Zephyr: Use the native Bluetooth stack. Replace ESP32 Wi-Fi code with BLE initialization. Example (Arduino BLE): #include <bluefruit.h> void setup() { Bluefruit.begin(); Bluefruit.setName("nRF BLE Device"); Serial.println("BLE started"); } void loop() { // BLE advertising code here } c. Timer Functions • Replace ESP32-specific timers with nrf_timer APIs or use the Arduino millis()/micros() for simpler cases. • For Zephyr, use the k_timer module. Example (Zephyr Timer): #include <zephyr.h> void timer_expiry_function(struct k_timer *timer) { printk("Timer expired\n"); } K_TIMER_DEFINE(my_timer, timer_expiry_function, NULL); void main() { k_timer_start(&my_timer, K_SECONDS(1), K_SECONDS(1)); } d. Analog Input/Output (ADC/PWM) • For ADC: Use analogRead() for Arduino, or Zephyr’s ADC API (adc_channel_setup, adc_read). • For PWM: Use analogWrite() for Arduino, or Zephyr’s PWM API (pwm_pin_set_cycles). 3. Adjust Peripheral-Specific Features a. I2C/SPI Both nRF and ESP32 support I2C/SPI, but you may need to update pin configurations: • Use Arduino’s Wire and SPI libraries for simplicity. • For Zephyr, configure the peripherals in the prj.conf and device tree. Example (Zephyr I2C): #include <device.h> #include <drivers/i2c.h> #define I2C_DEV_NAME DT_LABEL(DT_NODELABEL(i2c0)) const struct device *i2c_dev; void setup() { i2c_dev = device_get_binding(I2C_DEV_NAME); } void loop() { uint8_t data[2]; i2c_write(i2c_dev, data, 2, 0x40); // Write to I2C address 0x40 } b. Flash Memory ESP32 uses SPIFFS or LittleFS for flash storage. On nRF: • Use Arduino’s LittleFS library for Arduino framework. • Use Zephyr’s File System (FS) APIs for Zephyr. 4. Update Build Flags Check your code for platform-specific definitions and replace ESP32 flags with nRF equivalents. Example: • Replace #ifdef ESP32 with #ifdef NRF52832. • Use build flags in platformio.ini: build_flags = -DNRF52832 5. Test Peripheral Compatibility • Ensure all peripherals (GPIO, UART, I2C, etc.) are compatible with the nRF chip. • Replace ESP32-specific libraries (e.g., WiFi.h, esp_system.h) with nRF-compatible equivalents. 6. Example platformio.ini for nRF Here’s a complete example for adapting ESP32 code to nRF using the Arduino framework: [env:nrf52] platform = nordicnrf52 board = adafruit_feather_nrf52832 ; Replace with your board framework = arduino build_flags = -DNRF52832 ; Define the nRF chip -DARDUINO_BLE ; Optional BLE-related flag upload_protocol = nrfutil monitor_speed = 115200 For Zephyr framework: [env:nrf52_zephyr] platform = nordicnrf52 board = nrf52_dk ; Replace with your board framework = zephyr build_flags = -DCONFIG_BT=y ; Enable Bluetooth -DCONFIG_GPIO=y ; Enable GPIO -DCONFIG_I2C=y ; Enable I2C upload_protocol = jlink monitor_speed = 115200 Summary • Update your platformio.ini to target the nRF platform. • Replace ESP32-specific functions (Wi-Fi, timers, ADC, etc.) with nRF-compatible alternatives. • Use the Arduino framework for simpler migration or Zephyr for advanced features and performance. • Test and debug peripheral compatibility to ensure smooth adaptation. On Thu, Dec 5, 2024 at 9:55 AM Konrad Iturbe ***@***.***> wrote: > T190 works for me too nicely > > T114 doesn't use some chip we can program easily (nRF chip) > > — > Reply to this email directly, view it on GitHub > <https://github.com/Genaker/LoraSA/issues/28#issuecomment-2521062249>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACGJNZUNLUOQVKFL4LBFSRT2ECHSFAVCNFSM6AAAAABNTFGDPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRRGA3DEMRUHE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > <!-- github-comment-id:2521252817 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/LoraSA#9