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

# For more info:

name=Renesas RX65N
#version=1.0.0

# 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=-m64bit-doubles -ffunction-sections -fdata-sections -fno-function-cse -fsigned-char -mno-balign -g -g2 -mcpu=rx64m -misa=v2 -mlittle-endian-data -DCPPAPP -DARDUINO=144 -DGRROSE -D__RX600__ -D__RTOS -includehardware/tools/gcc-rx/rx-elf/rx-elf/rx-elf/include/string.h -Ihardware/arduino/rx65n/cores -Ihardware/arduino/rx65n/cores/arduino -Ihardware/arduino/rx65n/cores/arduino/core -Ihardware/arduino/rx65n/cores/arduino/core/avr -Ihardware/arduino/rx65n/libraries -Ihardware/arduino/rx65n/libraries/AdafruitGFX -Ihardware/arduino/rx65n/libraries/EEPROM -Ihardware/arduino/rx65n/libraries/Ethernet -Ihardware/arduino/rx65n/libraries/ICS -Ihardware/arduino/rx65n/libraries/MsTimer2 -Ihardware/arduino/rx65n/libraries/PPG -Ihardware/arduino/rx65n/libraries/RTC -Ihardware/arduino/rx65n/libraries/RTC/utility -Ihardware/arduino/rx65n/libraries/SD -Ihardware/arduino/rx65n/libraries/SD/utility -Ihardware/arduino/rx65n/libraries/Servo -Ihardware/arduino/rx65n/libraries/SPI -Ihardware/arduino/rx65n/libraries/SPIEEPROM -Ihardware/arduino/rx65n/libraries/Stepper -Ihardware/arduino/rx65n/libraries/WiFiEsp -Ihardware/arduino/rx65n/libraries/WiFiEsp/utility -Ihardware/arduino/rx65n/libraries/Wire -Ihardware/arduino/rx65n/libraries/Wire/utility -Ihardware/arduino/rx65n/cores/arduino/rx65n -Ihardware/arduino/rx65n/cores/FreeRTOS -Ihardware/arduino/rx65n/cores/FreeRTOS/application_code -Ihardware/arduino/rx65n/cores/FreeRTOS/config_files -Ihardware/arduino/rx65n/cores/FreeRTOS/lib -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/bufferpool -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/crypto -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS/portable -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS/portable/GCC -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS/portable/GCC/RX600v2 -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS/portable/MemMang -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/include -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/source -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/source/portable -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/source/portable/BufferManagement -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/source/portable/Compiler -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/source/portable/NetworkInterface -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/RX -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/greengrass -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/include -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/include/FreeRTOS_POSIX -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/include/FreeRTOS_POSIX/sys -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/include/private -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/mqtt -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/pkcs11 -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/secure_sockets -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/shadow -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/tls -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/utils -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/aws/wifi -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/jsmn -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/mbedtls -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/mbedtls/include -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/mbedtls/include/mbedtls -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/mbedtls/source -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/mcu_vendor -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/mcu_vendor/renesas -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/pkcs11 -Ihardware/arduino/rx65n/cores/FreeRTOS/lib/third_party/tinycbor -Ihardware/arduino/rx65n/cores/FreeRTOS/src -Ihardware/arduino/rx65n/cores/FreeRTOS/src/amazon_freertos_common -Ihardware/arduino/rx65n/cores/FreeRTOS/src/amazon_freertos_common/compiler_support -Ihardware/arduino/rx65n/cores/FreeRTOS/src/amazon_freertos_common/compiler_support/gnuc -Ihardware/arduino/rx65n/cores/FreeRTOS/src/amazon_freertos_common/network_support -Ihardware/arduino/rx65n/cores/FreeRTOS/src/amazon_freertos_common/network_support/onchip_rx_ether -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/board -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/board/all -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/board/generic_rx65n -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/board/rx65n -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/mcu -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/mcu/all -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/mcu/rx65n -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/mcu/rx65n/register_access -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_bsp/mcu/rx65n/register_access/gnuc -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_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_ether_rx/src -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_ether_rx/src/phy -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_ether_rx/src/targets -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_ether_rx/src/targets/rx65n -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_flash_rx/src/targets/rx65n -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_s12ad_rx -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_s12ad_rx/src -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_s12ad_rx/src/targets -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_s12ad_rx/src/targets/rx65x -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_sci_rx/src/targets -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_modified_code/r_sci_rx/src/targets/rx65n -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_setting_files -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_setting_files/r_config -Ihardware/arduino/rx65n/cores/FreeRTOS/src/FIT_setting_files/r_pincfg -Ihardware/arduino/rx65n/cores/FreeRTOS/src/smc_gen -Ihardware/arduino/rx65n/cores/FreeRTOS/src/smc_gen/general -Ihardware/arduino/rx65n/cores/FreeRTOS/src/smc_gen/r_config -Ihardware/arduino/rx65n/cores/FreeRTOS/src/smc_gen/r_pincfg -Ihardware/arduino/rx65n/cores/FreeRTOS/src/smc_gen/UNUSED_generated_code -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/core -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/core/communication -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/core/session -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/core/session/stream -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/profile -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/profile/discovery -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/profile/session -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/profile/transport -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/profile/transport/serial -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/profile/transport/tcp -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/profile/transport/udp -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/include/uxr/client/util -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/core -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/core/communication -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/core/log -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/core/serialization -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/core/session -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/core/session/stream -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/profile -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/profile/discovery -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/profile/discovery/transport -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/profile/session -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/profile/transport -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/profile/transport/tcp -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/profile/transport/udp -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/src/c/util -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty/microcdr -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty/microcdr/include -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty/microcdr/include/ucdr -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty/microcdr/include/ucdr/types -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty/microcdr/src -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty/microcdr/src/c -Ihardware/arduino/rx65n/cores/Micro-XRCE-DDS-Client/thirdparty/microcdr/src/c/types -Ihardware/arduino/rx65n/cores/ros2_msg -Ihardware/arduino/rx65n/cores/aws_utilities 
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}" -O2 -std=gnu99 {includes} -I{build.path} {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}" -O0 {includes} -I{build.path} {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}/{build.archives}" "{build.path}/{archive_file}" "-L{build.path}" -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"