
# RX65N and platform.
# ------------------------------

# For more info:

name=Renesas RX65N
#version=0.0.4

# AVR compile variables
# --------------------- 

# Default "compiler.path" is correct, change only if you want to overidde the initial value
compiler.path={runtime.ide.path}/hardware/tools/gcc-rx/rx-elf/rx-elf/bin/
compiler.ar.path = {runtime.ide.path}/hardware/arduino/rx65n/cores/
compiler.c.cmd=rx-elf-gcc
compiler.cpp.cmd=rx-elf-g++
compiler.c.flags=-O2 -ffunction-sections -fdata-sections -fno-function-cse -fsigned-char -mno-balign -g -g2 -Wstack-usage=100 -mcpu=rx64m -misa=v2 -mlittle-endian-data -DCPPAPP -DARDUINO=144 -DGRROSE -D__RX600__ -D__RTOS -Ihardware/arduino/rx65n/cores -Ihardware/arduino/rx65n/cores/arduino -Ihardware/arduino/rx65n/cores/arduino/core -Ihardware/arduino/rx65n/libraries/Wire -Ihardware/arduino/rx65n/libraries/Wire/utility -Ihardware/arduino/rx65n/libraries/SPI -Ihardware/arduino/rx65n/libraries/RTC -Ihardware/arduino/rx65n/libraries/RTC/utility -Ihardware/arduino/rx65n/libraries/WeeESP8266_GR -Ihardware/arduino/rx65n/libraries/Servo -Ihardware/arduino/rx65n/cores/freertos -Ihardware/arduino/rx65n/cores/freertos/config_files -Ihardware/arduino/rx65n/cores/freertos/application_code -Ihardware/arduino/rx65n/cores/freertos/application_code/common_demos/include -Ihardware/arduino/rx65n/cores/freertos/lib/aws/include -Ihardware/arduino/rx65n/cores/freertos/lib/aws/include/private -Ihardware/arduino/rx65n/cores/freertos/lib/aws/FreeRTOS/portable/GCC/RX600v2 -Ihardware/arduino/rx65n/cores/freertos/lib/aws/FreeRTOS-Plus-TCP/include -Ihardware/arduino/rx65n/cores/freertos/lib/aws/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC -Ihardware/arduino/rx65n/cores/freertos/lib/aws/ota -Ihardware/arduino/rx65n/cores/freertos/lib/third_party/jsmn -Ihardware/arduino/rx65n/cores/freertos/lib/third_party/pkcs11 -Ihardware/arduino/rx65n/cores/freertos/lib/third_party/tinycbor -Ihardware/arduino/rx65n/cores/freertos/lib/third_party/mbedtls/include -Ihardware/arduino/rx65n/cores/freertos/src -Ihardware/arduino/rx65n/cores/freertos/src/compiler_support -Ihardware/arduino/rx65n/cores/freertos/src/compiler_support/register_access -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_bsp -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_cmt_rx -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_cmt_rx/src -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_ether_rx -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_flash_rx -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_flash_rx/src -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_flash_rx/src/flash_type_4 -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_flash_rx/src/targets -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_sci_rx -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_sci_rx/src -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_byteq -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_byteq/src -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_config -Ihardware/arduino/rx65n/cores/freertos/src/FIT_modified_code/r_pincfg -Ihardware/arduino/rx65n/cores/freertos/src/smc_gen/r_config -Ihardware/arduino/rx65n/cores/freertos/src/smc_gen/general -Ihardware/arduino/rx65n/cores/freertos/src/smc_gen/r_pincfg -Ihardware/arduino/rx65n/cores/micro-RTPS-client/src/c -Ihardware/arduino/rx65n/cores/micro-RTPS-client/include -Ihardware/arduino/rx65n/cores/micro-RTPS-client/thirdparty/microcdr/include -Ihardware/arduino/rx65n/cores/micro-RTPS-client/thirdparty/micrortps_transport/include
compiler.S.cmd=rx-elf-gcc
compiler.S.flags=-O2 -ffunction-sections -fdata-sections -fno-function-cse -fsigned-char -mno-balign -g -g2 -Wstack-usage=100 -mcpu=rx64m -misa=v2 -mlittle-endian-data -DCPPAPP -DARDUINO=144 -DGRROSE -D__RX600__ -D__RTOS
compiler.elf2hex.flags=-O binary
#compiler.elf2hex.flags=-O srec
compiler.elf2hex.cmd=rx-elf-objcopy
compiler.c.elf.cmd=rx-elf-g++
compiler.c.elf.flags=
compiler.ar.cmd=rx-elf-ar
compiler.ar.flags=rcs
compiler.ld.flags=
compiler.size.cmd=rx-elf-size
# 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.c.flags} {build.extra_flags} -c -x c "{source_file}" -o "{object_file}"

## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {includes} {compiler.c.flags} {build.extra_flags} -c -x c++ "{source_file}" -o "{object_file}"

## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {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}" {compiler.ld.flags} "-T{build.variant.path}/{build.ldscript}" {object_files} "{build.variant.path}/gr_common.a" "-L{build.path}" "{build.path}/{archive_file}" -o "{build.path}/{build.project_name}.elf" "-L{runtime.ide.path}/hardware/tools/gcc-rx/rx-elf/rx-elf/rx-elf/lib/64-bit-double" "-L{runtime.ide.path}/hardware/tools/gcc-rx/rx-elf/rx-elf/lib/gcc/rx-elf/4.8.4.201801-GNURX/64-bit-double" -nostartfiles -Wl,-e_PowerON_Reset -Wl,--start-group -lm -lc -lgcc -lstdc++ -lsim -lnosys -Wl,--end-group

## Create eeprom
recipe.objcopy.eep.pattern=

## Create hex
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
# -------------------

tools.savesketch.cmd=SaveSketch
tools.savesketch.cmd.windows=SaveSketch.bat
tools.savesketch.path={runtime.ide.path}/hardware/tools/rx

tools.savesketch.upload.params.verbose=
tools.savesketch.upload.params.quiet=
tools.savesketch.upload.pattern="{path}/{cmd}" GR-ROSE "{build.path}\{build.project_name}.bin"