Marius '95
troubleShooter
Eu ma gandeam la FPGA, dar nu i-am gasit o aplicabilitate practica, inca.
In file included from /usr/share/arduino/hardware/arduino/avr/cores/arduino/Arduino.h:258:0,
from /tmp/arduino_build_105123/sketch/Blink.ino.cpp:1:
/home/marius95/.arduino15/packages/groundstudio-jade/hardware/avr/1.0.4/variants/jade-nanoplus/pins_arduino.h: In function ...void analogWrite328PB(uint8_t, int)...:
/home/marius95/.arduino15/packages/groundstudio-jade/hardware/avr/1.0.4/variants/jade-nanoplus/pins_arduino.h:231:7: error: ...PORTD... was not declared in this scope
PORTD |= (1 << 2);
^
/home/marius95/.arduino15/packages/groundstudio-jade/hardware/avr/1.0.4/variants/jade-nanoplus/pins_arduino.h:236:7: error: ...PORTD... was not declared in this scope
PORTD &= ~(1 << 2);
^
exit status 1
Error compiling for board GroundStudio Jade Nano+.
/build/avr $ cat blink.c
#include <avr/io.h>
int main(void){
DDRB=0xFF;
PORTB=0x0;
unsigned int i;
while(1){
for(i=32768; i; i--){}
PORTB=0x20;
for(i=65535; i; i--){}
PORTB=0x0;
} //while
} //main
/build/avr $ avr-gcc -mmcu=atmega328p -Wall -o blink.elf blink.c
/build/avr $ avr-objcopy -O ihex -R .eeprom blink.elf blink.hex
avrdude -P /dev/ttyACM0 -v -v -c arduino -p m328pb -U flash:w:blink.hex:i
avrdude: Version 7.2
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is /etc/avrdude.conf
User configuration file is /home/marius95/.avrduderc
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : arduino
AVR Part : ATmega328PB
Chip Erase delay : 10500 us
PAGEL : PD7
BS2 : PC2
RESET disposition : possible i/o
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0x00 0x00
flash 65 10 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino for bootloader using STK500 v1 protocol
Hardware Version: 3
Firmware Version: 4.4
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00 s
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: processing -U flash:w:blink.hex:i
avrdude: reading input file blink.hex for flash
with 236 bytes in 1 section within [0, 0xeb]
using 2 pages and 20 pad bytes
avrdude: writing 236 bytes flash ...
Writing | | 0% 0.00 s
avrdude: padding flash [0x0080, 0x00ff]
Writing | ################################################## | 100% 0.04 s
avrdude: 236 bytes of flash written
avrdude: verifying flash memory against blink.hex
avrdude: reading on-chip flash data ...
Reading | ################################################## | 100% 0.02 s
avrdude: verifying ...
avrdude: 236 bytes of flash verified
avrdude done. Thank you.
/build/avr $