Hi, if somebody could help me save some time on research.. I'd like to
- program an STM32F072 board I have
- do it in Rust if practical
- do it on Ubuntu if practical
- I'm waiting for an ST-Link V2 clone to arrive
The task is quite grandiose
- service Thinkpad T60 keyboard, convert it a USB keyboard
- talk to Thinkpad trackpoint over PS2 and convert it to a USB mouse
- talk to Synaptic trackpad over PS2 and convert it to a USB mouse
- control a bunch of on/off things like LED-s etc
- control display backlight brightness (issue PWM signal)
- (optional) use one of keyboard buttons - On/Off as an actual on/off - listen to presses when asleep, wake up and switch the system on if pressed; switch system off if pressed
- (optional) talk to Thinkpad T60 smart battery over SMBus (similar to I2C)
- (optional) present a new USB device which can be queried about the battery status etc
As you can see it's a new "embedded controller" to live within Thinkpad T60 or R60 body, possibly X201 body. Then there'd be a single board computer like Raspberi PI 4 to connect to it over USB and a separate power cable. HDMI->LVDS converter will be a separate further step. (Some more details on the idea.)
So this thing would need to present 3-4 USB devices over the USB interface that STM32F072 presumably has. Talking to 2 separate PS/2 devices may turn out to be a challenge too - perhaps the software would need to "bit-bang" PS/2 interface or two.. This thing would need to do multiple things simultaneously - cooperative multi-tasking would be very good.
- does it sound doable at all?
- does Rust sound like a good language to do it?
- is Ununtu a good operating system to use for development?
I expect the answers are "yes", so further questions
- what software do I need?
- any IDE?
- any good links to get me up to speed?
- what libraries should I learn?
I have come accross https://rtic.rs today but I'm not sure if that is the best/only option. Also please do feel free to tell me I should go back to C because it's got better librarires/tooling - I really don't mind.
- how do you folks debug these toys?
- would implementing a serial console over one of the legs of STM32 for outputting log be a sane idea? what hardware do I connect to it? Some extra USB<->serial thingie? Any links?..
Finally if anybody feels like cooperating on this rather long-haul project of planting a Raspberi PI 4 compute module - or another single board computer - into classic Thinkpad bodies (R60/T60/T61/X200 era) please do ping me
P.S. I'm aware of these links: 1 2 3 4 on converting Thinkpad keyboards to USB, i also have some links on PS/2 5 6 7 8 9 10, I have sort of found most of the connectors I need apart from 5353190-6 for the display cable; I'm just about literate enough on electronics and holding my soldering gun; the initial plan is to use toner transfer method and ferric chloride transfer method to make the PCB-s; final plan is to order required boards from China
P.P.S. I will probably need a website for this project and some other venue for discussions - in case I do find some collaborators.. It's obviously going to be open source, though not sure which license at this point yet. Maybe a github repo with wiki?..