Menu

EasyAVR5A, openSUSE 11.4

Help
Johannes
2011-09-17
2013-04-21
  • Johannes

    Johannes - 2011-09-17

    Hi, thanks for the great job on this programmer!

    I had to change some little bits in the Makefile to get it compiled on openSUSE 11.4:

    -LIBS = -lboost_system-mt -lboost_filesystem-mt -lbfd -lusb-1.0
    +LIBS = -lboost_system-mt -lboost_filesystem-mt -ldl -lbfd -liberty -lz -lusb-1.0

    -mandir = ${datarootdir}/man
    +mandir = ${prefix}/man

    I'm now trying to get an EasyAVR5A board working, but there's a different socket on it (PDIP40) than the two You've stated in avrprog.h. Do You know the correct number to use here?

     
  • Andreas Hagmann

    Andreas Hagmann - 2011-09-19

    Hi,

    thanks for the SUSE things.

    To your problem with your board:
    Have you ever tried the autodetection (its only implemented in the trunk version)?

    I have a BigAVR6 board, but no MCU with a 40 pin package, so I cannot try it out.

    The define in avrprog.h does not directly specify the package, but rather the programming pins. So maybe it works with your board too.

    Regards Andreas

     
  • Johannes

    Johannes - 2011-09-19

    Hi,

    thanks for the quick answer!. Unfortunately the autodetection doesn't work. :-(

    As far as I understand the code in CAvrProgCommands.cpp the method "connect" tries to select different numbers via "selectSocket" and produces the errormessage "No device found during autodetection of programming pins." if none fits. Exactly this happens when I run the program.
    The two sockets which are tried seem to have the numbers 1 and 2. Are these internal numbers of the two sockets or something else? And if yes, what would be the number of the socket of the 40 pin package.
    Would it be safe to just try various numbers to see if anyone fits?

    Regards Johannes

     
  • Andreas Hagmann

    Andreas Hagmann - 2011-09-19

    Hi,

    you understood it correctly.

    The number is a parameter for the command 0x04 (which is something like "select socket"), which is sent to the programmer hardware (that all is in the method "CAvrProgCommands::selectSocket").

    Currently I don't know the number for the 40 pin package (Maybe I can find it out without a board, but I will need some time to do that.)

    Yes, it shoud be save to try different numbers. It's just one byte, so it should be possible to find the right number…

    Regards Andreas

     
  • Johannes

    Johannes - 2011-09-20

    Hi,

    I just tried different Numbers and got a lucky hit with 0x04! The programmer now can connect to the device and reads the correct signature (0x1e9403).

    But when I try to flash anything it obviously goes wrong :-(  I have written a very simple program which just switches the LEDs on PORT D on and off like a binary clock, but they all stay dark.

    The call is

    avrprog2 -m atmega16 -f 8000000 --erase --flash w:clock.hex -v
    

    The output is
    Autodetect programming pins…
    Connected to 'ATmega 16'.

    Chip erase…

    Write to flash memory…
    0%                                                                          100%
    ################################################################################
    2460 bytes written

    Verify flash memory…
    0%                                                                          100%
    ################################################################################
    Verify flash failed.
    Exiting…

    Have You any idea what's going wrong here?

    Regards Johannes

     
  • Andreas Hagmann

    Andreas Hagmann - 2011-09-20

    Hi,

    the first thing sounds good.

    The second Problem sounds like this one:
    http://www.mikroe.com/forum/viewtopic.php?p=153952#p153952

    I had only atmega128(0) devices for testing the programmer. Maybe the procedure for smaller devices is different…

    However, have you ever tried to read the flash memory into a file after programming?

    avrprog2 -m atmega16 -f 8000000 --flash r:out.hex
    

    Further you can call the programmer with the debug option, try

    avrprog2 -m atmega16 -f 8000000 -d -d --erase --flash w:clock.hex -v
    

    Please post the result (or send it to me if it gets too long, my email address is "ahagmann at ecs.tuwien.ac.at").

    Regards

    ps: its on my todo list to test (and make it work) the programmer with smaller devices too. Maybe I will find time to do this in the next few weeks…

     
  • Johannes

    Johannes - 2011-10-14

    Just for the records: with Version 1.2.1 everything is working fine.
    Thanks
    Johannes

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.