Yeah, that's pretty much what I figured. I guess they just wanted to save a few bytes.
so I modified the optiboot source for an atmega328 at 8 MHz and 2400 baud
#define F_CPU 7900000L#define BAUD_RATE 2400
#if (F_CPU/BAUD_RATE) > 280 // > 57600 for 16MHz#ifndef SOFT_UART#define SOFT_UART#endif#endif
#elif (defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__))
avr-gcc -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega328 -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"
avr-gcc -Wl,-Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega328
avr-gcc -Wa,-gdwarf2 -x assembler-with-cpp -c -mmcu=atmega328 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -Wa,-g
I've never had a chip fail like this before though, it's quite strange.
With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Warning: this topic has not been posted in for at least 120 days.Unless you're sure you want to reply, please consider starting a new topic.