A few of our users have said they have problems getting their Arduino hardware up and running with Flowcode v6 so I thought I would write a quick post on how it's done.
First of all I have downloaded the latest Arduino software and installed it.
Once installed I plugged in my Arduino Uno board to the USB, skipped the fruitless Windows update driver search and it then installed itself as an Uno on COM9.
The AVR device selection window has the category names hidden by default, expand the window sideways and the names will appear.
My device is the Arduino R3 PDIP.
I then created a simple program to test out the programming functionality.
Compiling to chip I get the following messages.
Code: Select all
C:\Users\BenR\Desktop>"C:\PROGRA~2\FL5209~1\COMPIL~1\avr\BATCHF~1\..\bin\avrdude.exe" -p m328p -P usb -c avrispmkii -U flash:w:"Flowcode3.hex"
avrdude.exe: usbdev_open(): did not find any USB device "usb"
Error returned from [avrdude]
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avrc.bat reported error code 1
Click the Save Disk icon up near the top of the window to create a new set of configurable options.
You will be asked for a setting name, I will use "Arduino Uno R3" but any memorable name will work, Target platform is AVR, Compiler Language is C and create in group is AVR.
Click Ok and then make sure your new setting is set to be the default.
Next click the Programmer tab and you will now be able to edit the data in the fields.
Take the Location and change the text to this.
$(appdir)compilers\avr\batchfiles\avrc_arduinoA.bat
Take the Parameters and change the text to this.
$(chipalt) stk500 com9 115200 "$(target).hex"
Here is a list of baud rates and programmer options for the different Arduino targets. The COM port number should match that assigned by the device manager.
***IMPORTANT NOTE***
There has been reports that the ATMEL AVRDUDE program does not handle COM ports over COM9 very well, if the COM port your Arduino device is assigned is over COM9 then you need to un-assign a lower COM port.
- It may not work if you manually assign a COM port, you may have to assign a lower COM port, scan for hardware changes, then uninstall the device and then reinstall allowing Windows to assign a COM port below 9.
- Sometimes if a COM port is changed it is locked out and may require a computer reboot if a COM port is changed – be aware of this.
Finally the batch file included with 6.0.3 has a bug which looks in the wrong place for the programming software. This file has the issue fixed.
Place into the following directory - "Flowcode 6\compilers\avr\batchfiles"
Now when I click compile to chip in Flowcode.
Code: Select all
C:\Users\BenR\Desktop>"C:\PROGRA~2\FL5209~1\COMPIL~1\avr\BATCHF~1\..\bin\avrdude.exe" -p m328p -P com9 -b 115200 -c stk500 -U flash:w:"Flowcode3.hex"
avrdude.exe: successfully opened stk500v1 device -- please use -c stk500v1
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e950f
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "Flowcode3.hex"
avrdude.exe: input file Flowcode3.hex auto detected as Intel Hex
avrdude.exe: writing flash (786 bytes):
Writing | ################################################## | 100% 0.18s
avrdude.exe: 786 bytes of flash written
avrdude.exe: verifying flash memory against Flowcode3.hex:
avrdude.exe: load data flash data from input file Flowcode3.hex:
avrdude.exe: input file Flowcode3.hex auto detected as Intel Hex
avrdude.exe: input file Flowcode3.hex contains 786 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% 0.25s
avrdude.exe: verifying ...
avrdude.exe: 786 bytes of flash verified
avrdude.exe done. Thank you.
Programming successful!
FINISHED