diff --git a/examples/rh850/can_demo/build.sh b/examples/rh850/can_demo/build.sh index 667af96d2..0ff22ffe5 100644 --- a/examples/rh850/can_demo/build.sh +++ b/examples/rh850/can_demo/build.sh @@ -2,7 +2,9 @@ set -e +TRAMPOLINE_BASE_PATH="$(realpath ../../..)" PROGRAM_NAME=can_demo +FLASH_TOOL_PROGRAM_NAME=App_CDD_ICCOM_S4_Sample_G4MH echo "*** Run Goil ***" mkdir -p _build @@ -14,3 +16,10 @@ cmake -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE=../${PROGRAM_NAME}/compiler.cm echo "*** Run Make ***" make + +# Create the S-Record file to provide to Flash_Tool to set the G4MH core default firmware on board boot +# The flashing procedure expects 32-bit addresses, so use S3 records instead of S1 +objcopy -O srec --srec-forceS3 ${PROGRAM_NAME}_exe.abs ${FLASH_TOOL_PROGRAM_NAME}.s3 +# Add a specific header +rlink "$(cygpath -w ${TRAMPOLINE_BASE_PATH}/machines/rh850/g4mh/G4MH_Head.srec)" ${FLASH_TOOL_PROGRAM_NAME}.s3 -FOrm=SType -OUtput=${FLASH_TOOL_PROGRAM_NAME}.srec +rm -f ${FLASH_TOOL_PROGRAM_NAME}.s3 diff --git a/examples/rh850/memory_unlocker/build.sh b/examples/rh850/memory_unlocker/build.sh index 9fddd42f9..c435631f7 100644 --- a/examples/rh850/memory_unlocker/build.sh +++ b/examples/rh850/memory_unlocker/build.sh @@ -2,6 +2,7 @@ set -e +TRAMPOLINE_BASE_PATH="$(realpath ../../..)" PROGRAM_NAME=memory_unlocker FLASH_TOOL_PROGRAM_NAME=App_CDD_ICCOM_S4_Sample_G4MH @@ -19,6 +20,6 @@ make # Create the S-Record file to provide to Flash_Tool to set the G4MH core default firmware on board boot # The flashing procedure expects 32-bit addresses, so use S3 records instead of S1 objcopy -O srec --srec-forceS3 ${PROGRAM_NAME}_exe.abs ${FLASH_TOOL_PROGRAM_NAME}.s3 -# Add a specific header (it has been downloaded here : https://raw.githubusercontent.com/renesas-rcar/whitebox-sdk/v4.x/mcu/G4MH_Head.srec) -rlink ../G4MH_Head.srec ${FLASH_TOOL_PROGRAM_NAME}.s3 -FOrm=SType -OUtput=${FLASH_TOOL_PROGRAM_NAME}.srec +# Add a specific header +rlink "$(cygpath -w ${TRAMPOLINE_BASE_PATH}/machines/rh850/g4mh/G4MH_Head.srec)" ${FLASH_TOOL_PROGRAM_NAME}.s3 -FOrm=SType -OUtput=${FLASH_TOOL_PROGRAM_NAME}.srec rm -f ${FLASH_TOOL_PROGRAM_NAME}.s3 diff --git a/examples/rh850/memory_unlocker/G4MH_Head.srec b/machines/rh850/g4mh/G4MH_Head.srec similarity index 100% rename from examples/rh850/memory_unlocker/G4MH_Head.srec rename to machines/rh850/g4mh/G4MH_Head.srec