Hello,
I know that it is not very useful as it is now. The problem is, that I like the plugin-style like jmpessoa made. But I don't know how to do it and I didn't manage to take a closer look in his sources, yet. The same with distributing the compiler, providing binaries would be easier I guess. What I don't understand so far, is the target instruction set, e.g. AVR5, it seems it has to be defined twice, once when compiling the avr-compiler and once when compiling the programm. Does it need a seperate avr-compiler for each target instruction set? And what instruction sets are even supported?
About your suggestions:
1. Sort list of devices, this makes it easier to find a device (Combobox.Sorted := true )
Good point!
2. On my installation it is necessary to change the binutils prefix to avr- by passing the -XPavr- switch to the compiler. May be useful to make this option visible somewhere in the wizard. Would be convenient if an automatic check can be done to identify the correct prefix, 2nd best would be to check if current configuration can call avr as (on my machine this is avr-as, could be avr-embedded-as on other machines)
Here I'd rather provide suitable binaries. About the prefix, I think an optional one makes things unnecessarily complicated. As you can name the binaries while compilation as you wish. But it might be useful to always use the 'avr' prefix and make that as standard.
3. I prefer it if the programmer action is only added to the "execute after run" option. I compile often as I write code to check for errors and would not want to program the device every time.
I wanted to do that, especially for embedded devices a compilation without a combined program upload is quite useful. But I don't know how to tell Lazarus not to search for an executable when pushing "run". Any idea?
4. If a user selects a programmer that requires a serial port parameter then it would be useful if a list of available ports can be presented a la Arduino IDE. Synapse and PascalSCADA have some code to scan for ports on various OS's.
Good idea, and with the libs quite easy.
5. Other popular programmers that can be added to the list of programmers: "avrispv2", "arduino" and "usbasp". USBasp doesn't require a port parameter since it runs over USB.
Programmers can actually be added very easy, just place a file in the subfolder 'Programmer' and subsubfolder 'AVRDude' or 'Others'. The file name (no file extension) is the programmers name, listet in the dropdown 'programmer'. As content you can write the command line using wildcards. The port parameter by the way is only shown when the corresponding wildcard is used in the file. The files are loaded on programm start.
Of course the programmer command lines should be collected and distributed with the Wizard, but also your own custom command line is as easy to add without reinstallation.
As summary the critical topics for me are now:
- Wizard as stand-alone or as Lazarus plugin?
- How to provide the compiler/binutils, as binaries or as build script? In case of binaries how to host?
- How to compile the avr-compiler for all different instruction sets?