Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G4MH: added the generation of a flashable CAN demo firmware. #159

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions examples/rh850/can_demo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 3 additions & 2 deletions examples/rh850/memory_unlocker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -e

TRAMPOLINE_BASE_PATH="$(realpath ../../..)"
PROGRAM_NAME=memory_unlocker
FLASH_TOOL_PROGRAM_NAME=App_CDD_ICCOM_S4_Sample_G4MH

Expand All @@ -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