STK200 Programmer setting under flowcode V4

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
tdrouin
Posts: 3
Joined: Sat Sep 10, 2011 12:16 pm
Been thanked: 1 time
Contact:

STK200 Programmer setting under flowcode V4

Post by tdrouin »

If I am using the STK200 with a parallel cable connected to lpt1, what the programmer parameters would be in flowcode V4 ?
Regards
Thierry

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: STK200 Programmer setting under flowcode V4

Post by Sean »

Hello Thierry,

The STK200 is not one of the programmers officially supported by Flowcode. As a result, we do not have much knowledge of it, or the ability to test it.

However, the AVRDUDE software supplied with Flowcode does appear to have settings for the STK200, so I have modified one of the Flowcode files to try to access it.

The file is called avrc_stk200.bat

It should be saved into the Tools\MX_bats\ folder of the Flowcode installation.

It can be accessed by changing the file name at the end of the Programmer -> Location path string to avrc_stk200.bat (found in the Chip -> Compiler Options menu).

Example
The full path string on my PC would be:
C:\Program Files (x86)\Matrix Multimedia\Flowcode AVR V4\Tools\MX_bats\avrc_stk200.bat

It should be possible to leave all other settings at their default values.
avrc_stk200.zip
(767 Bytes) Downloaded 349 times

The changes from the original avrc.bat file are in the top two lines. These select the programmer and port when using AVRDUDE

@SET Programmer=stk200
@SET DUDEPort=lpt1

The LPT Port numbering convention used by AVRDUDE is address based:

lpt1 = 0x378
lpt2 = 0x278
lpt3 = 0x3bc


Full AVRDUDE documentation is available on-line.

tdrouin
Posts: 3
Joined: Sat Sep 10, 2011 12:16 pm
Been thanked: 1 time
Contact:

Re: STK200 Programmer setting under flowcode V4

Post by tdrouin »

Dear Sean ,
Thanks for your respond.
Unfortunately I still can’t program under a stk200 using the batch file you suggest.
I checked the following command in a prompt dos command:
Avrdude –c stk200 –P lpt1 –p m8535 –U flash:w:myfile.hex
I got then the following error message:
Avrdude: can’t open device “giveio”
In order to install the driver “giveio.sys”, I have tried “install_giveio.bat”, “loaddrv.exe” and “avrdude-gui”, but all of them gave me back the following error message: invalid service name
I am in the administrator mode under XP (SP3). Programming with Codevision or Ponyprog is a succeed. Therefore the parallel port on my computer is not out of order.
I bought 10 licenses of Flowcode and I want my students to use only one software (flowcode) to program their microcontroller.
Have you got any idea in which way should I look for ?
Regards
Thierry

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: STK200 Programmer setting under flowcode V4

Post by Sean »

Hello,

giveio is required to allow AVRDUDE to gain access to the parallel port.

I have attached a copy of the AVRDUDE documentation. Page 29 includes instructions on the use of the various batch files.
avrdude.zip
(164.22 KiB) Downloaded 297 times
I have tried them on my XP (SP3) PC and they appear to work.

Running them from cmd.exe allows the output messages to be seen properly.

tdrouin
Posts: 3
Joined: Sat Sep 10, 2011 12:16 pm
Been thanked: 1 time
Contact:

Re: STK200 Programmer setting under flowcode V4

Post by tdrouin »

The problem is solved
Here is what I have done:
1. The file “loaddrv.exe” and “giveio.sys” have been copied to C:\windows\system32\drivers.
When launch “loaddrv”, add the name of the driver “giveio.sys”. (It says to indicate the path, not the name, that why I lost so much time. What a silly mistake)
Then clic “install” following by “start”
2. Copy the file “libusb0.dll” from “C:\Program Files\Matrix Multimedia\Flowcode AVR V4\Tools\avrispmkii driver” to “C:\Windows\system32. (Avrdude in Flowcode need it. How surprising that the flowcode installation software does not do that !!).
3. Modify, as Sean says in a previous message, the two first line of the file “C:\Program Files\Matrix Multimedia\Flowcode AVR V4\Tools\MX_bats\avrc.bat”.
i.e. Programmer=stk200 ; DUDEport=lpt1
4. I made a batch file including the following command: net start giveio. This file has been placed in the start menu in order to start automatically the driver giveio at each boot of the computer. If not, you have to do it manually with loaddrv.exe which is not confortable.

Hope that help someone.

Post Reply