GR-SAKURA
GR-KURUMI
GR-COTTON
GR-CITRUS
GR-PEACH
GR-KAEDE
GR-ADZUKI
GR-LYCHEE
GR-ROSE
GR-MANGO(*)
SNShield
Web Compiler
IDE for GR
TOPPERS関連
女子美コラボ
その他
※プロデューサミーティング中
作り方使い方資料
イベント関連
作品記事
体験記事
ライブラリ
ツール
その他・過去ファイル
スケッチはリファレンスにあるサンプルですが、エラーが出ているのは MsTimer2.cpp なのでスケッチの問題ではないと思います
GR-ADZUKI IDE for GR Ver 1.12 Mac mini 2018 MacOS Catalina
以下のソースです。
#include <Arduino.h>#include <MsTimer2.h>void using_mstimer2() { static boolean output = HIGH; digitalWrite(12, output); output = !output;} // this function is called every 1ms.void using_intervaltimer(unsigned long ms){ static boolean output = HIGH; static unsigned long time; if((ms - time) > 1000){ interrupts(); // to allow USB operation Serial.println(ms); time = ms; digitalWrite(13, output); output = !output; }} void setup() { pinMode(12, OUTPUT); pinMode(13, OUTPUT); Serial.begin(9600); MsTimer2::set(500, using_mstimer2); // 500ms period MsTimer2::start(); attachIntervalTimerHandler(using_intervaltimer);} void loop() {}エラーの発生している部分に改行を入れて見やすくしました。
エラーは MsTimer2.cpp の2行目の #include <interrupt_handlers.h> が見つからないというエラーです。
iinterrupt_handlers.h のPATHは IDE4GR/Contents/Java/hardware/arduino/rl78g13/cores/rl78g13/rl78/ フォルダーにあります
実行した時のコマンドとエラーは以下の通りです。interrupt_handlers.h のPathはありませんので、エラーになるのも当然かと思われます。
include Pathを指定しているファイル等がないか探してみたのですが、見つけることができませんでした。
恐れ入りますが、PATHを追加する方法について教えてください。
/Applications/IDE4GR.app/Contents/Java/hardware/tools/gcc-rl78/rl78-elf/bin/rl78-elf-gcc -I/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/cores/rl78g13-I/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/variants -I/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/libraries/EEPROM -I/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/libraries/RTC -I/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/libraries/Wire -I/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/libraries/MsTimer2 -I/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/libraries/MsTimer2/utility -Os -fno-function-cse -funit-at-a-time -falign-jumps -fdata-sections -ffunction-sections -fno-cprop-registers -fsigned-char -g -DARDUINO=100 -DWORKAROUND_READ_MODIFY_WRITE -D__RL78__ -DGRADZUKI -c -x c++ /Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/libraries/MsTimer2/MsTimer2.cpp
-o /Users/Furutani/tmp.ide4gr/build6473659302968026464.tmp/MsTimer2/MsTimer2.cpp.o
/Applications/IDE4GR.app/Contents/Java/hardware/arduino/rl78g13/libraries/MsTimer2/MsTimer2.cpp:2:32:
fatal error: interrupt_handlers.h: No such file or directory #include <interrupt_handlers.h>
がじぇるね岡宮です。
ご不便をおかけして申し訳ありませんでした。ご連絡いただきありがとうございます。
IDE4GRのパッケージコンテンツを開き、以下の「platform.txt」を「Contents/Java/hardware/arduino/rl78g13/」に上書きコピーしていただいてもよろしいでしょうか?
# RL78 and platform. # ------------------------------ # For more info: name=Renesas RL78/G13 version=2.0.1 # AVR compile variables # --------------------- # add for MacOS by Abe #complier.path is not useful for macox specialbuildpath=/Applications/IDE4GR.app/Contents/Java/hardware/tools/gcc-rl78/rl78-elf/rl78-elf/bin:/Applications/IDE4GR.app/Contents/Java/hardware/tools/gcc-rl78/rl78-elf/bin: # Default "compiler.path" is correct, change only if you want to overidde the initial value compiler.path={runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/bin/ compiler.c.cmd=rl78-elf-gcc compiler.c.flags=-Os -fno-function-cse -funit-at-a-time -falign-jumps -fdata-sections -ffunction-sections -fno-cprop-registers -fsigned-char -g -DARDUINO=100 -DWORKAROUND_READ_MODIFY_WRITE -D__RL78__ compiler.S.cmd=rl78-elf-as compiler.S.flags=-Os -fno-function-cse -funit-at-a-time -falign-jumps -fdata-sections -ffunction-sections -fno-cprop-registers -fsigned-char -g -Wa,-gdwarf2 #compiler.elf2hex.flags=-O binary --gap-fill 0xff # change for MacOS by Abe compiler.elf2hex.flags=-O binary --gap-fill 0xff #compiler.elf2hex.flags=-O srec compiler.elf2hex.cmd=rl78-elf-objcopy compiler.c.elf.cmd=rl78-elf-ld compiler.c.elf.flags= compiler.ar.cmd=rl78-elf-ar compiler.ar.flags=rcs compiler.ldflags= compiler.size.cmd=rl78-elf-size compiler.includes="-I{runtime.ide.path}/hardware/arduino/rl78g13/cores/rl78g13/rl78/" "-I{runtime.ide.path}/hardware/arduino/rl78g13/cores/rl78g13/avr/" "-I{runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/rl78-elf/include" "-I{runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/lib/gcc/rl78-elf/4.8-GNURL78_v14.03/include" "-I{runtime.ide.path}/hardware/arduino/rl78g13/" # this can be overriden in boards.txt build.extra_flags= # AVR compile patterns # -------------------- ## Compile c files recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {includes} {compiler.includes} {compiler.c.flags} {build.extra_flags} -c -x c "{source_file}" -o "{object_file}" ## Compile c++ files recipe.cpp.o.pattern="{compiler.path}{compiler.c.cmd}" {includes} {compiler.includes} {compiler.c.flags} {build.extra_flags} -std=gnu++11 -c -x c++ "{source_file}" -o "{object_file}" ## Compile S files recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {includes} {compiler.includes} {compiler.S.flags} -c -x assembler-with-cpp "{source_file}" -o "{object_file}" ## Create archives recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}" ## Combine gc-sections, archives, and objects recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {object_files} "{build.path}/exception_handler.cpp.o" "{build.path}/vector_table.c.o" "{build.variant.path}/picalicoFree.a" "{build.variant.path}/pfdl.a" "-L{build.path}" "{build.path}/{archive_file}" -e_PowerON_Reset "-T{build.variant.path}/{build.ldscript}" {compiler.c.elf.flags} "{runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/lib/gcc/rl78-elf/4.8-GNURL78_v14.03/crtbegin.o" "{runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/lib/gcc/rl78-elf/4.8-GNURL78_v14.03/crtend.o" "{runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/rl78-elf/lib/crtn.o" -o "{build.path}/{build.project_name}.elf" "-L{runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/rl78-elf/lib" "-L{runtime.ide.path}/hardware/tools/gcc-rl78/rl78-elf/lib/gcc/rl78-elf/4.8-GNURL78_v14.03" --start-group --gc-sections -lstdc++ -lnosys -lm -lc -lgcc --end-group ## Create eeprom recipe.objcopy.eep.pattern= ## Create hex # change for MacOS by Abe #recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.mot" recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" ## Compute size recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).* recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).* recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* # SAM3 Uploader tools # ------------------- # change for MacOS by Abe #tools.rl78flash.cmd=rl78flash tools.rl78flash.cmd=RL78WriterCmd tools.rl78flash.cmd.windows=rl78flash.exe # change for MacOS by Abe #tools.rl78flash.path={runtime.ide.path}/hardware/tools/rl78 tools.rl78flash.path={runtime.ide.path}/hardware/tools tools.rl78flash.upload.params.verbose= tools.rl78flash.upload.params.quiet= # change for MacOS by Abe #tools.rl78flash.upload.pattern="{path}/{cmd}" -m 2 -vivewr {serial.port.file} "{build.path}/{build.project_name}.mot" tools.rl78flash.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin" {serial.port} GR-COTTON
修正版のMacOS用IDE for GRはV1.12aとして、近日Webサイトに公開したいと思います。