Hi,
I’m using an Arduino Mega and having trouble compiling the sample application “readAllMemoryBlocks”. The “readMifareTargetID” project compiles and runs well.
Here is the output while compiling:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=101 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/mega /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/PN532.cpp -o /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/PN532.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=101 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/mega /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/readAllMemoryBlocks.cpp -o /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/readAllMemoryBlocks.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/WInterrupts.c.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring.c.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_analog.c.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_digital.c.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_pulse.c.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_shift.c.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/CDC.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/HardwareSerial.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/HID.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/IPAddress.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/main.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/new.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/Print.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/Stream.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/Tone.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/USBCore.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/WMath.cpp.o
Using previously compiled: /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/WString.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/WInterrupts.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_analog.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_digital.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_pulse.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/wiring_shift.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/CDC.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/HardwareSerial.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/HID.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/IPAddress.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/main.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/new.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/Print.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/Stream.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/Tone.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/USBCore.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/WMath.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/WString.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=atmega2560 -o /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/readAllMemoryBlocks.cpp.elf /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/PN532.cpp.o /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/readAllMemoryBlocks.cpp.o /var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp/core.a -L/var/folders/qz/gq0dpw6d5rzdgt4b_t_3r_p80000gn/T/build6466964588379807858.tmp -lm
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6/crtm2560.o: In function `__vector_default':
(.vectors+0x90): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_36' defined in .text.__vector_36 section in core.a(HardwareSerial.cpp.o)
Can you tell me what is wrong? Thanks!