Native Linux Support for AVRProg2
Native Linux Support for AVRProg2
Dear Linux-Mikroe-Devboard Users,
and the ones who want to be such. We are happy to announce that we wrote a command line tool supporting the Mikroe AVRProg2 programmer natively on Linux.
It is available as SourceForge project at https://sourceforge.net/projects/avrprog2/
We have already tested it and it work great on Ubuntu, but now we need your help to test it as well.
Please note that all credits for the Programmer go to one of my students who did the actual work, so we can use Mikroe AVR development boards in our lab-course at university.
Thanks to Mikroe for their support and their permission to publish it. We are sure that the acceptance of their development boards in the Linux community will get a significant boost, as such a programmer is exactly what we needed (according to the entries in this board - since 2003 ).
The programmer already has some nice features like the automatic detection of the used MCU package and we are planning to add some other cool features to it in the future.
But now we need your help to test it and report your experiences for further improvements.
Have a lot of fun with the Linux programmer!
Yours,
Alex
and the ones who want to be such. We are happy to announce that we wrote a command line tool supporting the Mikroe AVRProg2 programmer natively on Linux.
It is available as SourceForge project at https://sourceforge.net/projects/avrprog2/
We have already tested it and it work great on Ubuntu, but now we need your help to test it as well.
Please note that all credits for the Programmer go to one of my students who did the actual work, so we can use Mikroe AVR development boards in our lab-course at university.
Thanks to Mikroe for their support and their permission to publish it. We are sure that the acceptance of their development boards in the Linux community will get a significant boost, as such a programmer is exactly what we needed (according to the entries in this board - since 2003 ).
The programmer already has some nice features like the automatic detection of the used MCU package and we are planning to add some other cool features to it in the future.
But now we need your help to test it and report your experiences for further improvements.
Have a lot of fun with the Linux programmer!
Yours,
Alex
Re: Native Linux Support for AVRProg2
Hi,
Do you have working examples for a ATMEGA32 Device.
I mean, a XML File and the CLI Sequence for bruning the Device?
I just tired this:
The Result I get:
sinclery
Guenter
An OM in Carinthia.
Do you have working examples for a ATMEGA32 Device.
I mean, a XML File and the CLI Sequence for bruning the Device?
I just tired this:
Code: Select all
<device>
<name>ATmega 32</name>
<signature>0x1e9502</signature>
<flashSize>32768</flashSize>
<eepromSize>2048</eepromSize>
<numOfFuses>2</numOfFuses>
<!--<socket>TQFP64</socket> use autodetection-->
</device>
Code: Select all
#!/bin/sh
CPU=atmega32
HEXFILE="../vfomain.hex"
FREQ=8000000
# - internal RC - 8MHz
avrprog2 -d -m ${CPU} -f ${FREQ} --erase --flash w:${HEXFILE}
avrprog2 -d -m ${CPU} -f ${FREQ} --flash v:${HEXFILE}
Code: Select all
avrprog2 1.0.0
System configuration directory: /usr/local/share/avrprog2/
User configuration directory: ~/.avrprog2/
Prepare buffer for flash operations.
Load hex file
Add section: '.sec1' at 0x0.
Extend buffer to: 8246 bytes.
Infos from device description file '/home/oe8str/.avrprog2/atmega32.xml':
Device name: ATmega 32
Size of flash memory: 32768 bytes
Size of eeprom memory: 2048 bytes
Number of fuse bytes: 2
Device signature: 0x1e9502
Socket: auto
Connect to usb device...
Programmer Name: AT FLASH prog - AVR
Programmer Version:
02 06 02 1c
Set programming speed to 4
Autodetect programming pins...
Device Signature: 0x1e9502
Connected to 'ATmega 32'.
Chip erase...
Write to flash memory...
0% 100%
################################################################################
8246 bytes written
Close usb connection...
avrprog2 1.0.0
System configuration directory: /usr/local/share/avrprog2/
User configuration directory: ~/.avrprog2/
Prepare buffer for flash operations.
Load hex file
Add section: '.sec1' at 0x0.
Extend buffer to: 8246 bytes.
Infos from device description file '/home/oe8str/.avrprog2/atmega32.xml':
Device name: ATmega 32
Size of flash memory: 32768 bytes
Size of eeprom memory: 2048 bytes
Number of fuse bytes: 2
Device signature: 0x1e9502
Socket: auto
Connect to usb device...
Programmer Name: AT FLASH prog - AVR
Programmer Version:
02 06 02 1c
Set programming speed to 4
Autodetect programming pins...
Device Signature: 0x1e9502
Connected to 'ATmega 32'.
Verify flash memory...
0% 100%
################################################################################
failed, 8246 bytes verified
Close usb connection...
sinclery
Guenter
An OM in Carinthia.
Re: Native Linux Support for AVRProg2
Hi,
sorry we do not have a ATMEGA32, however your device description file looks good.
Have you ever tried this?
This does programming and verifying at once.
Further you can try to use a lower frequency setting for the programmer.
Regards Andreas
sorry we do not have a ATMEGA32, however your device description file looks good.
Have you ever tried this?
Code: Select all
avrprog2 -d -m ${CPU} -f ${FREQ} --flash w:${HEXFILE} -v
Further you can try to use a lower frequency setting for the programmer.
Regards Andreas
Re: Native Linux Support for AVRProg2
Hi, I can't compile the software on Fedora 15, I posted a question on the project forum but I don't know if that's really active. Please have a look https://sourceforge.net/projects/avrpro ... ic/4603079
Re: Native Linux Support for AVRProg2
just for the archives, the software now works on Fedora 15
Re: Native Linux Support for AVRProg2
Hi,gbl wrote:Hi,
Do you have working examples for a ATMEGA32 Device.
I mean, a XML File and the CLI Sequence for bruning the Device?
since version 1.2.0 avrprog2 supports smaller AVR devices too. The config files now have an entry for the flash page size.
I tested with an ATmega16.
Regards
Re: Native Linux Support for AVRProg2
I have successfully programmed an avrplc16 (which has an atmega32) using this config file:
However, I had trouble when my hex files were very small. In those cases, a lot of FF bytes seemed to be written (I checked by reading back the program using the AVRFLASH utility under windows).
I tried three different hex files from the avrplc16 examples (http://www.mikroe.com/eng/downloads/get ... s_v100.zip):
These examples work:
Code: Select all
<device>
<name>ATmega32</name>
<signature>0x1e9502</signature>
<flashSize>32768</flashSize>
<flashPageSize>128</flashPageSize>
<eepromSize>2048</eepromSize>
<numOfFuses>2</numOfFuses>
<!--<socket>auto</socket> use autodetection -->
</device>
I tried three different hex files from the avrplc16 examples (http://www.mikroe.com/eng/downloads/get ... s_v100.zip):
These examples work:
- AVRPLC16\ v6\ PLC\ System\ Examples/mikroC\ PRO\ for\ AVR/SPI\ Ethernet/HTTP_Demo.hex (14878 bytes)
- AVRPLC16\ v6\ PLC\ System\ Examples/mikroC\ PRO\ for\ AVR/GSM/GSM\ Calling\ Demo/GSM_Calling_Demo.hex (2762 bytes)
- AVRPLC16\ v6\ PLC\ System\ Examples/mikroC\ PRO\ for\ AVR/Optocouplers\ to\ Relays/OC_Relays.hex (216 bytes)
Re: Native Linux Support for AVRProg2
Hi,knutauvor wrote:However, I had trouble when my hex files were very small. In those cases, a lot of FF bytes seemed to be written (I checked by reading back the program using the AVRFLASH utility under windows).
yes, there was a bug with small programs in version 1.2.0, which is already fixed in the trunk version in the repository.
Please try the newest trunk version directly from the repository.
Regards
Re: Native Linux Support for AVRProg2
The trunk seems to work just fine. May I suggest you release it as version 1.2.1?
Re: Native Linux Support for AVRProg2
Thank you for your report. Version 1.2.1 is now available.knutauvor wrote:The trunk seems to work just fine. May I suggest you release it as version 1.2.1?
Regards
-
- Posts: 1
- Joined: 15 Mar 2012 11:59
Re: Native Linux Support for AVRProg2
hey good to know!)
i have Linux at work and was going to get it for my own PC too
i have Linux at work and was going to get it for my own PC too
-
- Posts: 1
- Joined: 24 Mar 2012 04:44
Re: Native Linux Support for AVRProg2
With ZIF socket, it becomes a standard programmer used for a large-scale production.
One of the possible ways of connecting AVRprog2 to a microcontroller is via an IDC10 connector. Refer to figure on the right. You just have to place a 2x5 connector between the microcontroller and other on-board modules. By embedding the AVRprog2 connector you will be able to perform In-System AVR. A flat cable with an IDC10 female connector on its end is used here. When creating a target device, it is necessary to provide the appropriate 10-pin male connector with 2.54 mm spacing between pins on it. The connector pins should be connected to the microcontroller pins. Their position varies depending on the microcontroller's type and package.
One of the possible ways of connecting AVRprog2 to a microcontroller is via an IDC10 connector. Refer to figure on the right. You just have to place a 2x5 connector between the microcontroller and other on-board modules. By embedding the AVRprog2 connector you will be able to perform In-System AVR. A flat cable with an IDC10 female connector on its end is used here. When creating a target device, it is necessary to provide the appropriate 10-pin male connector with 2.54 mm spacing between pins on it. The connector pins should be connected to the microcontroller pins. Their position varies depending on the microcontroller's type and package.
Re: Native Linux Support for AVRProg2
This works for EasyAVR v7
-
- Posts: 1
- Joined: 16 Nov 2018 15:57
Re: Native Linux Support for AVRProg2
I wonder if it will work for later versions
- petar.suknjaja
- mikroElektronika team
- Posts: 683
- Joined: 05 Mar 2018 09:44
- Location: Belgrade
Re: Native Linux Support for AVRProg2
Hi,
I don't know why it shouldn't, but you could ask the author of the post.
Kind regards,
Petar
I don't know why it shouldn't, but you could ask the author of the post.
Kind regards,
Petar