# 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