Micropython for the TC32 (a.k.a. those terrible $3 smartwatches from AliExpress) #15333
Replies: 3 comments 6 replies
-
I think the chances of the maintainers accepting this are those of a snowball in Hell. Consider the legality: a dodgy ARM port and a hooky compiler with unspecified licensing. Ugh. This is my opinion based on familiarity with the project - I'm not a maintainer. |
Beta Was this translation helpful? Give feedback.
-
Very impressing video. |
Beta Was this translation helpful? Give feedback.
-
The video is well worth watching. That is a most impressive feat of reverse engineering! |
Beta Was this translation helpful? Give feedback.
-
I asked about this a little while back on a different forum, but the video's done now!
https://www.youtube.com/watch?v=sv58aPvIonw
This thing is based on a Telink TLSR8232 with 512kB of flash and 16kB of RAM, and Micropython runs just fine in it, complete with a screen driver and pin support. You get about 10kB of heap. The hardware supports BLE but I didn't bother trying to make this work because the vendor BLE stack wants to live in RAM, and consumes... 10kB.
One interesting thing is that the TLSR8232 is not an ARM; it's based on Telink's own TC32 architecture. Which turns out to be ARM Cortex M0 with a couple of bits different in each opcode --- yes, really. Porting Micropython was easy because I could take the existing Thumb code and search-and-replace the instruction names to turn it into TC32 code.
Would there be any interest in getting this upstreamed? AFAICT Telink is fairly popular in the IoT arena, as well as there being a huge number of cheap, nasty smartwatches based on their chips. One big downside is that you need their compiler, which is a port of gcc with no source available. (Although I can't imagine that porting a modern gcc or LLVM would be hard. You just need to modify the assembler to generate TC32 opcodes from Thumb assembly.)
Here's my fork on github: https://github.com/davidgiven/micropython
Beta Was this translation helpful? Give feedback.
All reactions