Simple hex uploader

Created a simple hex uploader with the use of avrdude.

I think the ones I’ve found online are to complicated for non developers to work with.
I use this to give to people to program my boards without having to give my source.

(This if just for the 328p-pu(uno) for now)

Hope someone will enjoy…

Uploader.zip (586 KB)

Targeting windows, what a shame, useful would have been source to target other environments because not all people use windows.

While I have it on a couple of desktops and laptops, other than a machine to browse the internet or google something, due to windows it's a waste of hardware.

Targeting windows, what a shame, useful would have been source to target other environments because not all people use windows.

'course, us Windows users making up 88.77% of market share could say the same about other target environments.
https://www.netmarketshare.com/operating-system-market-share.aspx?qprid=10&qpcustomd=0

And we use both at home - Windows for PCB creation & coding. Mac for browsing.

The issue is more based on the lack of flexibility in the package offered by the OP.

A developer who targets only a specific OS is one who has a narrow view of the world.

Surely the software isn’t so proprietary that the source couldn’t be provided so that it could be utilized by everyone and people like me wouldn’t have to disassemble it to generate source.

It would have at least spawned improvements in the code/solution to the benefit of everyone.

Despite the environment, a disassembly using IDA-Pro shows me the code is rudimentary and it wouldn’t hurt to rewrite some of the functions.

Basically it’s a binary wrapper to execute avrdude with a pre defined hex file.

I’ve since made significant modifications to avrdude 6.1, libusb and zlib to make use of an embedded zip compressed hex file for a single executable solution that requires nothing but double-clicking but I still see no value in the app, basically it’s moot since I can execute avrdude directly in ubuntu and OSX and specify the hex file to flash and I don’t have to go through the effort of turning the hex file into compressed data for embedding requiring me to recompile for every time I change the firmware.

I fail to see why a simple terminal command couldn’t be provided to flash the hex file or a batch file for winbloze users instead of a app that does it for you in windows only thus offending linux and OSX users who can’t update the firmware in his goods.

It’s not like he combined his source with the avrdude source to target his specific device, reducing avrdude source to it’s bare minimum, targeting a single serial device with values preset and the payload embedded would have been a better approach over a binary wrapper and I guess this thought didn’t cross his mind as a better solution or he’s never considered such a solution.

Maybe he’ll take some of what I said in this post as a direction to move his app, you don’t need libusb to be a DLL if you embed the functions in the app, same as zlib, I’ve used this embedded decompression technique to do make self sustaining apps and I’m sure I’m not the only one who’s done this.

I’m done with the thread, there’s nothing of value to me, good luck to everyone involved in it.

As i said: I use this to give to people to program my boards without having to give my source.
it’s just the same as using avrdude at the command line.

My goal was to make it easier for the workers here to program the controller, if the goal was making the software than i would off-course put more effort in it and take care of a lot of details.

This software does exactly what it’s designed to do and nothing more, i work by the hour and can’t waste my time.

I can see how this is kind of harsh in a open source community, but i work in a different kind of company.

If anyone still wan’ts to go to the trouble of dissasambling my program, here is the source:

static void Main(string[] args)
        {
            string SerialPort = "";
            do
            {
                Console.WriteLine("Simple uploader by |<3|\\||\\|'/");
                Console.WriteLine("Please type your serial port number and press enter...");
                SerialPort = Console.ReadLine();
            }
            while (SerialPort == "");

            string path = Directory.GetCurrentDirectory();
            string[] files = Directory.GetFiles(path, "*.hex");
            string file = Path.GetFileName(files[0]);
            string syntax = "-C" + '\u0022' + "avrdude.conf" + '\u0022' + " -v -v -v -v -patmega328p -cstk500v1 -P" + '\u005c' + "\\." + '\u005c' + "COM" + SerialPort + " -b115200 -D -V -Uflash:w:" + '\u0022' + file + '\u0022' + ":i";

            System.Diagnostics.Process Program = new System.Diagnostics.Process();
            Program.StartInfo.FileName = "avrdude.exe";
            Program.StartInfo.Arguments = syntax;
            Program.Start();
        }

I know it can be a lot better, but i was going for simple…