Open the project, and compile.
Excellent. It created the blinky.hex
Next issue is avrdude. With the OPs instruction I got some errors and here's what I have done so far. The
green bits are where I have installed the Arduino stuff, so, others will need to swap in their own for their installation. Most likely "c:\program Files\Arduino" at a guess.
The Path to avrdude within the Arduino installation folders needs to be added to the Windows Path.
D:\_Programs\_ArduinoIDE\hardware\tools\avr\bin
Also, the configuration file for avrdude needs to be included in the OP's instructions and some extra items added to the command. Please note that command line switchs for avrdude
ARE case-sensitive.
D:\_Programs\_ArduinoIDE\hardware\tools\avr\etc\avrdude.conf
Here is the contents of a batch file, but so far it only uploads to a Uno and not a Nano or Mega. With the Nano/Mega avrdude hangs and then fails after 10 tries with a ten of these errors.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x53I saved the batch file as "test.bat" in the same folder as blinky.hex and launched within a Command Prompt with "test com5 blinky.hex" (without quotes) and it has the Uno blinking on com port 5.
avrdude -CD:\_Programs\_ArduinoIDE\hardware\tools\avr\etc\avrdude.conf -v -patmega328p -carduino -P\\.\%1 -b115200 -D -Uflash:w:%2:i
Good news is the failed Nano/Mega uploads did no damage to the boot-loader in the Nano or Mega as they still upload OK from the Arduino IDE.
I also tried to create an External Tool within the Lazarus IDE to launch that batch file, but cannot seem to make it work.
Things still to fix.
1: Assign the various boards for avrdude to work with Nano, Mega etc.
2: Create a working External Tool with in the Lazarus IDE to launch the batch file.
It's getting closer.

Thanks for everyone's help so far.
p.s.
I have blocked C/C++ tutorial sites from my browser.
