watterott / atmega328pb-testing Goto Github PK
View Code? Open in Web Editor NEWAtmel/Microchip ATmega328PB support for Arduino IDE
Home Page: https://learn.watterott.com
Atmel/Microchip ATmega328PB support for Arduino IDE
Home Page: https://learn.watterott.com
Hi!
I'm working on an implementation for the ATmega48PB/88PB/168PB/328PB family and stumbled upon an issue I want to discuss. First you'll have to merge the pending PR in order to reproduce the issue.
The issue is PWM on digital pin 2 (PD2). It doesn't matter if TIMER3B or TIMER4B is used (in pins_arduino.h), the problem is the same. When running the Fade.ino example, the pin only "fades down" from 255-0, not up again like it should. If I change the boundaries from 0->10 and 255->200, it won't output any signal. I've attached my oscilloscope to verify this.
My implementation uses its own Arduino core files, but I haven't been able to figure out what's wrong. Any idea?
I'm attempting to compile the basic blink sketch (Arduino 1.8) and upload via the AVRISPmk2. I'm getting the following error. I'll take any suggestions/hints for getting it working.
"/Applications/Arduino__181.app/Contents/Java/hardware/tools/avr/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino" "-I/Users/red/Library/Arduino15/packages/m328pb/hardware/avr/1.0.8/variants/atmega328pb" "/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_pulse.S" -o "/var/folders/_0/khxnwnmm8xj15y0059_xt4th0000gn/T/arduino_build_89720/core/wiring_pulse.S.o"
In file included from /Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_pulse.S:52:0:
/Applications/Arduino__181.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:623:6: warning: #warning "device type not defined" [-Wcpp]warning "device type not defined"
^
"/Applications/Arduino__181.app/Contents/Java/hardware/tools/avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino" "-I/Users/red/Library/Arduino15/packages/m328pb/hardware/avr/1.0.8/variants/atmega328pb" "/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino/WInterrupts.c" -o "/var/folders/_0/khxnwnmm8xj15y0059_xt4th0000gn/T/arduino_build_89720/core/WInterrupts.c.o"
/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino/WInterrupts.c: In function 'attachInterrupt':
/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino/WInterrupts.c:151:8: error: #error attachInterrupt not finished for this CPU (case 0)
#error attachInterrupt not finished for this CPU (case 0)
^
/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino/WInterrupts.c: In function 'detachInterrupt':
/Applications/Arduino__181.app/Contents/Java/hardware/arduino/avr/cores/arduino/WInterrupts.c:243:8: error: #error detachInterrupt not finished for this cpu
#error detachInterrupt not finished for this cpu
^
exit status 1
Error compiling for board Atmel ATmega328PB Internal Clock.
You should add this to the Arduino avrdude.conf
http://lists.gnu.org/archive/html/avrdude-dev/2016-06/msg00010.html
I'm suspecting optiboot_m328pb.hex is using USART0. Is there a way to use USART1 instead?
Hi all,
I have a board with an Atmega328PB. Upload of the bootloader works, if I upload the sketch with ISP also works. However, if I flash the bootloader, I still can't get the Serial communication and programming to work. It is 3.3v and has a 8Mhz crystal on the board I'd like to use.
Bootloader:
`
avrdude.exe: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\LocalUser\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.3/tools/avrdude.conf"
Using Port : usb
Using Programmer : usbtiny
avrdude.exe: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\.\libusb0-0001--0x1781-0x0c9f
AVR Part : ATmega328PB
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : USBtiny
Description : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude.exe: programmer operation not supported
avrdude.exe: Using SCK period of 10 usec
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude.exe: Device signature = 0x1e9516 (probably m328pb)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: Using SCK period of 10 usec
avrdude.exe: reading input file "C:\Users\LocalUser\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.3/bootloaders/optiboot_m328pb.hex"
avrdude.exe: writing flash (32748 bytes):
Writing | ################################################## | 100% 0.00s
avrdude.exe: 32748 bytes of flash written
avrdude.exe: verifying flash memory against C:\Users\LocalUser\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.3/bootloaders/optiboot_m328pb.hex:
avrdude.exe: load data flash data from input file C:\Users\LocalUser\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.3/bootloaders/optiboot_m328pb.hex:
avrdude.exe: input file C:\Users\LocalUser\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.3/bootloaders/optiboot_m328pb.hex contains 32748 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% -0.00s
avrdude.exe: verifying ...
avrdude.exe: 32748 bytes of flash verified
avrdude.exe: reading input file "0xCF"
avrdude.exe: writing lock (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude.exe: 1 bytes of lock written
avrdude.exe: verifying lock memory against 0xCF:
avrdude.exe: load data lock data from input file 0xCF:
avrdude.exe: input file 0xCF contains 1 bytes
avrdude.exe: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude.exe: verifying ...
avrdude.exe: 1 bytes of lock verified
avrdude.exe done. Thank you.`
failed Upload of code with Serial connection:
`
avrdude.exe: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\LocalUser\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.3/tools/avrdude.conf"
Using Port : COM10
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 2 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 4 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 6 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 8 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 10 of 10: not in sync: resp=0x01
avrdude.exe done. Thank you.
`
Successful Upload with ISP:
`avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\LocalUser\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\.\libusb0-0001--0x1781-0x0c9f
AVR Part : ATmega328PB
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : USBtiny
Description : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp
avrdude: programmer operation not supported
avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: Using SCK period of 10 usec
avrdude: reading input file "C:\Users\LOCALU~1\AppData\Local\Temp\arduino_build_733690/sonde_0007.ino.hex"
avrdude: writing flash (19430 bytes):
Writing | ################################################## | 100% 11.40s
avrdude: 19430 bytes of flash written
avrdude: verifying flash memory against C:\Users\LOCALU1\AppData\Local\Temp\arduino_build_733690/sonde_0007.ino.hex:1\AppData\Local\Temp\arduino_build_733690/sonde_0007.ino.hex:
avrdude: load data flash data from input file C:\Users\LOCALU
avrdude: input file C:\Users\LOCALU~1\AppData\Local\Temp\arduino_build_733690/sonde_0007.ino.hex contains 19430 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 10.18s
avrdude: verifying ...
avrdude: 19430 bytes of flash verified
avrdude done. Thank you.`
Sorry, I put everything within code tags, but it somehow does not seem to work correctly...
Any idea what I could check?
It should be:
#include "twi_def.h"
not
#include <twi_def.h>
Do anyone have the same problem? I already measured voltage at A6 and it is 2.7V with the atmega328PB powered through 3.3V. I have a voltage divider.
After tried to upload this bootloader to my custom 3.3V and external 8MHz the chip loats connection to the ISP MKII and ICE. I can't get it even to read the fuses using the atmel studio tools
Hi watterott,
Can you detail the requirements for the extra Wire1 library?
Seems there is a need to duplicate this for the 328PB.
Cheers
Hello,
Thank for this nice project.
I'm experimenting with 328pb using a very simple setup, just atmega328pb, resonator @8MHz, capacitors and reset pull-up.
It seems to have quite high power consumption in deep sleep.
atmega328pb has 19.1 uA, while using the same script atmega328p has 4.6 uA
I've checked the registers and they seem to be the same, except the PRUSART1 register.
noInterrupts();
ADCSRA &= ~(1 << ADEN);
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
sleep_bod_disable();
interrupts();
sleep_mode();
sleep_disable();
ADCSRA |= (1 << ADEN); //Enable ADC
Am I doing something wrong?
Thanks for the ideas.
This may be very obvious to you but could you explain how you would burn bootloader either making it behave like a 328P or a 328PB? It would be very nice to have this step detailed in readme.
What I do is I load the bootloader hex onto an sd card and use Nick Gammon's hex uploader to do the burning:
https://github.com/nickgammon/arduino_sketches/tree/master/Atmega_Hex_Uploader
I also have a separate setup for DIP chips, with an old version of westfw's optiloader. It seems that he had added support to treat PB as P:
https://github.com/WestfW/OptiLoader/blob/master/optiLoader.ino
Both methods burn a lot faster than using Arduino IDE's "Burn bootloader" option.
Any advice what to do to put either P or PB bootloader is greatly appreciated!
In file included from /home/meelik/Tools/arduino-1.8.5/hardware/arduino/avr/cores/arduino/wiring_pulse.S:52:0:
/home/meelik/Tools/arduino-1.8.5/hardware/tools/avr/avr/include/avr/io.h:623:6: warning: #warning "device type not defined" [-Wcpp]
warning "device type not defined"/home/meelik/Tools/arduino-1.8.5/hardware/arduino/avr/cores/arduino/WInterrupts.c: In function 'attachInterrupt':
/home/meelik/Tools/arduino-1.8.5/hardware/arduino/avr/cores/arduino/WInterrupts.c:151:8: error: #error attachInterrupt not finished for this CPU (case 0)/home/meelik/Tools/arduino-1.8.5/hardware/arduino/avr/cores/arduino/WInterrupts.c: In function 'detachInterrupt':
/home/meelik/Tools/arduino-1.8.5/hardware/arduino/avr/cores/arduino/WInterrupts.c:243:8: error: #error detachInterrupt not finished for this cpuexit status 1
Error compiling for board Atmel ATmega328PB Internal Clock.
Is there any way to bypass this error when the interrupt methods are not being used ?
package_m328pb_index.json is not compatible with Arduino AVR Boards 1.6.16. You get compile errors like:
xxx:56: error: 'Serial' was not declared in this scope
Switch back to 1.6.15 in the board manager makes my code compile again.
Hi,
I have a lora GPS shield that works perfectly with the UNO with atmega328P. I have then developed a board with 328PB instead. I was able to load the bootloader and the sketch thru ISP. Recycled power and received an error on my terminal with the message below. I have tried the monitoring the SPI from micro to the RF module but it seems that there was no activity on all spi lines. I have recheck my lmic pin maps plenty of times and it has same pin assignment as my 328P development board with the lora gps shield.
Just wondering if someone has already use this repo and compiled it with the lmic for lora modules. I might be missing something very simple.
LoRa GPS Example----
Connect to TTN
FAILURE
C:\Users\User\Documents\Arduino\libraries\arduino-lmic-master\src\lmic\radio.c:689
Please help..
When I try to compile a program which utilizes port manipulation, it pops up with an error that the port/DDR wasn't defined. Example when I try to compile:
PORTC |= (1<<0);
This is the error
exit status 1
'PORTC' was not declared in this scope
arduino uno (Atmega328P) -> spi working
Atmega328PB - spi not working
i test nrf8001 bluetooth module (spi)
v1.1.130 --> http://packs.download.atmel.com/
ChageLog
1.1.130 Fix bitfields of PRR registers for PWM devices. Remove XDIV in ATmega128. Update CFD fuse for ATmega328PB
1.0.118 Fix bitfield and register name issues for all 'Timer/Counter, 16-bit' for ATmega324PB
1.0.105 Add PCINT[0,7] to ATmega2564 IO header
1.0.98 Removed Full-Swing Crystal field for SUT_CKSEL of ATmega PB devices. Updated documentation links
1.0.91 Initial release
The avrdude binary for linux is missing from this repo. Installation fails because arduino needs a local copy. I am using a current version of Arch Linux with avrdude 6.3 installed system wide.
Am I doing something wrong? I added the avrdude binary here. Dependencies were not statically linked against it, so it won't work on everyone's system. I will rebuild it and submit a pull request when ready.
When trying to use these board definitions with the arduino IDE I get:
Main:106: error: 'Serial' was not declared in this scope
Serial.begin(9600);
Dummy code which throws same error:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
}
Hangs when I try to run as an I2C slave on SDA0/SCL0 and Master on SDA1/SCL1. Everything appears to initialize properly. When I run Wire.begin(8) my remote master can see this device and i can see other slave devices on SDA1. However, as soon as I query a slave device on SDA1, the SDA0 bus goes LOW and because of that longer responds as a slave on SDA0.
Hi,
Thanks for the project! I am interested in using the second serial port but encountered some strange problem. I use Serial1 for a GPS module. Somehow there is some issue with RX1 not receiving anything although the pin receives information (checked with an FTDI adapter on the pin). I wonder if there's anything in the bootloader that would cause problems.
Also, if I connect the GPS to the RX1 and TX1, since they are also SPI MISO and MOSI, will the GPS interfere with program uploading?
The iom328pb.h file is missing definitions for ADC6D and ADC7D for the DIDR0 register.
Please do add them.
The pins_arduino.h file does not appear to define PB6, PB7, and PC6. These pins didn't exist on the 328P.
Hi, just installed fresh watterott files for the 328pb (got my own board with 328pb), every step in the manual was done in order and I am getting these errors. I am using USBasp as a programmer, bootloader was burnt fine (no errors).
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c: In function 'attachInterrupt':
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c:151:8: error: #error attachInterrupt not finished for this CPU (case 0)
#error attachInterrupt not finished for this CPU (case 0)
^
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c: In function 'detachInterrupt':
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c:243:8: error: #error detachInterrupt not finished for this cpu
#error detachInterrupt not finished for this cpu
^
exit status 1
Nastala chyba pri kompilácii pre dosku Atmel ATmega328PB Crystal Clock.`
```
**Full upload message:**
```
D:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware D:\Program Files\Arduino\hardware -hardware C:\Users\Notebook\AppData\Local\Arduino15\packages -tools D:\Program Files\Arduino\tools-builder -tools D:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\Notebook\AppData\Local\Arduino15\packages -built-in-libraries D:\Program Files\Arduino\libraries -libraries C:\Users\Notebook\Documents\Arduino\libraries -fqbn=m328pb:avr:atmega328pbcc:speed=16mhz -ide-version=10803 -build-path C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194 -warnings=none -build-cache C:\Users\Notebook\AppData\Local\Temp\arduino_cache_797876 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Notebook\Documents\Arduino\ThermostatV3\Program\Program.ino
D:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware D:\Program Files\Arduino\hardware -hardware C:\Users\Notebook\AppData\Local\Arduino15\packages -tools D:\Program Files\Arduino\tools-builder -tools D:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\Notebook\AppData\Local\Arduino15\packages -built-in-libraries D:\Program Files\Arduino\libraries -libraries C:\Users\Notebook\Documents\Arduino\libraries -fqbn=m328pb:avr:atmega328pbcc:speed=16mhz -ide-version=10803 -build-path C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194 -warnings=none -build-cache C:\Users\Notebook\AppData\Local\Temp\arduino_cache_797876 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Notebook\Documents\Arduino\ThermostatV3\Program\Program.ino
Using board 'atmega328pbcc' from platform in folder: C:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0
Using core 'arduino' from platform in folder: C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19
Detecting libraries used...
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\sketch\Program.ino.cpp" -o "nul"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\sketch\Program.ino.cpp" -o "nul"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\sketch\Program.ino.cpp" -o "nul"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\sketch\Program.ino.cpp" -o "nul"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp" -o "nul"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel\esp8266.c" -o "nul"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\OneWire-master\OneWire.cpp" -o "nul"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control\DallasTemperature.cpp" -o "nul"
Generating function prototypes...
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\sketch\Program.ino.cpp" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\preproc\ctags_target_for_gcc_minus_e.cpp"
"D:\Program Files\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\preproc\ctags_target_for_gcc_minus_e.cpp"
Kompilujem projekt...
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\sketch\Program.ino.cpp" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\sketch\Program.ino.cpp.o"
Compiling libraries...
Compiling library "Adafruit_NeoPixel"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel\esp8266.c" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\libraries\Adafruit_NeoPixel\esp8266.c.o"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp.o"
Compiling library "OneWire-master"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\OneWire-master\OneWire.cpp" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\libraries\OneWire-master\OneWire.cpp.o"
Compiling library "dallas-temperature-control"
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "-IC:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel" "-IC:\Users\Notebook\Documents\Arduino\libraries\OneWire-master" "-IC:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control" "C:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control\DallasTemperature.cpp" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\libraries\dallas-temperature-control\DallasTemperature.cpp.o"
Compiling core...
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\wiring_pulse.S" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\core\wiring_pulse.S.o"
In file included from C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\wiring_pulse.S:52:0:
c:\users\notebook\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2\avr\include\avr\io.h:623:6: warning: #warning "device type not defined" [-Wcpp]
# warning "device type not defined"
^
"C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Notebook\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.0\variants\atmega328pb" "C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c" -o "C:\Users\Notebook\AppData\Local\Temp\arduino_build_78194\core\WInterrupts.c.o"
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c: In function 'attachInterrupt':
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c:151:8: error: #error attachInterrupt not finished for this CPU (case 0)
#error attachInterrupt not finished for this CPU (case 0)
^
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c: In function 'detachInterrupt':
C:\Users\Notebook\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino\WInterrupts.c:243:8: error: #error detachInterrupt not finished for this cpu
#error detachInterrupt not finished for this cpu
^
Používam knižnicu Adafruit_NeoPixel vo verzii 1.0.3 v adresáry: C:\Users\Notebook\Documents\Arduino\libraries\Adafruit_NeoPixel
Používam knižnicu OneWire-master vo verzii 2.3.3 v adresáry: C:\Users\Notebook\Documents\Arduino\libraries\OneWire-master
Použitá knižnica dallas-temperature-control v adresáry: C:\Users\Notebook\Documents\Arduino\libraries\dallas-temperature-control (legacy)
exit status 1
Nastala chyba pri kompilácii pre dosku Atmel ATmega328PB Crystal Clock.
```
I was porting the code to our Atmega328pb board named Tit; noticed that the additional PWM output pins 0, 1 and 2 do not work..
The fix is simple, as you may already know it :), is to define relevant timers on pins_arduino.h file.
TIMER3A,
TIMER4A,
TIMER4B,
NOT_ON_TIMER, /* 0 - port D */
NOT_ON_TIMER,
NOT_ON_TIMER,
// on the ATmega168, digital pin 3 has hardware pwm
Will send a pull request once all the testing is done.
`
Using 1.8.5 IDE and AVR Boards 1.6.20 tried many different combinations but without success.
Always the same error if Serial is called in setup:
DigitalReadSerial:27: error: 'Serial' was not declared in this scope
Serial.println(buttonState);
^
exit status 1
'Serial' was not declared in this scope
Isn't necessarily a problem with this repo and could be upstream, but I've only seen it for the ATmega328PB, so reporting it here.
Reproduced on both Windows 7 and Windows 10.
Steps to reproduce:
Arduino: 1.6.11 (Windows 10), Board: "Atmel ATmega328PB Internal Clock, 8 MHz"
C:\Programs\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Programs\Arduino\hardware -hardware C:\Users\Odd\AppData\Local\Arduino15\packages -tools C:\Programs\Arduino\tools-builder -tools C:\Programs\Arduino\hardware\tools\avr -tools C:\Users\Odd\AppData\Local\Arduino15\packages -built-in-libraries C:\Programs\Arduino\libraries -libraries C:\Users\Odd\Documents\Arduino\libraries -fqbn=m328pb:avr:atmega328pbic:speed=8mhz -ide-version=10611 -build-path C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Programs\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Programs\Arduino\hardware\tools\avr -verbose C:\Programs\Arduino\examples\01.Basics\Blink\Blink.ino
C:\Programs\Arduino\arduino-builder -compile -logger=machine -hardware C:\Programs\Arduino\hardware -hardware C:\Users\Odd\AppData\Local\Arduino15\packages -tools C:\Programs\Arduino\tools-builder -tools C:\Programs\Arduino\hardware\tools\avr -tools C:\Users\Odd\AppData\Local\Arduino15\packages -built-in-libraries C:\Programs\Arduino\libraries -libraries C:\Users\Odd\Documents\Arduino\libraries -fqbn=m328pb:avr:atmega328pbic:speed=8mhz -ide-version=10611 -build-path C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Programs\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Programs\Arduino\hardware\tools\avr -verbose C:\Programs\Arduino\examples\01.Basics\Blink\Blink.ino
Using board 'atmega328pbic' from platform in folder: C:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4
Using core 'arduino' from platform in folder: C:\Programs\Arduino\hardware\arduino\avr
Build options changed, rebuilding all
Detecting libraries used...
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\sketch\Blink.ino.cpp" -o "nul"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\sketch\Blink.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\sketch\Blink.ino.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Programs\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\sketch\Blink.ino.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\sketch\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_pulse.S.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\WInterrupts.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\hooks.c" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\hooks.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\wiring.c" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\wiring_analog.c" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_analog.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\wiring_digital.c" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_digital.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.c" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_pulse.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\wiring_shift.c" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_shift.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\CDC.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\CDC.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial0.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial0.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial1.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial1.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial2.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial2.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial3.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial3.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\IPAddress.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\IPAddress.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\PluggableUSB.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\PluggableUSB.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\Print.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\Print.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\Stream.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\Stream.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\Tone.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\Tone.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\USBCore.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\USBCore.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\WMath.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\WMath.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\WString.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\WString.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\abi.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\abi.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\main.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\main.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328pb -DF_CPU=8000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Programs\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\Odd\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.0.4\variants\atmega328pb" "C:\Programs\Arduino\hardware\arduino\avr\cores\arduino\new.cpp" -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\new.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_pulse.S.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\WInterrupts.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\hooks.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_analog.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_digital.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_pulse.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\wiring_shift.c.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\CDC.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial0.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial1.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial2.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\HardwareSerial3.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\IPAddress.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\PluggableUSB.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\Print.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\Stream.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\Tone.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\USBCore.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\WMath.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\WString.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\abi.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\main.cpp.o"
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\core.a" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\core\new.cpp.o"
Linking everything together...
"C:\Programs\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328pb -o "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp/Blink.ino.elf" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp\sketch\Blink.ino.cpp.o" "C:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp/core\core.a" "-LC:\Users\Odd\AppData\Local\Temp\builda5bd59b160197c1338ec9fdd7c2830fa.tmp" -lm
collect2.exe: error: ld returned 5 exit status
exit status 1
Error compiling for board Atmel ATmega328PB Internal Clock.
Dear @awatterott ,
after programming ATmega328pb using arduino as ISP, we can program it using USB - UART bridge only ONCE.
After successful uploading of program once, if we wish to program it again using UART it shows error.
avrdude.exe: stk500_recv(): programmer is not responding
A response is awaited from your side.
Thank you!
BM.
I am currently developing on a custom board using the ATmega328pb. I was successfully able to put the bootloader on it and now I can program to the board using the USB I put on the board.
However, when I try to upload the code that I designed the board for, I get a slew of errors involving the inability to write or read from the SPI registers SPCR, SPDR, and SPSR, saying they were "not declared in this scope". I have tried grabbing the exact SPI library from this repository and putting it into my sketchbook, and the Arduino IDE (version 1.8.5) told me that it was correctly using this library.
I am running Arduino IDE 1.8.5, Arduino AVR Boards is updated to version 1.6.207, and I am able to reach the board and program to it.
Kind attention @awatterott
Made a custom PCB with minimum connections to drive Atmega328PB (SMD).
Connected 10k pull-up to reset, applied Vcc, Ground & external 16MHz crystal with 22pF load capacitors.
Currently using IDE 1.8.7 with Arduino version 1.6.200 and avr 3.6.0
Connected the board correctly with ISP using Arduino r3 as programmer. 1st uploaded ArduiniISp to the programmer and then wired ATmega328PB using ISP. Selected Atmega328PB internal crystal and 8MHz in drop down menu. Clicked bootloader > (10uF capacitor between arduino reset and gnd)
Shows below error:
avrdude.exe: Device signature = 0x000000
avrdude.exe: Yikes! Invalid device signature.
Just to let you know:
I'm using Arduino 1.6.12 and I'm controlling an E-Paper-Display with SPI1.
Since V1.0.9 it doesn't work any more (does nothing I guess).
V1.0.8 however works fine.
I tried V1.0.9 with Arduino_1.8.2 but facing the following problem when compiling:
/Applications/Arduino_1.8.2.app/Contents/Java/hardware/tools/avr/avr/include/avr/sleep.h:224:6: error: #error "No SLEEP mode defined for this device."
Thanks for your great work.
It'll be really great if you guys can make a platform package for PlatformIO, as the 328PB support from their official toolchain looks broken right now. Much appreciated!
Hi there, could someone please explain step-by-step how to use this repo? I know people have used this and gotten it to work, but I can't seem to. I added the 328PB boards using Boards Manager but I'm a bit confused as to which files I need to update under /arduino/hardware or what I need to install. To me it almost seems as if the 328PB boards added under Boards Manager will automatically load all the necessary things so that I don't have to install the avr toolchain. Also, exactly how do I load the code onto the 328PB chip? (For example, do I just select the ATmega328PB with Crystal Clock/16 MHz and upload the sketch?)
Originally what I did before coming here is I loaded ArduinoISP into an Arduino Uno and used it to burn the standard 328P bootloader into the 328PB chip, and that ran successfully. In order for that to work I changed the avrdude.conf file device signature for the ATmega328P, then changed it back after I flashed the bootloader. However, I can't seem to upload sketches onto the 328PB chip with my FTDI, even though it has the bootloader. Do I need a special 328PB bootloader in order to upload sketches to the chip?
Additional info: I am using an ATmega328PB chip with a 10k pullup resistor on the RESET pin and 16MHz resonator. I am using Arduino IDE v1.6.11
Any guidance would be much appreciated, thanks! (If I get this to work I will probably make an Instructables on it! I think lots of other people are having the same issues with the 328PB)
I have trouble to upload my first sketch into my UNO 328PB (I replaced the 328p smd chip with a 328pb). I managed to burn the optiboot loader via an uno as ISP programmer. The IDE can see my new uno (com port and get board info:
BN: Unknown board
VID: 1A86
PID: 7523
SN: Upload any sketch to obtain it)
I am stuck within the upload and looking for suggestions what I can do next to get it going.
I get the follow verbose output after hitting "upload" in the IDE:
Arduino: 1.6.12 Hourly Build 2016/09/14 08:20 (Windows 10), Board: "Atmel ATmega328PB Crystal Clock, 16 MHz"
C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware -hardware C:\Users\Paul_2\AppData\Local\Arduino15\packages -tools C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\tools-builder -tools C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr -tools C:\Users\Paul_2\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\libraries -libraries C:\Users\Paul_2\Documents\Arduino\libraries -fqbn=arduino:avr:atmega328pbcc:speed=16mhz -ide-version=10612 -build-path C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\examples\01.Basics\Blink\Blink.ino
C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\arduino-builder -compile -logger=machine -hardware C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware -hardware C:\Users\Paul_2\AppData\Local\Arduino15\packages -tools C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\tools-builder -tools C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr -tools C:\Users\Paul_2\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\libraries -libraries C:\Users\Paul_2\Documents\Arduino\libraries -fqbn=arduino:avr:atmega328pbcc:speed=16mhz -ide-version=10612 -build-path C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\examples\01.Basics\Blink\Blink.ino
Using board 'atmega328pbcc' from platform in folder: C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr
Detecting libraries used...
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\variants\atmega328pb" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\sketch\Blink.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\variants\atmega328pb" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\sketch\Blink.ino.cpp" -o "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\variants\atmega328pb" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\sketch\Blink.ino.cpp" -o "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\sketch\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega328pb -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\cores\arduino" "-IC:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\variants\atmega328pb" "C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_pulse.S.o"
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\WInterrupts.c.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\hooks.c.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring.c.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_analog.c.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_digital.c.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_shift.c.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\CDC.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial0.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial1.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial2.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial3.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\PluggableUSB.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\Print.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\Stream.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\Tone.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\USBCore.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\WMath.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\WString.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\abi.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\main.cpp.o
Using previously compiled file: C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\new.cpp.o
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_pulse.S.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\WInterrupts.c.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\hooks.c.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring.c.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_analog.c.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_digital.c.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_pulse.c.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\wiring_shift.c.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\CDC.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial0.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial1.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial2.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\HardwareSerial3.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\IPAddress.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\PluggableUSB.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\Print.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\Stream.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\Tone.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\USBCore.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\WMath.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\WString.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\abi.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\main.cpp.o"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\core.a" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\core\new.cpp.o"
Linking everything together...
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-gcc" -w -Os -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328pb -o "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475/Blink.ino.elf" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475\sketch\Blink.ino.cpp.o" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475/core\core.a" "-LC:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475" -lm
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475/Blink.ino.elf" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475/Blink.ino.eep"
"C:\Users\Paul_2\Downloads\arduino-nightly-windows\arduino-nightly\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475/Blink.ino.elf" "C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475/Blink.ino.hex"
Sketch uses 1,282 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
C:\Users\Paul_2\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino2/bin/avrdude.exe -CC:\Users\Paul_2\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino2/etc/avrdude.conf -v -patmega328pb -carduino -PCOM10 -b57600 -D -Uflash:w:C:\Users\Paul_2\AppData\Local\Temp\arduino_build_916475/Blink.ino.hex:i
avrdude.exe: Version 6.3, compiled on Jun 22 2016 at 16:05:21
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Paul_2\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino2/etc/avrdude.conf"
Using Port : COM10
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 2 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 3 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 4 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 5 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 6 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 7 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 8 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 9 of 10: not in sync: resp=0x11
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 10 of 10: not in sync: resp=0x11
avrdude.exe done. Thank you.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Hello !, I have ATmega328pb-au and i want to upload arduino bootloader. five chip i try to upload bootloader and there have same error.
C:\Users\Max\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/bin/avrdude.exe -CC:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/tools/avrdude.conf -v -patmega328pb -cstk500v1 -PCOM3 -b19200 -e -Ulock:w:0xFF:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m
avrdude.exe: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/tools/avrdude.conf"
Using Port : COM3
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328PB
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude.exe: Device signature = 0x1e9516 (probably m328pb)
avrdude.exe: erasing chip
avrdude.exe: reading input file "0xFF"
avrdude.exe: writing lock (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude.exe: 1 bytes of lock written
avrdude.exe: verifying lock memory against 0xFF:
avrdude.exe: load data lock data from input file 0xFF:
avrdude.exe: input file 0xFF contains 1 bytes
avrdude.exe: reading on-chip lock data:
Reading | ################################################## | 100% 0.01s
avrdude.exe: verifying ...
avrdude.exe: 1 bytes of lock verified
avrdude.exe: reading input file "0xFD"
avrdude.exe: writing efuse (1 bytes):
Writing | ***failed;
################################################## | 100% 0.07s
avrdude.exe: 1 bytes of efuse written
avrdude.exe: verifying efuse memory against 0xFD:
avrdude.exe: load data efuse data from input file 0xFD:
avrdude.exe: input file 0xFD contains 1 bytes
avrdude.exe: reading on-chip efuse data:
Reading | ################################################## | 100% 0.01s
avrdude.exe: verifying ...
avrdude.exe: WARNING: invalid value for unused bits in fuse "efuse", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xf5 instead of 0xfd (double check with your datasheet first).
avrdude.exe: 1 bytes of efuse verified
avrdude.exe: reading input file "0xDE"
avrdude.exe: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude.exe: 1 bytes of hfuse written
avrdude.exe: verifying hfuse memory against 0xDE:
avrdude.exe: load data hfuse data from input file 0xDE:
avrdude.exe: input file 0xDE contains 1 bytes
avrdude.exe: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.01s
avrdude.exe: verifying ...
avrdude.exe: 1 bytes of hfuse verified
avrdude.exe: reading input file "0xFF"
avrdude.exe: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude.exe: 1 bytes of lfuse written
avrdude.exe: verifying lfuse memory against 0xFF:
avrdude.exe: load data lfuse data from input file 0xFF:
avrdude.exe: input file 0xFF contains 1 bytes
avrdude.exe: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.01s
avrdude.exe: verifying ...
avrdude.exe: 1 bytes of lfuse verified
avrdude.exe done. Thank you.
C:\Users\Max\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/bin/avrdude.exe -CC:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/tools/avrdude.conf -v -patmega328pb -cstk500v1 -PCOM3 -b19200 -Uflash:w:C:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/bootloaders/optiboot_m328pb.hex:i -Ulock:w:0xCF:m
avrdude.exe: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/tools/avrdude.conf"
Using Port : COM3
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328PB
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude.exe: Device signature = 0x1e9516 (probably m328pb)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "C:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/bootloaders/optiboot_m328pb.hex"
avrdude.exe: writing flash (32748 bytes):
Writing | ################################################## | 100% -0.00s
avrdude.exe: 32748 bytes of flash written
avrdude.exe: verifying flash memory against C:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/bootloaders/optiboot_m328pb.hex:
avrdude.exe: load data flash data from input file C:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/bootloaders/optiboot_m328pb.hex:
avrdude.exe: input file C:\Users\Max\AppData\Local\Arduino15\packages\m328pb\hardware\avr\1.1.2/bootloaders/optiboot_m328pb.hex contains 32748 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% -0.00s
avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x7e00
0x00 != 0x1f
avrdude.exe: verification error; content mismatch
avrdude.exe done. Thank you.
Error while burning bootloader.
Thank for replay.
Atmel AVR GNU Toolchain 3.5.2 available.
--> http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx
--> http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx
--> http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.5.2/
I've burnt optiboot_m328PB.hex with avrdude on Nano clone with Atmega328PB with another Nano as ISP and there were no errors. However, nothing works. Tried optiboot_m328pb_blink.hex which also burns fine, but led does not blink. Burning back m328P bootloader works fine.
Arduino IDE also cannot upload anything on PB variant even though Wattuino boards package was installed. Any ideas what I'm doing wrong?
Less a bug, more a question: I am not seeing any changes concerning the second UART - is this supposed to work out of the box with Arduino's Serial library? Thanks!
Hi Watterott folks,
why is there SPI1.h and SPI1.cpp implementing new classes SPI1Class and SPI1Settings, and then one new extern instance SPI1?
Why not rather redesigned SPI.h and SPI.cpp implementing SPIClass and SPISettings such that two extern instances SPI and SPI1 are supported as members of class SPIClass and thus acceptable to every other library out there, similar to what was done with Serial1, Serial2 etc ???
I'm trying to use the Atmega328PB board together with an MCP2515 CAN bus module AND two UARTs AND I need two ICPs, so I need to evade to SPI1 for the MCP2515 connection. I managed to adapt my CAN bus boot loader, but now I struggle with my application and with the ACAN2515 library of Pierre Molinaro and the stuff I added on top ...
Kind regards,
Sebastian (Wangnick)
I would like to put the atmega328pb to sleep and wake up again when pressing a button which is connected to an external interrupt pin. I tried it with the attached sketch but it doesn't work really stable.
Observations
count
is increased with each button push. IMO pressing the button shouldn't affect the loop execution at all.#include <avr/sleep.h>
int wakePin = 2;
int sleepStatus = 0;
int count = 0;
void wakeUpNow() {
detachInterrupt(0);
}
void setup() {
pinMode(wakePin, INPUT);
Serial.begin(9600);
attachInterrupt(0, wakeUpNow, LOW);
}
void sleepNow() {
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
attachInterrupt(0, wakeUpNow, LOW);
sleep_mode();
sleep_disable();
}
void loop() {
Serial.print("Awake for ");
Serial.print(count);
Serial.println("sec");
count++;
delay(1000);
if (count >= 5) {
Serial.println("Timer: Entering Sleep mode");
Serial.flush();
delay(100);
count = 0;
sleepNow();
}
}
If selectring ATmega328PB board the follow code fails :
#include <avr/power.h>
void setup() {
power_twi0_disable();
power_spi0_disable();
}
void loop() {
}
Error:
In function 'void setup()':
sketch_may03a:4: error: 'power_twi_disable' was not declared in this scope
power_twi0_disable();
^
exit status 1
'power_twi0_disable' was not declared in this scope
File hardware\tools\avr\avr\include\avr\power.h should have this entry:
#if defined(__AVR_HAVE_PRR0_PRTWI0)
#define power_twi0_enable() (PRR0 &= (uint8_t)~(1 << PRTWI0))
#define power_twi0_disable() (PRR0 |= (uint8_t)(1 << PRTWI0))
#endif
#if defined(__AVR_HAVE_PRR0_PRSPI0)
#define power_spi0_enable() (PRR0 &= (uint8_t)~(1 << PRSPI0))
#define power_spi0_disable() (PRR0 |= (uint8_t)(1 << PRSPI0))
#endif
#if defined(__AVR_HAVE_PRR1_PRSPI1)
#define power_spi1_enable() (PRR1 &= (uint8_t)~(1 << PRSPI1))
#define power_spi1_disable() (PRR1 |= (uint8_t)(1 << PRSPI1))
#endif
Hello,
I am using this board with Arduino IDE v1.8.5 and I encountered the following issue when trying to include Wire in a sketch:
twi.h:24:23: fatal error: twi_def.h: No such file or directory
I went into the Wire library for this board and confirmed that twi_def.h was present in the same folder as twi.h
The offending directive is line 24 of twi.h
#include <twi_def.h>
I was able to resolve the issue by replacing the angle brackets with quotation marks. I am not sure of the root cause of this problem, so I am raising this issue here just in case it is a problem with the Wire implementation of this repository, as opposed to some other conflict.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.