Hello hicham,
Yes you can flash a arduino ( in my case it's a nano )
by using Xloader or directly from ld micro YES !!!!!!
No need to use a C format !!!! or a programmer, use the usb
cable and the bootloader of the arduino.
You need to use (for a nano):
- the last version of ldmicro 4.1.3 -> for the cpu support.
- set the microcontroler : atmega328 28pin
- set the crystal to 16 mHz
- Use the cpu pin reference see :
http://www.pighixxx.com/test/pinouts/boards/nano.pdf
pin 13 = PB5
then you make your ladder program and compile.
After you flash by Xloader the hex file chose atmega328,
or flash by using flashMCU.bat
You need avrdude, i use the file from xloader,
and the com port of your arduino ( in my case com3 ).
After you edit the flashmcu.bat
rem set the path of avrude
SET AVRDUDE_PATH=D:\Program\Electronique\Ldmicro\XLoader\
rem the programer for the arduino
SET AVRDUDE_PROGRAMMER_ID=stk500
rem set the type of the arduino cpu
SET AVRDUDE_PART_ID=m328p
rem set the serial port -Pcom3 and speed -b57600
%AVRDUDE_PATH%avrdude.exe -y -c %AVRDUDE_PROGRAMMER_ID% -p %AVRDUDE_PART_ID% -PCOM3 -b57600 -U flash:w:"%2.hex":a -E noreset, vcc
Have fun
Gerard
ps: i change the .bat to .txt for my flashMcu