i had no problem getting m128 to work with arduino at one time. iirc it was the original "mega-duino". now i can load boot (see attachment) w/usbasp but sketches wont load via ftdi. no sync err. ftdi is ok with all other chips. ive tried both these board.txt entries to no avail:
rx0/tx0 check ok at 57kbaud with a test program. all these downloaded from google search. im surprised its no longer supported. has anyone managed to get m128 working recently?
thanks ray. had to cut&paste before link fixed. anyway flashed the one in that link but dont seem to work from the arduino ide which is what i need. so you think the so called standard arduino loader from my attachment is no good? it would be very useful if somebody else tried it before or had another one that is known to work. or saw some issue with my boards.txt entries. im wondering if the baud rate is wrong. 57k is specified in the docs.
whats really bugging me is i had this working with some (much) older version of arduino but not anymore. anybody know what the last version of arduino did have m128 support?
ps i just checked back to 0016 which is the oldest one still on my system. nada. how can they get away with abandoning this when it was such a major product at one time. not nice. probably adds a hundreths of a percent to the zip file size.
how can they get away with abandoning this when it was such a major product at one time.
Huh? There was never an Arduino project using ATmega128. (The original MEGA was an ATmega1280) You can try http://wiring.org.co/
So all you've really experienced is a failure to get the bootloader working. Exactly which hardware are you using, and where was the bootloader downloaded from? The bootloader distributed with Arduino has never claimed to support m128, and that particular bootloader traditionally has run at 19200bps. Does your hardware support the auto-reset that is now expected?
thanks for the reply. i see now you are right about no official m128. i have two boards in front of me, both say "made in italy". one has m1280 and iirc cost me $60-$70 and probably bona fide. but the other with m128 was MUCH cheaper and is missing arduino website label so obviously a clone. i should have known better. italy is very good with support and its one of the things we pay extra for.
anyway my serial dongle has built in auto-reset cap and works fine with my homebrew loader so unlikely hardware is the problem. that loader came from a link found right here and also through google search. in addition to the 57600 listed in the board file i also tried 19200 on both the m128 clone and my bare bones shown below but no go. both work ok with the usbasp and my own serial loader.
if i cant find solution here next step i guess is to port one of the opti to m128. i was hoping to find an off-the-shelf loader but maybe this aint in the cards. thanks again for the suggestions.
That's not really a very useful statement. What's the actual link? Trying to analyze a .hex file to see whether it's "correct" (using the right serial port and bitrate, etc) is ... more work than I'm willing to do. You didn't compile it from source after checking it over, right?)
If your own loader works, why not just set Arduino up to use it?
(or, I would assume that the Wiring repository has a m128 bootloader (including source) that would be usable.)
westfw:
What's the actual link? Trying to analyze a .hex file to see whether it's "correct" (using the right serial port and bitrate, etc) is ... more work than I'm willing to do. You didn't compile it from source after checking it over, right?)
right. this is not a commercial venture or even for myself. im trying to help a local group of enginering students working on rc autopilot projects so my main goal is finding a hex file link for people who dont want to get invovled with compiling issues. a quick google search of " ATmegaBOOT_168_atmega128.hex" brings up many links for that file including this forum. for example:
i was hoping someone here had already worked with m128 sometime in the past and knew of a reliable file. an existing link to a stable site would be best but if not then i will have to come up with something myself. however id like to avoid having to create a new link or playing with c source if possible. its fun for the advanced crowd but not these guys.
hopefully rxtx0/rxtx1 and baud are the only variables relevant so ive set up board.txt entries for the most popular combos. so far none work with the particular file i posted. i dont know of any other entries that matter. things like clk and fuses are not important atm. just download.
westfw:
If your own loader works, why not just set Arduino up to use it?
iirc you and i have discussed this before. mine are much smaller than the standard ones and include a debugger and user callable bios. but not stk compatible, only need direct download of intel using generic comm pgm like hyperterm. you or somebody else experessed reliabilty comcerns but i do not share them. in any case its not appropriate for the guys im trying to get set up with arduino.
that file is probably ok and as usual im doing something really stupid. anyway i guess its time to check out crossroads link.
a quick google search of " ATmegaBOOT_168_atmega128.hex" brings up many links for that file including this forum. for example:
Well, for example, that .hex file does NOT match the .hex file you initially posted.
The source "near" that link implies that it's compiled to run at 19200bps, but it ALSO says:
/* Adjust to suit whatever pin your hardware uses to enter the bootloader */
/* ATmega128 has two UARTS so two pins are used to enter bootloader and select UART */
/* ATmega1280 has four UARTS, but for Arduino Mega, we will only use RXD0 to get code */
/* BL0... means UART0, BL1... means UART1 */
so you have to pull some pins low to get the bootloader to run on a m128.
my main goal is finding a hex file link for people who dont want to get invovled with compiling issues.
But YOU could compile the .hex file for them, right? And it would then have known compile parameters/etc?
I understand that the desirable end product is a .hex file and a board.txt entry, but I don't understand why you're sort-of groping around blindly trying to find a working .hex file instead of making one...
im groping around blindly hoping to stumble into a hex file that is known to work and possiby save a few hours of hacking. i understand the issue with parameters but thoght maybe somebody somewhere did take time to notice what baud and port they were using. so looks like nobody here has actually had experience with this chip so next step is to follow your advice. there dont appear to be any m128 entries in source included with 1.0.5 so heading off into the wilderness seems the only way.
one question: do you know if there has ever been a make for optiboot >128K? you know... rampz? m1280 or m2560?
this is not a commercial venture or even for myself. im trying to help a local group of enginering students working on rc autopilot projects so my main goal is finding a hex file link for people who dont want to get invovled with compiling issues.[/url]
IMO, the best help would be a group order for Atmega328P-PU. ... They are around $2 in 25 qty. Why put someone into a "forever" situation with an unsupported build?
i wish it were possible, obviously that would make my task trivial, but simply not an option. the hardware and sofware constraints are fixed. and at 4x the memory and twice the io and peripherals for a buck more m128 is actually a far better deal in terms of computing power per buck. m1281 would be an option but those cost even more than m2560. normally very good suggestions though.
do you know if there has ever been a make for optiboot >128K? you know... rampz? m1280 or m2560?
Yes, it turns out that Optiboot can easily support 64k WORDS of flash, so it runs on m1280. (but NOT m2560.)
See the version at: Google Code Archive - Long-term storage for Google Code Project Hosting.
Note that the smallest bootloader supported by the larger ATmegas is 1k bytes; twice the size of optiboot. So there is room to fit a lot of m128-specific code in there, if necessary.
yes yes. thanks for that. specially for taking the time to include hex. ready to test with m1284 and along with tom cerpenters zip file for automating the make process this should take minutes instead of hours (famous last words.. lol!).
since im getting in there and have considerable experience with the rampz stuff then maybe ill give m2560 a shot too. i suggested this would be a better choice to these guys but guess i came into the picture too late.
btw even if the 512w boot was not minimum its pretty easy to chop existing opti size down by optimizing in asm which would free up plenty room for the rampz etc.. i got it down to a little over 400w while still preserving original functionality. anyway thanks again.
the problem with >128K is that te stk500v1 PROTOCOL includes only a two-byte "address" field. it turns out that it's a word address, which is what allows 128k to work, but 256k isn't possible without extending the protocol.
yes, im guessing thats why they went to stk500v2 or "arduino" protocol.
ive run into another glitch. it looks like the fast avrdude i got from bill perry has broken >64k. and the one from 1.0.5 takes almost 2 minutes to burn anything up there. even a 1 word program.
i kinda figured was not going to be a smooth ride. maybe better to start collecting and trying out existing m128 bootloaders again.
yes, as soon as i get a chance to try the file from mcu. it appears to be exactly what the uav guys need. but atm my ie8 hangs on that site so i will try another browser when i get a chance. maybe others would have similar problem so if someone could post the hex file or another link to it here it would be very helpful. arduino forum site is not perfect (compatibility mode) but does work.
i really appreciate the input here, specially williams link to his version of opti. as a spinoff ive managed some progress on porting it to m2560. so far got it loading >128K and now working on getting my monitor and bios integrated. its quite nice what with opti being so small and leaving plenty room in the boot block for extras.
john1993:
i had no problem getting m128 to work with arduino at one time. iirc it was the original "mega-duino". now i can load boot (see attachment) w/usbasp but sketches wont load via ftdi. no sync err. ftdi is ok with all other chips. ive tried both these board.txt entries to no avail:
rx0/tx0 check ok at 57kbaud with a test program. all these downloaded from google search. im surprised its no longer supported. has anyone managed to get m128 working recently?
hi, try to switch off/on vcc from mega128 . it will boot from bl and sketch will be able to write apps hex on it. your board has 2 switch. one of them should work. if u get sync error. try removing the dtr pins connection to the board.