srprog: StepRocker firmware programming tool | Software | Forum
Topic RSS
5:26 pm
November 25, 2011
Offline5:53 am
November 25, 2011
Offline12:48 pm
January 31, 2012
OfflineHello community,
as promised in the neighbor thread, here is the C++ source code of a simple StepRocker programming tool: srprog.zip
It's free software, licenced under the ISC licence, I hope you find it useful.
If you use it and find bugs, have patches etc, please put them here in this thread. Note that I'll most probably have very limited time to support srprog. Still I'd like to share it, hoping that it works for some other people besides me. Stephan and the Trinamic team, if you prefer to host the code in the github repository, that's fine with me.
I'm using srprog under LINUX (current Ubuntu). Porting it to other host platforms should be quite straightforward, there are no dependencies other than the standard C++ library, and the serial port specifica are abstracted by the class TmclDevice.
Compile the code using e.g. g++ -pipe -O2 -Wall -o srprog srprog.cpp
Run it without arguments to get some lines of help.
A note on the -B option: this is intended to get short development cycles when working on a firmware based on the open-source mini-TMCL. The mini-TMCL has no USB support (yet), and programming via RS485 is significantly slower than via USB. To avoid setting the hardware jumpers for bootloader request each time, I've implemented the -B option to send the software bootloader request via RS485, and then do the programming via the USB port specified by the -P option (assuming that the StepRocker is connected by both USB and RS485 to the host PC). Unfortunately, the bootloader seems to not accept commands over USB when the software bootloader request came via RS485 (it does work vice-versa; maybe a Trinamic engineer can comment on this?), so it's currently still necessary to power-cycle the StepRocker (srprog clears the flash via RS485, then requests a power-cycle, and then continues programming via USB), but at least it's not necessary to set the jumpers everytime.
Another note on programming via RS485 only: it seems that starting the application (TMCL_BootStartAppl) after successful programming does not work. I need to power-cycle the StepRocker, then the application starts up. When programming via USB, it works as expected. I've tried this with both mini-TMCL and the binary TMCL V1.03.
Thanks again to Trinamic for publishing the bootloader protocol :-)
Wolfgang
Most Users Ever Online: 44
Currently Online:
1 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Trinamic_OK: 47
matt.s: 27
Hellmut1956: 16
ALBERTOGG: 12
BHuijgens: 9
Wolfgang Hoffmann: 8
Member Stats:
Guest Posters: 2
Members: 389
Moderators: 1
Admins: 2
Forum Stats:
Groups: 1
Forums: 7
Topics: 109
Posts: 347
Newest Members: Tom N., ze12o, rmaggertdonn, esalesugg, jovi1989, nummonseras
Moderators: ubbo_ronhardt (1)
Administrators: sradmin (3), TRINAMIC_SK (101)

Log In
Register
Home


