Programming Arduino’s with DIY-sensors firmware can be a hazzle. There is a few options out there like installing Arduino IDE, working with libraries and so on. Then there’s small and simple XLoader used to upload .hex file to Arduino board.
XLoader has some (at least to me) annoying features, it does not behave well when upload is failed. Also if uploading several boards it can be a bit difficult to see if everything is ok or not.
So, I made own uploader with an philosophy “less is more” aimed to basic user with no installation needed and simple but informative progress on upload.
Current release-version is v.1.0.7 (Released 2018-02-21)
- Select firmware (.hex-file)
- Select serial port where your programming cable is connected
- Connect to Arduino
- Press Upload in the Uploader and reset on Arduino
- Supports XSensor boards with Optiboot bootloader
Tested Arduino compatibility:
- Arduino Pro Mini 3.3V 8Mhz
- Arduino Pro Mini 5V 16 Mhz
- Arduino Nano 16Mhz
Windows only application. Tested on following operating systems:
- Windows 7 32-bit
- Windows 7 Starter 32-bit
- Windows 7 64-bit
- Windows 10 64-bit
Windows XP is not officially supported at this moment.
- 1.0.0 First public release
- 1.0.1 Bugfix – Dll-separation of 32/64-bit versions
- 1.0.2 Crashfix – Better faulthandling on serial errors and Dll-separation reverted
- 1.0.3 Better protection for user who needs RTFM :)
- 1.0.4 “Uploading – Please wait”-message being stuck in some condition corrected
- 1.0.5 Trimmed upload-timing for bigger firmware’s
- 1.0.6 Timings re-defined – Better compatibility with slower USB-adapters
- 1.0.7 Added support for boards with Optiboot-bootloader. (For example for XSensor)
Get the most recent version: RCT-Uploader v.1.0.7
Comparison to XLoader
- More reliable status of upload-process
- Always shows correctly successful / failed upload
- Faster timeout in case of failed upload
- Works with 3.3V 8Mhz and 5V 16Mhz Arduino Pro Mini’s without settings-changes
Main difference to XLoader is that often XLoader does not update the status-strip. Also XLoader does not monitor the avrdude-process so user needs to open taskmanager and kill it in case of upload-error or stuck avrdude.
RC-Thoughts Firmware Uploader tries to make sure avrdude-process is not left to hang. Also there is no need to close/reload the app in case of missed upload.
After downloading the zip-file right-click on the zip-file:
And confirm destination:
After this you have a new folder in your directory:
Go into folder so you have the application and some other files like version changelog etc:
Uploader application is started by double-clicking the executable RCT-FW_Uploader.exe file.
Using the application is very simple. Application has a minimal amount of settings.
In order to upload the firmware we need to give application only two things, point it to the firmware-file and give the serial port used. Clicking the “…”-button next to firmware path window you can select the correct firmware:
After this you can see the path to file in the RCT-Uploader:
Next we need to select correct serial port from the drop-down list:
If you forgot to attach the USB-programming cable attach it to computer and press the “Scan”-button to re-scan available serial ports, you will now see the added port, in my case COM6:
Connect the USB-programming cable to Arduino. Most usual and recommended cable is this type (USB To RS232 TTL UART):
Connect it to Arduino with following connection:
Cable Black <-> Arduino GND
Cable Red <-> Arduino VCC
Cable Green <-> Arduino RX
Cable White <-> Arduino Tx
I usually do not solder any pins to Arduino, instead I have 4 pins in the cable and simply put them into Arduino programming holes. Makes a neater end result.
How to upload
Now you have selected correct hex-file, serial-port and you have connected Arduino. Procedure is simple, press Uploaders “Upload”-button and right after that press Arduino’s reset-button.
Timing of Arduino’s reset-button might take few tries but you’ll get it. I have found that following method works quite well: Press the “Upload”-button then quickly press the Arduino’s reset-button with same finger. The time it takes for you to move your hand is pretty much correct every time.
When uploading application shows the status in the bottom of application:
If you had your settings correct and upload was successful you will see a confirmation on the bottom:
Your DIY-sensor is now ready!
Usage if you are updating XSensor
If you have a XSensor that means you have a Arduino-board with Optiboot bootloader. In order to use that the flashing is a bit different, so to upload the XSensor firmware you need to check the small checkbox. And then it’s uploaded the same way as RCT-sensors are. (Supported from RC-Thoughts FW Uploader version 1.0.7)
Errors and solutions
Of course everything does not always work as planned. Some are user-related like no file selected:
Or no serial port selected:
In case you selected wrong serial port or there is a problem with the port you can experience this:
In this case check your serial port COM-port so it’s correct.
If you have everything correct but do not get the timing correct with the Arduino’s reset button uploading will fail and after the timeout you are notified with uploading error message:
As error-message tells you, please retry.
If you have issues with RC-Thoughts Firmware Uploader
I would like to know about them, please send a message to me via contact-page here, please include following information:
- What windows (example “Windows 7 32-bit”)
- What were you uploading (example “G-Sensor file”)
- What was the error?
- Possible screenshot of error?
- Include the file “flashlog.txt” from uploader-directory
You’d be surprised how many of error-emails include just “doesn’t work”, not really possible to do anything with that. So please, include some info to go with right from the start :)
RC-Thoughts Firmware Uploader comes “as is” with no warranty whatsoever.
Always make sure everything works as it should. Do not use faulty devices. neither RC-Thoughts and/or me are in any way liable or responsible for anything you do with your equipment or to others with equipment used as described here. You should never use LUA-apps for operation-critical functions.
If you find something that is not working or is behaving strangely please let me know. I’m a car-mechanic by training, not a programmer-geek :)