Mar
30

MegaLoad


No longer support for Megaload

History

MegaLoad is a Windows based boot loader for all Atmel ATMega microcontrollers that support the Bootloader function.  MegaLoad is a solution for everybody who wants fast loading (~8k in 3 seconds) and easy software upgrade via MCU RS232 port.

MegaLoad is written in Visual C# and the source code is available for 100$usd that can be pay via paypal at bibi@microsyl.com

Features

  • support device larger than 128k flash
  • Small Bootloader code. Only 256 words if only flash program is need (512 word if flash & EEPROM)
  • Only embedded requirement is RS232 connector like a MAX232.
  • Communicates at 9600,19200,38400,57600,115200bps on Com1 to 20
  • Simple Monitor window is available to help you to debug your code
  • Checksum everywhere to secure data
  • Automatic page retry, if error in flash programming
  • Automatic byte retry, if error in EEPROM programming
  • Manual set & clear DTR,RTS if need.
  • Reset button

 

System Requirements

  •  Windows, .NET framework 2.0 runtime
  • RS232
  • ATMega

Picures

Download

Megaload Tutorial

Megaload Software

Megaload Bootloader Code for ICCAVR

Megaload Bootloader for CodeVision



128 Comments to “MegaLoad”

  • DreamCat March 31, 2010 at 3:49 pm
  • admin March 31, 2010 at 4:50 pm

    It’s fix now please give it a try,

    Sylvain

  • DreamCat April 1, 2010 at 6:10 am

    maybe your website need do some repair.
    I downloaded it , got a .zip file but only 20k bytes, and it’s a html file, content is “Sorry, but you are looking for something that isn’t here. ”
    and then I use Orbit downloaded it, it’s this time I got correct file.

    Thank you provide it.

  • admin April 1, 2010 at 11:28 am

    Hi DreamCat,

    I complitly change my old web site for a blog, all the link had move. If you find some problem getting any file please le me know with the exact download link that is broken or a file with bad information.

    Sylvain Bissonnette

  • Noor April 6, 2010 at 8:09 pm

    hi
    thank you
    if you plz i need a tutoriat to trat with the megaload.Net
    what do you  DTR    , RTs
    and do you realy work with it plz if that send to me the basic circuit for it… 

  • admin April 6, 2010 at 8:17 pm

    Hi,

    You don’t have to use DTR and DSR in most application, only Tx,Rx of your MCU to your PC running MegaLoad, I don’t have any tutorial on MegaLoad but if you read your MCU datasheet in the bootloader section and you read the Source code in C you will be Ok.

    Sylvain

  • José Xavier April 16, 2010 at 5:30 pm

    What are the fuses and lock bits?

  • admin April 16, 2010 at 5:42 pm

    Hi,

    Fuse bit & Lock bit are the way to configure your MCU, Please check the AVR datasheet everything you need is there

    MicroSyl

  • José Xavier April 16, 2010 at 5:51 pm

    I change the megaload bootload files to use a atmega168 at 20Mhz with ICCAVR and go to project->makeproject and when i try tu burn it the avrstudio says: "contents of the HEX file does not fit in device" :S

  • admin April 16, 2010 at 5:54 pm

    Check the project size in ICC in the option menu, your bootload size could be bigger than the size you had define in the bootloader.

    I'm currently writing a small tutorial on "how to use MegaLoad"  that will be available soon

    MicroSyl

  • José Xavier April 16, 2010 at 6:15 pm

    but i just change: MEGA168  = 1,#define XTAL        20000000 and #define MEGATYPE Mega168      
    after go to project and rebuildall, make file, take hex to avr studio and burn wuth the error in the last post :S i don't know what do more :S
     

  • José Xavier April 16, 2010 at 6:22 pm

    i try to burn with the iccavr, just go to tools->isp->program flash and after read the lock bits and fuses and i got the follow output:
    http://pastebin.com/9ar7atH2
    Can you take a look?

  • MicroSyl April 16, 2010 at 9:14 pm

    Could you told me what is the fuse bit you had set
     
    MicroSyl

  • admin April 16, 2010 at 9:30 pm

    I just upload my MegaLoad tutorial, it's a beta version, I whish it could help you

    http://www.microsyl.com/projects/megaload/MegaLoad%20Tutorial.pdf

    MicroSyl

  • José Xavier April 17, 2010 at 4:11 pm

    Boot Flash section size = 1024 words Boot start address = $1C00; [BOOTSZ=00]; default value
    Boot Reset Vector Enabled (default address = $0000); [BOOTRST=0]
    Brown-out detection disabled; [BODLEVEL=111]
    Ext. Crystal Osc.; Frequency 8.0 – MHz; Startup time PWRDWN/RESET: 16K CK/14 CK + 64ms; [CKSEL=1111 SUT=0]

     
    Thanks for your help ;)

  • admin April 17, 2010 at 4:44 pm

    Are you shure that you MCU is resetting corectly with the BOD disable? could you try a slower baudrate like 19200. Did you see something in the monitor window of megaload>

  • kheirkhah April 19, 2010 at 6:04 am

    dear microsyl
    the megaload version that I downloaded is 6.3 but  bootloader is 7.3.I'd like to use for ATMega2560. Is these two item are compatible for ATMega2560  or no. please help me about this problem.
    Best regard

  • José Xavier April 19, 2010 at 11:00 am

    i tried with burnout=2.7V and slower baudrate and don«t work :S

  • MicroSyl April 19, 2010 at 12:02 pm

    Could you send me your files at b i b i @ microsyl.com (remove the spaces)

  • admin April 19, 2010 at 12:06 pm

    I had never try with M2560, I don’t know if it’s work, With M128 it’s Ok but with 256K of flash I don’t know

    Sylvain

  • José Xavier April 20, 2010 at 10:00 am

    Thanks for all and i made a big mistake, the button to resert was wrong place :S Now i got this error:
    http://yfrog.com/2omegaloadj
    The code that i compiled is:
    #include <avr/io.h>
    #include <stdlib.h>

    void AD_iniciar()   
    {
         ADMUX = 0b01100000;
        ADCSRA = 0b11100111;
    }

    int main()                    
    {
        DDRB = 0xff;
        //AD_iniciar();
        while(1){
            PORTB ^= 0×01;
              //int teste = ADCH*ADCH + ADCH;
              PORTB ^= 0×02;
        }
    }
     

  • José Xavier April 20, 2010 at 11:02 am
  • admin April 20, 2010 at 12:31 pm

    Hi Jose,

    Send me your file at b i b i @ microsyl.com (remove the spaces) (main.c and assembly.s) Your setting look to be good, I will be able to check that tomorow the 21

    Sylvain

  • José Xavier April 20, 2010 at 10:34 pm

    email sent! Thanks

  • AMF April 22, 2010 at 8:01 am

    Hello
    I have prob in PC Megaload 7.1 with eeprom file.
    If I have selected eeprom file and I cannot programm it into avr, I must edit registry to remove eeprom file from settings.
    Can U make some changes in PC app to easily remove eeprom file please?

    many thanks

  • admin April 22, 2010 at 10:52 am

    Thanks for the report, I will make a new release soon and I will correct this. The new MegaLoad will be a universal MCU bootloader so I will no longer have to writte #define and make modification in the win app code. the user will have to setup the apropriate value in the bootloader files. I will give good information to archive this. Also I will need some beta tester.

    Sylvain

  • n2o May 8, 2010 at 5:48 am

    Hi Sylvain,
    I am interested in automatic AVR programming software.
    I want to make config or script to program AVR flash, eeprom and fuses with one button click.

    Maybe You can suggest something?

  • admin May 8, 2010 at 1:32 pm

    Hi,
    The only way to do this is to buy MegaLoad source code for 100$usd and make all the modification you want, it’s written in visual c# .net

    Sylvain

  • Chiaki May 13, 2010 at 2:45 am

    Hello Sylvain,
    2 issues:
    I'm using MegaLoad.NET V6.3. with ATMEGA88PA
    settings are
    #define MEGATYPE Mega88
    #define XTAL        20000000
    #define UART        0
    #define BAUDRATE     57600
    #define EEPROM
    #define LOCKBIT
     
    and
    MEGA88   = 1
     
    1. Boot size display
    after compiled it showed
    ROM 9% full. 818 out of 8192 bytes used.
    then I choose Boot Flash size =512words Boot Address=$0E00
    However, MegaLoad.NET shows  Boot size 1K words,   Is this simple bug or I should set as Boot Flash size =1024words Boot Address=$0C00??
    So far, it works fine with 512words setting.
    2. Lock bit changes.
    although I set  #define LOCKBIT on main.c but I didn't set any of lock bit on MegaLoader.  But repeating several times of FW loading, sometimes it automatically set the lock bit and as a result I can't upload FW anymore.
    My cable wrong? but FW seems updated correctly.

  • admin May 13, 2010 at 3:22 pm

    Why did you don’t try the new MegaLoad U? I know
    Did you setup in ICCAVR in the project option that this code is a bootloader?
    Also try without lockbits and eeprom programming if it’s work
    Did your code send data when it’s start?
    Sylvain

  • Chiaki May 13, 2010 at 6:48 pm

    Thanks!
    May be I'm just lazy.
    Actually i have tried MegaLoad U first.
    But such as #define  BAUDRATE,  need to calculate proper UBRRL set value(well. Just lazy.. but now I think this is the key point) and you placed RS485 which I don’t use it.
    Also I had to modify
    #include "iom8v.h"  to  #include <iom88pv.h> and
    #define INTVECREG GICR to #define  INTVECREG  MCUCR
    etc..  and may be some reason didn’t work then I found old code with your tutorial.  Then it works..  then didn’t back to new one. 
    >Did you setup in ICCAVR in the project option that this code is a bootloader?
    Yes.

    >Also try without lockbits and eeprom programming if it’s work
    I'll try later but want to keep this option.

    >Did your code send data when it’s start?
    sorry, I don't quite understand.  Do you mean my AP send data to UART port and its timing?

  • admin May 13, 2010 at 6:54 pm

    I will try to order a M88 soon to make some test,  Megaload U had been only test on a M8

    Sylvain

  • Frik May 17, 2010 at 11:18 am

    Hello Sylvain,
    i'm using your megaload few years(thx for that) and I cant flash some HEX files coz of Error in MegaLoad app like this:
    Error in Flash Hex File 293
    I try to use diffrenet versions of megaload, even new U version, but still the same Error. Target device is detected correctly but flashing doesnt start. When I flash HEX file directly through ISP it's OK.
    I remember that I solve this problem by editing HEX file and remove some rows with unusual record  length or record type, but now it doesn't help. HEX file is for ATmega16 and you can download it here:
     http://leteckaposta.cz/749710831
    Please give to know how to solve this problem, thanks.

  • admin May 17, 2010 at 11:46 am

    Hi,
    It’s look like megaload find some invalid data in the hex file, may be you compiler had place some ram data or other things than flash data in the hex file, megaload is strict. all the data in the hex file MUST be in bound of the flash area. Did you remember what you had edit in the hex file in the past?
    Sylvain

  • Frik May 17, 2010 at 1:16 pm

    Hmm I think ATmega16 has flash area 8×16 bits , so it means maximum address space of 0×1FFF WORDS. If current Intel HEX format is 16bit large so it use also WORD addressing and biggest address in my HEX is 0×11FE so it should fit flash area of ATmega16.
    I delete row 293 and error change to 291 so i delete 291 row and so…, but error was at all rows in whole HEX file. Maybe here is some other problem?  I'm using AVR studio with AVR-GCC compiler (from WinAVR instalation) latest versions.

    Example of one row: :10109000802F0995892B31F48E819F8101969F8342
    size 10bytes is OK, address 0×1090 is OK, record type 00 is OK, data and CRC is OK
    what is wrong?

  • admin May 19, 2010 at 2:13 pm

    With AVR studio read all the flash memory of your M16 that will generate a hex file of all your flash and take this file and try to bootload it and check if there is a error or not and give me your result
    Sylvain

  • Frik May 19, 2010 at 6:46 pm

    My AVR studio use externall avr-gcc compiler configured by makefile, but I don't know much about configuring makefile and all about Intel HEX format is configured there. But in earlier versions there was no problem with format of generated HEX file. I can't read flash  with AVR Studio coz I dont use any of suported ISP or JTAG hardware.
    But I solved problem other way. For my ISP programmer I use software pg4uwarc.exe who can load that HEX file and also it can save it in different type of HEX, so when i choose Save as IntelHex, it will generate new HEX file which I can already use with MegaLoad without any errors.
    I thought there is only one type of IntelHEX format, but it seems for some variations.

  • admin May 19, 2010 at 6:49 pm

    I don't know what can be the problem,  maybe you can ask on http://www.avrfreaks.net.  If you find usefull info please le me know for other users

  • Gurpreet May 31, 2010 at 1:34 pm

    I'am using ATMEGA128 for downloading my exe via megaload and using ICC AVR 7.1 compiler.
    I was able to successfully download the code in some of my boards.But in some boards the problem is coming Status shows : Program Flashing the file is read and the first two row keep on blinking and the flashing doesn't go beyong blinking . Any Idea what the problem could be?

  • admin May 31, 2010 at 1:38 pm

    Hmmm, if it’s work on some board and not on others it could not be my software Did you use the MegaLoad U or the old MegaLoad?
    Sylvain

  • Gurpreet May 31, 2010 at 1:59 pm

    I'am using the Megaload v6.3.. Is this be some problem related to RESET?

  • admin May 31, 2010 at 2:02 pm

    No, V6.3 is there since 4 years without any problem report

    Sylvain

  • Jacek June 6, 2010 at 6:22 pm

    Hi,
    I want co compile main.c and assembly.c in AVRStudio but I get errors:
    ../../bootloader/assembly.s:70: Error: unknown pseudo-op: `.elif’
    ../../bootloader/assembly.s:81: Error: unknown opcode `xcall’
    ../../bootloader/assembly.s:92: Error: unknown opcode `xcall’
    ../../bootloader/assembly.s:135: Error: unknown opcode `xcall’
    Any idea how to repair this?

  • admin June 6, 2010 at 6:25 pm

    Megaload is not build for avrstudio but for ICCAVR

    Sylvain

  • José Xavier July 8, 2010 at 10:01 am

    I can't download the files:
     
    Not Found
    The requested URL /projects/megaloadu/BootLoader.zip was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    IIS 1.0 Server at http://www.microsyl.com Port 80

  • Sylvain July 8, 2010 at 12:05 pm

    It's now correct
    Sylvain

  • MorbidAske July 21, 2010 at 10:18 am

    it was very interesting to read.
    I want to quote your post in my blog. It can?
    And you et an account on Twitter?

  • admin July 21, 2010 at 11:17 am

    Hi,
    Thanks for your comment!, No I don’t have a Twitter account
    Sylvain

  • Mike Hosmar July 24, 2010 at 11:08 pm

    hey, i got your boot loader compiled correctly, ( i think) but when i open the monitor, in mega load with rs232 hooked up all its sending is 0's repeatedly, do you know what it could be?

  • admin July 25, 2010 at 11:45 pm

    It could be many things but check if your serial port speed, baud etc is good, Your xtal frequancy and more…

Post comment

Please note

All my source codes were taken from my personal projects.

Everything is for your information only. The C/C++ codes have been written
with ICCAVR. You can find the header and source CRT files by downloading their compiler.

All is for your information and everything is AS IS without any warranty of any kind. No other files are available and I don't make any modification for any body.

Categories

Blogroll

Electronic Links

Tags

AGC Anemometer AVR AVR Bootloader Bootloader Capacitence Capacitor Clock Color Control DCC Debugger Devices Digital driver Function Generator High Gain Microphone Humidity Inductance Inductor Laser LCD LED 3W Library Lightning Detector MegaLoad Meter Moodlight Mood Light MS5534 Nixie OscilloScope projector Rain Fall Sensor rgb RGB LED Scop Sensor SHT75 Temperature Terminal Tipping Bucket Train Modeling Vintage Water Detector