
Here's a detailed flashing guide for new TR6260 WiFi chips that can be found in some Tuya smart devices. TR6260 can be easily flashed and run free from the cloud, fully locally, without Tuya servers. This way you can easily pair TR6260 with Home Assistant via Home Assistant Discovery, add custom sensors (like DHT sensors family series or BMP280/BME280 etc), and run local scripts and automations.
TR6260 is 32-bit, 2.4GHz WiFi-enabled SoC optimized for smart home/IoT applications, featuring 6x PWM, single ADC, flexible IO interfaces and 1MB of Flash.

Where the TR6260 can be found?
TR6260 have been so far observed in multiple devices, here are few of them:
[TR6260S1 Transa Semi] Smart LED strip controller 144W 6A RGB, IR, firmware
[TR6260S1/FL-M61 V2] WiFi Smart Switch how to change the firmware?
ELM327 OBDII Scanner: Transa Semi ESWIN TR6260S1 MCU Details?
[Flashing Tuya A5F-53F1-02 with TR6260S1 Chip
You can also buy a development board with TR6260 called "Hi-Link HLK-M20", that can be ordered directly from China.
Thanks to @insmod efforts in the development topic, those devices can be now flashed with OpenBeken
HLK-M20 development board
This board can be easily found if you search for HLK-M20 Serial Port 2.4G WiFi Wireless Module IOT Serial to WiFi Transparent Transmission Low Power SDK M20 Development Board Kit. It's somewhat similiar to NodeMCU and other ESP boards. You can either buy just a module:


or a full dev board, with module already soldered:




Schematic:

In case of this board, everything needed to flash is already present, but if you're going to flash IoT device with TR6260, you will need to have your own USB to UART converter...
What do I need to flash TR6260?
To flash TR6260 found in IoT device, you need a classic USB to UART converter, similiar to ones used for ESP8266/ESP32/BK7231 flashing.

You will need to make some GPIO connections, so basic soldering skills are required.
If you want to get a basic grasp of how firmware change process looks like, you can visit our Youtube channel:
https://www.youtube.com/@elektrodacom
We don't have TR6260 flashing video yet, but we have covered similiar chips in the past, like BK7231, so this might give you a basic overview of the procedure.
Where to get UART flash tool?
This is not ESP device, so esptool will not work. You will need to download utility called UTP. It can be found here:
https://github.com/openshwprojects/FlashTools/tree/main/TransaSemi-ESWIN
Alternate download/TS info pack:
https://github.com/divadiow/TR6260/tree/main/UTP%20Flash%20Tool
Here's English translation of UTP gui:

Translation of the partition table layout:
https://obrazki.elektroda.pl/5232196400_1732140400.png
And please note that restore of factory backup appears to require the file be split. eg: https://www.elektroda.com/rtvforum/topic4091587.html#21336099
Now, let's focus on read and write procedures for flash...
How to prepare connections and make TR6260 flash dump?
In the case of the TR6260S1-based Hi-Link HLK-M20 module, which can be used as a template for any TR6260S1 device, a backup of the factory firmware can be achieved as follows:
GPIO14/TOUT2 needs to be grounded at power-on. Like LN882H this needs to be before power to USB-TTL. Just resetting the device (RST->GND) with GPIO14 grounded will bring it up in spi-flash boot mode, that being standard boot, NOT UART boot mode:

If you're watching TX then the correct procedure will give this output:

then configure the UTP program as follows, using the boot_nocrc.bin from the same zip file. The flash is 1mb so length is 0x100000
PC Local Filepath is just where you want to save the file

It takes 2-3 mins and it may look like it has stalled.
On the HLK-M20 module GPIO14/TOUT2 pad is the location of EN on ESP-12F, so if using an ESP universal adaptor it's just a case of grounding EN header.


If successful, the resultant backup file will be exactly 1,048,576 bytes.
How to flash new firmware to TR6260?
Before proceeding, make sure that you have a backup of factory flash. Once you are sure that everything is backed up, it's time to proceed with flashing.
Ground GPIO14/TOUT2 as shown in the backup procedure and power-on the device
Set appropriate COM port for your setup and a baud rate. Perhaps start at 921600 baud but reduce if there are issues with stability or connecting at all.
Download the latest OpenTR6260_xxxx.bin firmware from the releases page.
Using the partition binaries alongside the UTP program in the zip, configure your file list on the downloader tab to resemble this:

That being:
File_1 : boot_nocrc.bin | Address: 0x0000
File_2 : TR6260_partition_at_diff_0x6000.bin | Address: 0x6000
File_3: OpenTR6260_xxxx.bin | Address: 0x7000
File_4: IGNORE IT, no longer needed.
Click Start.
On completion, power-off and remove GPIO14/TOUT2 from ground. Power on the device and you should see it broadcast an AP like this

Connect to the AP (no password required). When connected browse to 192.168.4.1 where you can configure OpenBK as normal.

For the steps taken on a real TR6260S1 device, where contacts are not so easily accessed as they are on a module, see this post regarding two flavours of ELM327 OBDII car code reader.
Flashing with universal breakout board
HLK-M20 boards have pinout similiar to ESP12F/TYWE3S/CB3S/WB3S/etc, so they can fit to universal ESP breakout. Here is pin mapping for such board:

The following board has been already covered in another topic, see here:
Programming ESP12/TYWE3S/CB3S/WB3S/etc. without soldering - solderless motherboard
OpenTR6260 demo - DHT11 sensor
OpenBeken port for TR6260 supports DHT11, which can be configured just like we've shown on our "Weather station" video for W600:
Sample connection:


Video presentation - there is also a LED on Rel pin, so clicking button toggles it as expected. The read humidity and temperature is also visible on the main page as expected.
OpenTR6260 demo - DME280 sensor
BME280/BMP280 is also supported. For that, you need to create autoexec.bat with script:
//startDriver BMPI2C [CLK] [DATA] [ChannelForTemp] [ChannelForPressure] [ChannelForHumidity] [Addr]
startdriver bmpi2c 0 1 2 3 4
If driver is missing, make sure that it is included in build - check obk_config.h.

Video presentation:
Some extra information
-TR6260S1 has some variations: https://www.elektroda.com/rtvforum/topic3965929-30.html#21315543
-we've put all the known resources I have for TR6260 here inc all datasheets: https://github.com/divadiow/TR6260
Summary
TR6260 can now be flashed via UART with OBK port. OBK build for TR6260 can be customized with our online builds, you can also create a custom driver for that in such way. Thanks to that, your TR6260 devices can now work cloud-free and be paired with Home Assistant!
Special thanks for @divadiow for researching/flashing and @insmod for porting.
Hopefully soon we'll get ported to next platforms as well.
Cool? Ranking DIY Helpful post? Buy me a coffee.