Not having access to the datasheets (or much else barring a browser), can anyone tell me whether the bootloader designed for the Arduino Mega board (or indeed the DFRobot MEGA 2010 clone) would work unchanged on the ATMega1284P-PU ?
(Obviously, the 1280, being TQFP, has more pins than a 40-pin DIP, but that aside, is the core functionality the same?
If not, I guess I will have to wait until I can compare the data sheets and work out what would need to be changed to modify the bootloader and core accordingly. Since there are differences for the 168, 328 and 1280 already, and I have a fair amount of experience as a C developer (27yrs+) including low-level (Un*x driver), it should be a fun project :
Having now read the datasheets, there are a number of differences between the parts (number of USARTS, timers) as well as the obvious ones such as number of available pins.
However, it is fairly simliar to the 1280, so should be doable.
Can anyone tell me where/how the compile-time device type (AVR_ATmega1280, AVR_ATmega8) are actually defined, or if they are done by gcc based on the -mmcu command line option?
Thanks
(And presumably, I should use the developers mailing list to feed back any changes...?)
Oh good. Then modifying boards.txt will deal with it, and I can use the 644P as a basis to work from. I expect, if previous experiences with PICs is anything to go by, my most difficult job will be getting the fuses right.
Fortunately, the fuse calculator will be a big help.
Anyone know how imminent 0019 is? (I should ask on the developer mailing list really).
Can anyone tell me where/how the compile-time device type (AVR_ATmega1280, AVR_ATmega8) are actually defined, or if they are done by gcc based on the -mmcu command line option?
that is done by the arduino IDE in parsing the commands to avrdude. it is taken from
attiny85.build.mcu=attiny85
from the boards.txt file in the ~/documents/Arduino/hardware/attiny85/
folder
you could try it first in the terminal directly with avrdude to see if it knows the part.
Ive tried something similar(modified the board.txt for sanguino) and the version of avrdude in arduino18 does not have the 1284p listed. So when you try and upload the bootloader(again i just modified the sanguino one) it complains about the chip being invalid. The newest avrdude that comes with AVRstudio has no such issue. However I either have a wiring error in my board or the arduino as ISP will not suffice for programming a 1284p.
The problem I have is for instance when i try to read the fuses it gets half way through then throws an error as it seems the arduinoISP sketch has frozen.
latest avrdude output in next post
Edit - tracked down the latest avrdudes errors to being a wireing fault gonna try and fix that before I say anymore.
Yeah it was my circuit I rewired it and i can now download code to it through the ICSP connection. I managed to set the fuses and get the sanguino boot-loader onto it. However the boot-loader does not work. I know its running as it is flashing the led while its in the boot-loader.
I also update copy of avrdude that arduino 18 uses, to do that just backup the avrdude executable and config file and overwrite them for windows they are in:
arduino-0018\hardware\tools\avr\etc\avrdude.conf
arduino-0018\hardware\tools\avr\bin\avrdud.exe
I finally got the ICSP connection working reliably, and the arduino18 environment to burn the bootloader. I successfully uploaded the ADAboot loader with the modifications and the compiler optimizations ChrisS linked to. I however do not know if it is working, as the LED does not blink. Also I have not tried to actually upload any code to the device either. Ill get to work on this more tomorrow but thats all for now.
I ask because the bottom of the link says:
"RESOLVED: I modified the optimization from -O2 to -Os and NO ERRORS! and now the bootloader is working (led flashes correctly) :D"
you say nothing flashes...
also in your LAST posting with commandprompt, there is no such optimization switch...
I hate to say....mmh, are you shure about your ledwiring?
Have you checked/wired ResetPin?
In my opinion, it should work already if you patched files in 1284p Hardarefolder like for 644p.
After much frustration I have tracked all my issues down to a breadboard with many faulty junctions....
I did end up getting the bootloader to blink the LED again a bad junction. This is to say the least frustrating. I have not been able to upload code as I am having trouble finding good connections...
Ok here is were I am. I have it so that arduin 18 is able to burn the boot loader correctly, and the status LED does indeed blink while it is in the boot loader however the bootloader does not work. The code downloads and during the verification process all 0xFF is returned. with the modified adaboot loader that chrisS linked too.
Check clock Fuses / connection... I think Fuses maybe the Problem...
I know... blinking works...
I got much 0xFF's while testing with 644P.... and the answer where in my task that I used wrong Capacitors for Clock-Quarz. I used micoFrard not Pico... that happend by me.
Checkit... it may help you.
Try the latest AVRStudio for test to burn Bootloader... without IDE... still supports 1284p.