MegaLoad
Please try the new MegaLoadU Version
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 Bootloader Code for ICCAVR
Megaload Bootloader for CodeVision
94 Comments to “MegaLoad”
Post comment
Please note
Categories
- All projects
- Audio
- Clock
- Electric Train
- Gadjet
- General Posting
- Laser
- Lastes News
- LED
- Library
- Sensor
- Software
- Work Bench Tools
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

admin

All my source codes were taken from my personal projects.
download link is broken, could you check it?
http://www.microsyl.com/index.php/2010/03/30/megaload/projects/megaload/megaload.zip
It’s fix now please give it a try,
Sylvain
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.
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
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…
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
What are the fuses and lock bits?
Hi,
Fuse bit & Lock bit are the way to configure your MCU, Please check the AVR datasheet everything you need is there
MicroSyl
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
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
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
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?
Could you told me what is the fuse bit you had set
MicroSyl
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
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
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>
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
i tried with burnout=2.7V and slower baudrate and don«t work :S
Could you send me your files at b i b i @ microsyl.com (remove the spaces)
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
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;
}
}
fusebits: http://yfrog.com/j3fusebitsj
lockbits: http://yfrog.com/1flockbitsj
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
email sent! Thanks
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
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
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?
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
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.
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
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?
I will try to order a M88 soon to make some test, Megaload U had been only test on a M8
Sylvain
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.
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
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?
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
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.
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
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?
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
I'am using the Megaload v6.3.. Is this be some problem related to RESET?
No, V6.3 is there since 4 years without any problem report
Sylvain
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?
Megaload is not build for avrstudio but for ICCAVR
Sylvain
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
It's now correct
Sylvain
it was very interesting to read.
I want to quote your post in my blog. It can?
And you et an account on Twitter?
Hi,
Thanks for your comment!, No I don’t have a Twitter account
Sylvain
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?
It could be many things but check if your serial port speed, baud etc is good, Your xtal frequancy and more…