Skip to content

Commit

Permalink
Wrote more complete README. Added some code comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Oct 26, 2014
1 parent 1962986 commit c2c9b4a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@ LinnStrument Firmware Updater

This is a GUI tool written in Juce to easily update the firmware of a LinnStrument.

The firmware update file should be alongside the updater application and will be automatically detected.
The firmware update file should be placed alongside the updater application and will be automatically detected.

To get this .bin file, go to the Arduino IDE preferences and enable "Show verbose output during: compilation". Then, when you press the Verify button (the left-most) when the linnstrument-firmware sketch is open, it will compile the firmware and the before-last line will end with something like: /var/folders/nz/x2b_qbpj6j94wjq9jf8r1sx00000gn/T/build8779920126312548776.tmp/linnstrument.cpp.bin. This is the location of the compiled firmware. Copy the .bin file from there to the folder with the LinnStrument Updater and give it a name like linnstrument-firmware-103.bin. This name isn't necessary per-se, it will work with any .bin file for convenience, but it is a nice naming scheme to adopt.

On Windows, the compiled executable expects a 'tools' directory alongside it with the 'bossac.exe' binary. This is needed to perform the actual firmware update with a standard tool. The Visual Studio build steps will automatically create this in the build directories, just make sure to correctly more the 'tools' directory with 'LinnStrument Updater.exe'.

Thanks to Tod E. Kurt (http://todbot.com/blog/) and his usbSearch project for inspiration of how to detect Arduino devices: https://github.com/todbot/usbSearch

The bossac tool was copied from the Arduino IDE distribution and was created by ShumaTech http://www.shumatech.com/web/products/bossa
2 changes: 1 addition & 1 deletion Source/LinnStrumentSerialMac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool LinnStrumentSerialMac::detect()
else
{
String output = detectionChild.readAllProcessOutput();
int indexBegin = output.indexOf("LinnStrument SERIAL");
int indexBegin = output.indexOf("LinnStrument SERIAL"); // Look for a serial device named "LinnStrument SERIAL"
if (-1 == indexBegin)
{
std::cerr << "No LinnStrument serial device found" << std::endl;
Expand Down
4 changes: 3 additions & 1 deletion Source/LinnStrumentSerialWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ bool LinnStrumentSerialWindows::detect()
char* match;
dhGetValue(L"%s", &name, objDevice, L".Name");
dhGetValue(L"%s", &pnpid, objDevice, L".PnPDeviceID");
if (name != NULL && ((match = strstr(name, "(COM")) != NULL) && strstr(pnpid, "VID_F055&PID_0070") != NULL)
if (name != NULL &&
((match = strstr(name, "(COM")) != NULL) && // only use COM ports
strstr(pnpid, "VID_F055&PID_0070") != NULL) // only use a COM port that has the vendor and product ID of LinnStrument
{
char* comname = strtok(match, "()");
linnstrumentDevice = String(comname);
Expand Down

0 comments on commit c2c9b4a

Please sign in to comment.