hello,
I am doing App+Boot code in single project in IAR (16K limit, no licenced).My application is not exeeding the 16KB memory size because it is a reference code.
I want to generates symbols of bootloader file using batch file as below.
"bootloader.bat"
set TARGET_DIR=%1set PROJ_DIR=%2set TOOLKIT_DIR=%3
copy %TARGET_DIR%\Boot_rl78g13.out "C:\Users\My_Project\Desktop\IAR\Project_rl78g13\Bootloader\Image"%TOOLKIT_DIR%\bin\ielftool.exe %TARGET_DIR%\Boot_rl78g13.out %PROJ_DIR%\Boot_rl78g13.srec --srec%TOOLKIT_DIR%\bin\ielftool.exe %TARGET_DIR%\Boot_rl78g13.out %PROJ_DIR%\Boot_rl78g13.bin --bin%TOOLKIT_DIR%\bin\isymexport.exe %TARGET_DIR%\Boot_rl78g13.out %PROJ_DIR%\Boot_rl78g13.symbols --edit %PROJ_DIR%\Boot_rl78g13.edit
post build command is:
"$PROJ_DIR$\bootloader.bat" "$TARGET_DIR$" "$PROJ_DIR$" "$TOOLKIT_DIR$"
Below 4th command is not executing and compilation fails due to below line and all others is okay and generates the files.
%TOOLKIT_DIR%\bin\isymexport.exe %TARGET_DIR%\Boot_rl78g13.out %PROJ_DIR%\Boot_rl78g13.symbols --edit %PROJ_DIR%\Boot_rl78g13.edit
I have also cheked TOOLKIT directory, isymexport.exe is available at that location.
Please help. why? 4th command is not executing.
Hi SANTANU
This seems to be something related to the path names expansion in your batch script.
I tried to run the same commands you have in a similar way without errors.
You can take advantage of the…
You can take advantage of the argument variables available from the IDE to simplify your script.
Search for "argument variables" in the Help ~> IDE Project Management and Building Guide for further information.
@echo off rem File: post_build.bat rem IDE Post-Build command-line: rem $PROJ_DIR$/post_build.bat "$TOOLKIT_DIR$" "$PROJ_DIR$" "$TARGET_PATH$" "$TARGET_BPATH$" rem ----- rem Description: rem $TOOLKIT_DIR$ ~> <install-dir>/rl78 rem $PROJ_DIR$ ~> Project directory rem $TARGET_PATH$ ~> Full path of primary output file rem $TARGET_BPATH$ ~> Full path of primary output file without extension rem ----- rem In the Build Window, set "Filter ~> All" to display the echo commands set TOOLKIT_DIR=%1 set PROJ_DIR=%2 set TARGET_PATH=%3 set TARGET_BPATH=%4 echo -- Copying ELF to the Bootloader Image dir... copy %TARGET_PATH% %USERPROFILE%\Desktop\IAR\Project_rl78g13\Bootloader\Image > NUL echo -- Converting ELF to SREC... %TOOLKIT_DIR%\bin\ielftool --silent --srec %TARGET_PATH% %TARGET_BPATH%.srec echo -- Converting ELF to BIN... %TOOLKIT_DIR%\bin\ielftool --silent --bin %TARGET_PATH% %TARGET_BPATH%.bin echo -- Exporting ELF symbols (using $PROJ_DIR$/my-steering-file.txt)... %TOOLKIT_DIR%\bin\isymexport %TARGET_PATH% %TARGET_BPATH%.symbols --edit "%PROJ_DIR%\my-steering-file.txt"
Hi Felipe
a lot of thanks to solve my problem. Now its working fine.