Simple and configurable HEX uploader like XLoader or AX Loader needed

Status
Not open for further replies.

Paraglider

Well-known member
I am looking for a simple and configurable HEX file uploader. The idea is to give the enduser a simple possibility to upload the firmware of an embedded Teensy 3.1 project, without the necessity to install Arduino and Teensyduino. The idea is to have something similar to XLoader http://xloader.russemotto.com or AX Loader http://sourceforge.net/projects/axloader/. It would be ideal if the uploader could be custom configured, for that the enduser has no other option to choose from than the product he bought and wants to upload a new firmware. In my project the reset button is not accessible, it would be great if such an uploader would work like when uploading code to a Teensy 3.1 using the Arduino IDE.

Any chance to get such a simple and customizable HEX file uploader? Or might it be possible to get a modified and customized Teensy Uploader?
 
The simple uploader is still a problem. Tried with the teensy_loader_cli command line uploader, but couldn't make that work with Teensy 3.1. It would still be a good idea to have a simple and configurable Teensy 3.1 uploader for embedded Teensy 3.1 projects that use the Mini 54 chip on a custom made board. The board is inside a case, so there is no access to the reset button.

When using the teensy_loader_cli.2.1 on Windos / x64 the output form the command window is as follows:

D:\New\teensy_loader_cli.2.1>teensy_loader_cli -mmcu=mk20dx256 -w blink_slow_Teensy31.hex
Unknown MCU type

Looks like this is simply not possible with Teensy 3.1 and the teensy_loader_cli
 
Last edited:
Code:
#if defined(USE_LIBUSB)
				} else if (strcasecmp(arg+6, "mk20dx128") == 0) {
					code_size = 131072;
					block_size = 1024;
#endif

Hmm... :rolleyes:
 
Ok, I got the point. Looks like the mk20dx256 is not included in the program. But I don't know how to modify and compile the source code of teensy_loader_cli.2.1 in order to get a working exe file for Windows. I only have limited skills in Arduino programming.
 
Ok, I got the point. Looks like the mk20dx256 is not included in the program. But I don't know how to modify and compile the source code of teensy_loader_cli.2.1 in order to get a working exe file for Windows. I only have limited skills in Arduino programming.

Reprogramming seems not necessary (I have a cli that runs on windows 8.1). If you download the source code and compile it on a windows system with libusb and a windows gcc compiler installed, you should be able to generate a windows version yourself. From Paul's github site (where the code is) you see that the windows executable is older than the mk20dx256 modification. Consequently the teensy_loader_cli.exe has not been generated with the mk20dx256 modification.

There was a post last year that reported also successful compilation, but I cannot find it at the moment.
 
Reprogramming seems not necessary (I have a cli that runs on windows 8.1). If you download the source code and compile it on a windows system with libusb and a windows gcc compiler installed, you should be able to generate a windows version yourself. From Paul's github site (where the code is) you see that the windows executable is older than the mk20dx256 modification. Consequently the teensy_loader_cli.exe has not been generated with the mk20dx256 modification.

There was a post last year that reported also successful compilation, but I cannot find it at the moment.

I think he updates this. The new M0 is missing too.
 
If you download the source code and compile it on a windows system with libusb and a windows gcc compiler installed, you should be able to generate a windows version yourself. From Paul's github site (where the code is) you see that the windows executable is older than the mk20dx256 modification. Consequently the teensy_loader_cli.exe has not been generated with the mk20dx256 modification.

Correction: I just compared Paul's code with the one I have and they are different. UNFORTUNATELY, I did not recall where I got the Windows code from and the person that modified it did not leave a trace in the code. I will continue searching.
 
Could you upload the executable ?
here is a zip file. (the blink. hex and blink2.hex are included to see if download works)
I changed filename of zip file to avoid confusion with official command loader.

Note: I hardly use this feature as I'm happy with teensyduino. I used it with -w option. I have to press button to initiate download.
 

Attachments

  • teensy_cli_loader.zip
    28.2 KB · Views: 319
Thanks WMXZ! The only thing that's missing for my purpose is the need to press the button to initiate the download. My device I am working on is in an enclosure. And the customers should be able to upload the code in a simple way without having to install software, and also without the need to open the case for pressing the reset button. It would be great if Paul could update his code to solve that issue.
 
Thanks WMXZ! The only thing that's missing for my purpose is the need to press the button to initiate the download. My device I am working on is in an enclosure. And the customers should be able to upload the code in a simple way without having to install software, and also without the need to open the case for pressing the reset button. It would be great if Paul could update his code to solve that issue.

You could add an extrnal PROG Button.
 
If you're using USB Serial, open the port and set the baud to 134.

But if you ever upload firmware that doesn't respond or crashes mysteriously, the only way to recover is by pulling the PROG pin low. That's why every Teensy has a pushbutton!
 
Thanks WMXZ! The only thing that's missing for my purpose is the need to press the button to initiate the download. My device I am working on is in an enclosure. And the customers should be able to upload the code in a simple way without having to install software, and also without the need to open the case for pressing the reset button. It would be great if Paul could update his code to solve that issue.

The attached version does not require the reset button to be pressed.
I merged for this version part of the Paul's unsupported teensy_reboot.c (Windows only) to teensy_loader_cli. (I have no Mac/Linux)
no -w is required.

Even if the SW is unsupported, I hope it is useful.
 

Attachments

  • teensy_cli_loader.zip
    44.2 KB · Views: 257
Thanks WMXZ, this SW is very useful! This is exactly what I needed. And it's no longer necessary to press the reset button, perfect! So it will be very easy for customers to upload new code. Might it be possible to port the code for that one can also update the firmware using a Mac?
 
Status
Not open for further replies.
Back
Top