Coder Social home page Coder Social logo

Comments (3)

MCUdude avatar MCUdude commented on September 4, 2024

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.

MCUdude avatar MCUdude commented on September 4, 2024

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.

 avatar commented on September 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.