-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to flash? #1
Comments
You can find some hints regarding flashing in the readme in my repo. @TheKikGen Cool, that you could use some information from my findings! Very nice project! 👍 |
Hi! I've been trying too but I get lost at some point where I no longer have a firmware in the SmartPAD and can't update it. Has anyone done a tutorial yet? It would be very helpful! |
If I get it to work I'll make a friendly YouTube tutorial |
First, you must upload the bootloader at address 0x08000000, with STM-LINK UTILITY.
You must also connect the USB cable for powering the Smartpad Open ST-LINK utility, and flash the bin file at 0x08000000. Unplug the STLINK, and the usb cable, and plug again the USB cable to the computer. You should see a new HID device in the device manager (or an lsusb command if under Linux). Use then the tkg-flash utility to upload the Kikpad firmware |
So once the bootloader has been installed via the STLink flash, which file do we send via tkg-flash? You say "the Kickpad firmware" but is that something I compile myself from this project? Is it available somewhere else? At this point my SmartPad shows up as COM4. What's the next step to make this thing awesome? |
this awesome project is a work in progress, documentation too |
Thanks. I had seen that comment area but decided to uncomment the mod_kikpad_MPC.h instead (since I have no idea what I'm doing or which module does what specifically.) My thought is that I verify / compile, export then flash it with TKG-flash.exe Also, thanks @s0len0id for the tips and your reverse-engineering project. I'll join the FB group as well. |
That didn't seem to work either. No COM port anymore, and the unit will appear in Windows for a bit "We are setting up TKG BTL" but then it seems to disconnect. If this process turns out to be out of my league, can I use the ST-Link to push the SmartPad firmware back to the unit? |
@billyjack669 I'm actually having the same issue as you. |
Good LOL, I'm glad I'm not the only one. I really want to use this as an Ableton controller (a Novation Launchpad type device honestly, this unit's got a lot of potential). If you come up with anything please share! One of the bootloaders will make it become a COM port again, and sometimes it says it's a maple COM port (depending on which bootloader you flash.) |
I haven't gone much further than opening up one of my two smartPADs, a V0.13 PCB is inside, located the CN2. Next step will probably have to be soldering some pins/a header on CN2. From what I gather I can then flash tkg_hid_midiplus_smartpad.bin using the ST-LINK and screw the back on the device again. The firmware bit seems straightforward enough and the people above seem to have managed that bit with the guidance provided. I also don't worry too much about writing my own midi-controlled program either (or just use some existing midi enabled software). The tricky bit is building the software to run on the pad. It's been a while since I did anything with the arduino environment, but I did manage to get use it to program bare 'at-tiny' microcontrollers, some esp based boards and of course various arduino's in the past, so I'll probably get it to work by googling 'using STM board with arduino' or something like that, but it might be nice to get this kickstarted with some explanation of the setup of the arduino programming environment used by the author. |
Of course a more complete documentation would be comfortable for the users. Keep in mind that I'm doing these projects for free in my spare time though, and that I also have professional activities that keep me quite busy. I invite you to contribute to the documentation and post your suggestions, additions. That being said, You need to flash the tkg-hid bootloader in your Smartpad with ST-Link stick. About Arduino environment : I use the Roger's core for stm32. Follow the instructions there to install this core after the Arduino platform setup. The STM32F103RBT6 is used for the Smartpad. I have adjusted the configuration files for this uC. You will find here my full stm32duino package you can copy in your (home)/Arduino/hardware directory. Install the midixparser library in your Arduino libraries directory : https://github.com/TheKikGen/midiXparser/archive/refs/heads/master.zip In the Arduino IDE, you need then to choose STM32F1 boards (stm32duino in sketchbook), then STM32F103RB variant.
It is important to known that the upload method (bootloader) will change the start address of your binary, during the linking process. Choose "Tkg HID bootloader 3.1" in the tools/upload method menu. Compile with ctrl+R. If everything is ok, get the binary in your working directory with ctrl+alt+S, the file shoud be named "kikpad.ino.generic_stm32f103rb.bin". At this point, use the tkgflash utility to upload the binary into your kikpad the first time, or if update, switch the Kikpad to update mode (see below=. For all modules, you can : |
Attached a binary file for the kikpad demo module. Compiled for tkg hid bootloader. |
#1
=== phase 2 - flashing the demo module ===
+-----------------------------------------------------------------------+
[++++++++++++++++++++++++++++++++++++++++++++++++++] 21504 bytes sent.
This seems to work but that checksum error is worrying. Also, nothing much seems to have changed in lsusb output. Sometimes when plugging in the pad. some of the leds have some activity, but somehow looks like the module isn't started... Warrants another try sometime soon though. |
My next step should probably be to check via st-link what was actually flashed to 0x08001000 and check out the issues in the bootloader repo - maybe also try to flash from a win10 machine, maybe it's just a linux issue with the tlg-flash utility 30 min later, after a shower: |
The demo works on your Smartpad ? |
Seems to work fine, from the quick tests I did this morning before work: the pads light up with a logo, then form a piano keyboard which sends out note events on the channel that is selected by the edge buttons over the usbmidi. Knobs send controller events (volume I guess) on different channels. I do need to test and try out a little more, as it looks like I currently need to keep the st-link physically wired up to keep the software running, I guess the little 3-4 cm long wires I soldered on the CN2 port pads may act as antennas and trigger resets if I leave them floating. Maybe I'll need to use resistor to pull the reset line up (or down), or a capacitor to short any HF picked up to gnd. Then hopefully I can get a build environment set up, and try messing around with loading a custom hacked version of the demo module... |
So, continuing the step-by-step of someone working back from "I have a nice midiplus pad with crap stock software and I want to improve that"-point of view: After compiling a local copy of the tkg-flash utility, it worked without checksum error: +-----------------------------------------------------------------------+
[++++++++++++++++++++++++++++++++++++++++++++++++++] 21504 bytes sent.
As mentioned I had a bit of trouble getting the midiplus_pad to start reliably, but at the moment it works with the st-link disconnected from the board, and the 'header'-wires folded reasonably flat. I've only put back the center screw for now, so re-opening shouldn't be too much work if I do need to adjust anything. With the demo-module running, I see a device with ID 2912:1975 instead of the bootloader one in the lsusb output. Next step for me will be to get the arduino development environment set up, and see if I can get a version of the demo locally built flashed on the device. While trying to get that done, I figured out that bootloader mode is actually Control4/Master_7/Set as per the kikpad.ino file. === phase 3 - arduino environment setup and test ===
+-----------------------------------------------------------------------+
[++++++++++++++++++++++++++++++++++++++++++++++++++] 21504 bytes sent.
Next phase will probably be to make a more or less transparant I/O device out of my pad, with almost no logic running on the device, just translate presses into midi events, and incoming midi events to leds lighting up, with maybe some way to define a color palette, double buffering or text scroll, so I can forget all about the uC programming again for a while and do the rest with some scripting on the host side. Merci for the extra hints/explanation on getting the toolchain to work for me, hopefully my logs here also help someone else. |
Your kikpad demo binary worked on my SmartPad too. I ran tkg-flash with the bin, plugged in the USB, it flashed. I'm going to use your above method to get everything in my Arduino IDE etc. then I'll start tinkering to verify that I can compile and flash locally. Are any of the currently available kikpad modules compatible with Ableton or are they all geared toward the MPC? Also, I'd be quite excited to go through your code and comments to proofread. I've just never used Github to do that. |
First try at turning the midiplus pad into a generic controller, gzipped as .bin isn't supported on the site: Basically, this makes it so the smartpad sends unique midi notes (velocity 127) for each pad (0-63) and button (64-87), and the knobs are controllers 0-8, which are initialized at 63. It also listens for incoming feedback notes and lights up the corresponding pad with the received velocity as the color (and buttons just go on/off). It also updates the internal value for the controllers when it gets a CC. Program changes are (for now) ignored, and unknown message types are (partially) dumped in the first 4 rows. Just looping it back to itself works fine, but I already noticed I'll need to handle the case where a note on with velocity 0 is used as a note off (as is often done, e.g. by the launchpad X I did a small test with) a little better: pads just go black anyway as 0 is all colors off, but buttons stay on as to them this was a note on... Just another if statement I guess. I might also add something to handle the polyphonic aftertouch events sent by the launchpad, even if it is just to ignore it for now. The idea is that with this module, you can just use an external program's learning functionality, or some sort of midi-remapping filter without doing any programming on the SmartPAD (or DumbPAD, as all the intelligence would be in the external program). |
As a minor followup: I've also successfully flashed my second SmartPAD to something more usable, didn't even have to solder anything on CN2 this time, just stuck some old slightly oversized pins in the jumper wires of my cheap Chinese clone-link to change the gender, opened the SmartPad up, and held this ghetto-probe on the CN2 pads, using the holes to help alignment. Hardest part was to press Enter on the command line of the bulk erase command with the 'wrong' hand and finding I had to retype my password for sudo with it too. Luckily I use the mouse with my left hand so could then just push the GUI button to flash the bootloader, and then had both my hands available to go up a few commands and restart the tkg-flash from earlier. Now I just have to put those 14 and 15 little screws back in my new KIKPADs before I accidentally knock the tray that holds them over.. Thanks to all involved in turning this thing into a much more interesting toy than it was. Stock, it's probably at most a mediocre midicontroller, but especially for the price I paid on sale, they are now a nice devboard for both learning more about microcontroller development, and doing experiments in midi I/O in e.g. python. Probably not that hard to turn it into a usb-serial device or usb-keyboard and low-res display to drive from programs made in a 'teach my kids to code'-project so they don't have to learn about midi or mess with breadboard and loose through-hole components from my junkbox first, but can just turn on some LEDs or read a button state from the DumbPAD. |
cool stuff all around, awesome! Looking forward to all your smartpad experiments 👍 |
@luteijn - Can you add your code for the I/O module (and the other code you spellchecked, etc.) to a pull request or whatever it's called so it might get merged? I'd personally like to have your additions added because the extra module is cool and definitely a springboard for yet another Kikpad use case. |
Sure, I'll try to find some time one of these days to make a fully clean version against the repository as I couldn't completely suppress my inner grammar-nazi and changed 'HOLDED' to 'HELD' etc, in just a few places, but not in the modules not used. Bit busy with non-hobby stuff this week, so for now the binary and diff will have to do, until I relearn how to prepare a pull request and maybe figure out any (c) issues there might be. |
In summary, for a quick run : Once the kikpad is connected to the STLINK : 1/ Upload the tkg_hid_midiplus_smartpad.bin to the Smartpad from the bootloader only directory at 0x08000000 2/ Pickup one of the pre-compiled binary 3/ Upload it with STLINK at 0x8001000 or use tkg_flash utility to do that for you Disconnect Kikpad from USB and remove STLINK connector. |
Hi @TheKikGen , Thx |
"kikpad.mod_force_stm32f103rb.bin" looks like much clip launcher for MPC than Force matrix button. Can you confirm me that ? |
the last version of IamForce is not built in the same approach than the original POC shown in video last year. The new version is an entirely rewritten one. It allows MPC keys remapping + (as soon as possible) an external 64 pad device. Then, I will add a new KIKPAD firmware module that will be compatible with the Launchpad midi implementation. MPCCLipLauncher is indeed a 64 surface clip launcher. |
Sorry boring you @TheKikGen , but where i put --tkgl_ctrlname=KIKPAD" parameter ?
If i use kikpad.mod_force_stm32f103rb.bin, it should work ??
Herve
|
You need to edit the command line in the bootstrap module.
Le dim. 27 févr. 2022 à 14:11, Herve Laporte ***@***.***> a
écrit :
… Sorry boring you thekik, but where i put --tkgl_ctrlname=KIKPAD" parameter
If i use kikpad.mod_force_stm32f103rb.bin, i should work ??
Herve Laporte
Le dimanche 27 février 2022, 13:41:13 UTC+1, TheKikGen ***@***.***> a
écrit :
the last version of IamForce is not built in the same approach than the
original POC shown in video last year.
All Force buttons and pads are emulated in the Kikpad firmware (mod
MPCForce).
The Button of the MPC are not processed.
If you want to user it with IamForce, you must add the
"--tkgl_ctrlname=KIKPAD" command line parameter.
The new version is an entirely rewritten one. It allows MPC keys remapping
+ (as soon as possible) an external 64 pad device.
I'm currently integrating the Launchpad mini mk3 with this version.
Then, I will add a new KIKPAD firmware module that will be compatible with
the Launchpad midi implementation.
So, Kikpad will become a Launchpad (mod_LaunchpadMK3).
MPCCLipLauncher is indeed a 64 surface clip launcher.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIQMVK7IVJ4PKGICZN6N453U5IPHNANCNFSM4OQ4YV6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
A turtorial would be nice and also a howto to compile this code or a precompiled firmware download link with tutorial howto flash.
The text was updated successfully, but these errors were encountered: