/Applications/Arduino.app/Contents/Java/hardware
にZAP IDEのhardware/papilioを突っ込んだ
avr-g++が見えていなかったので、platform.txtに以下を追記した
http://www.technoblogy.com/show?190D
compiler.path={runtime.tools.avr-gcc.path}/bin/
math.hのroundマクロがおかしいのでコメントアウト
https://forum.arduino.cc/index.php?topic=79371.0
/Users/shohei/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/avr/include/math.h
// #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
SIG_UART_RECVは古いみたいなので変更
http://www.avrfreaks.net/forum/attempt-use-poisoned-siguartrecv
/Applications/Arduino.app/Contents/Java/hardware/papilio/avr8/cores/arduino/HardwareSerial.cpp
#if defined(__AVR_ATmega8__) SIGNAL(SIG_UART_RECV) #elif defined(__AVR_ATmega103__) // SIGNAL(SIG_UART_RECV) ->>下に変更する SIGNAL(USART_RX_vect) #else SIGNAL(USART_RX_vect) #endif
cpコマンド関係を修正
/Applications/Arduino.app/Contents/Java/hardware/papilio/avr8/platform.txt
recipe.objcopy.eep.pattern=cp -R /Applications/Arduino.app/Contents/Java/hardware/tools/papilio/ "{build.path}"
blink exampleのビルドログ
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/shohei/Library/Arduino15/packages -hardware /Users/shohei/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/shohei/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/shohei/Documents/Arduino/libraries -fqbn=papilio:avr8:papilio_papilioPlusLX9 -ide-version=10802 -build-path /var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103 -warnings=none -build-cache /var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_cache_26824 -prefs=build.warn_data_percentage=75 -verbose /var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_modified_sketch_487411/Blink.ino /Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/shohei/Library/Arduino15/packages -hardware /Users/shohei/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/shohei/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/shohei/Documents/Arduino/libraries -fqbn=papilio:avr8:papilio_papilioPlusLX9 -ide-version=10802 -build-path /var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103 -warnings=none -build-cache /var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_cache_26824 -prefs=build.warn_data_percentage=75 -verbose /var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_modified_sketch_487411/Blink.ino Using board 'papilio_papilioPlusLX9' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/papilio/avr8 Using core 'arduino' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/papilio/avr8 Warning: Board papilio:avr8:papilio_PapilioOneBurn doesn't define a 'build.board' preference. Auto-set to: AVR8_PAPILIO_PAPILIOONEBURN Warning: Board papilio:avr8:papilio_papilioPlusLX9 doesn't define a 'build.board' preference. Auto-set to: AVR8_PAPILIO_PAPILIOPLUSLX9 Warning: Board papilio:avr8:papilio_papilioPlusLX9Burn doesn't define a 'build.board' preference. Auto-set to: AVR8_PAPILIO_PAPILIOPLUSLX9BURN Warning: Board papilio:avr8:papilio_PapilioOne doesn't define a 'build.board' preference. Auto-set to: AVR8_PAPILIO_PAPILIOONE Warning: Board papilio:avr8:papilio_Custom doesn't define a 'build.board' preference. Auto-set to: AVR8_PAPILIO_CUSTOM Warning: Board papilio:avr8:papilio_PapilioOne500 doesn't define a 'build.board' preference. Auto-set to: AVR8_PAPILIO_PAPILIOONE500 Warning: Board papilio:avr8:papilio_PapilioOne500burn doesn't define a 'build.board' preference. Auto-set to: AVR8_PAPILIO_PAPILIOONE500BURN Warning: platform.txt from core 'AVR8 Papilio Boards' contains deprecated tools.bossac.path={runtime.ide.path}/hardware/tools, automatically converted to tools.bossac.path={runtime.tools.bossac.path}. Consider upgrading this core. Warning: platform.txt from core 'AVR8 Papilio Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}". Consider upgrading this core. Warning: platform.txt from core 'AVR8 Papilio Boards' contains deprecated recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm, automatically converted to recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{archive_file_path}" "-L{build.path}" -lm. Consider upgrading this core. Detecting libraries used... "/Users/shohei/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=atmega103 -DF_CPU=16000000L -DARDUINO=10802 "-I/Applications/Arduino.app/Contents/Java/hardware/papilio/avr8/cores/arduino" "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/sketch/Blink.ino.cpp" -o "/dev/null" Generating function prototypes... "/Users/shohei/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=atmega103 -DF_CPU=16000000L -DARDUINO=10802 "-I/Applications/Arduino.app/Contents/Java/hardware/papilio/avr8/cores/arduino" "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/sketch/Blink.ino.cpp" -o "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/preproc/ctags_target_for_gcc_minus_e.cpp" "/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/preproc/ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "/Users/shohei/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega103 -DF_CPU=16000000L -DARDUINO=10802 "-I/Applications/Arduino.app/Contents/Java/hardware/papilio/avr8/cores/arduino" "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/sketch/Blink.ino.cpp" -o "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/sketch/Blink.ino.cpp.o" Compiling libraries... Compiling core... Using precompiled core Linking everything together... "/Users/shohei/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-gcc" -Os -Wl,--gc-sections -mmcu=atmega103 -o "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/Blink.ino.elf" "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/sketch/Blink.ino.cpp.o" "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_cache_26824/core/core_papilio_avr8_papilio_papilioPlusLX9_bd3365af6269c0d7323cd6fe3ce24fa4.a" "-L/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103" -lm cp -R /Applications/Arduino.app/Contents/Java/hardware/tools/papilio/ "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103" "/Users/shohei/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-objcopy" -O ihex -R .eeprom "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/Blink.ino.elf" "/var/folders/gp/l764g7197_77rf1z02j1k9dc0000gn/T/arduino_build_528103/Blink.ino.hex" Sketch uses 868 bytes (5%) of program storage space. Maximum is 16384 bytes.