Comments (3)
are you using the latest version of MegaCore? Both codes uploads fine on my ATmega128 running at 16MHz using a USB to serial converter. Have you tried using another programmer like Arduino as ISP?
EDIT: I can reproduce the error when using an Arduino sketch. When using int main(void)
it works just fine. I'll have a look at it
from megacore.
I found the Issue! The good news is that there's nothing wrong with my core. The bad new is that there's nothing I can do about it..
You see, there is some kind of bug in AVRdude 6.0.1 (which Arduino IDE ships with) that gives this error. Running this code:
void setup() {
DDRA = 0xff;
DDRB = 0xff;
DDRC = 0xff;
DDRD = 0xff;
DDRE = 0xff;
DDRF = 0xff;
}
void loop() {
PORTA ^= 0xff;
PORTB ^= 0xff;
PORTC ^= 0xff;
PORTD ^= 0xff;
PORTE ^= 0xff;
PORTF ^= 0xff;
delay(1000);
}
and uploading with AVRdude 6.0.1 using this command (generated by Arduino IDE):
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Users/Hans/Documents/Arduino/hardware/MegaCore/avr/avrdude.conf -v -patmega128 -cusbasp -Pusb -Uflash:w:/var/folders/_p/s3kykxss20bbhfmqcg0ctrp80000gn/T/build6448819071412050804.tmp/sketch_jun18a.cpp.hex:i
gives this error:
Reading | ################################################## | 100% 0.28s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0100
0xff != 0x0f
avrdude: verification error; content mismatch
avrdude done. Thank you.
If I open Terminal (I'm using a mac by the way) and use the latest version of AVRdud, but still sticks with the same hex file and parameters:
avrdude -C/Users/Hans/Documents/Arduino/hardware/MegaCore/avr/avrdude.conf -v -patmega128 -cusbasp -Pusb -Uflash:w:/var/folders/_p/s3kykxss20bbhfmqcg0ctrp80000gn/T/build6448819071412050804.tmp/sketch_jun18a.cpp.hex:i
This is the output:
Reading | ################################################## | 100% 0.21s
avrdude: verifying ...
avrdude: 720 bytes of flash verified
avrdude: safemode: hfuse reads as CE
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK (E:FF, H:CE, L:BF)
avrdude done. Thank you.
If you won't use the bootloader I guess you'll have to use a newer version of AVRdude. You should probably create an issue over at the Arduino Github page where you suggest bumping up to AVRdude 6.3.
EDIT: It seems like someone already have thought about it!
from megacore.
okay, I see. thank you. Seems to me that this bug only happens when I use 0xff, the default value for all the memory.
from megacore.
Related Issues (20)
- ATmega 128 I2C doesn't work HOT 2
- Incorrect clock timing HOT 1
- How to wake up from sleep using WDT reset? (atmega64) HOT 3
- arduino framework does'nt work on ATmega128 HOT 2
- Trouble uploading sketch to Arduino Mega2560 after burning bootloader HOT 1
- unable to burn bootloader for mega2560 HOT 40
- stk500v2 bootloader potential issues HOT 4
- To adopt urboot for MegaCore HOT 2
- Is it possible to program with FT232 programming? Is there a schematic drawing available? HOT 5
- Customizable LED_BUILTIN HOT 4
- Arduino Mega OTEthernet not working HOT 6
- generation of the file .hex HOT 11
- cannot be compiled when using the Wire library HOT 5
- Cannot upload sketch to mega without bootloader using arduinoISP HOT 5
- Original Mega 2560 bootloader HOT 4
- Doesn't work on arduino mega 2560 (clone) HOT 2
- ArduinoOTA problems on Mega2560 using Megacore >= 3 HOT 2
- Erase bootloader
- Support for multiple UARTs at same time?
- ATmega64a serial upload problem HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from megacore.