RA2A1 Self Test Image rebuild error

Hi there!

I'm using a custom user board with R7FA2A1AB3CFM (RA2A1 family). When I finish the code to be loaded on the board, I add the self-test feature and create the addcrc.srec image to do the ROM test. When I do it for the first time, everything works fine, but when I modify the code (not the self-test part, but my code part) I can't rebuild and create a new addcrc.srec file. First, I make a clean project and then compile it with the command specified in the post-compilation message "arm-none-eabi-objcopy -O srec "${ProjName}.elf" "Original.srec" & ${ProjDirPath}/srec/srec_cat @${ProjDirPath}/srec/CRCcalcCmd256KB.txt" in Project/Properties/C C++ Compilation/Settings -> Compilation Steps -> Post-compilation Steps -> Command(s). The error I get is the following:

arm-none-eabi-objcopy -O srec "RA2A1_Safety.elf" "Original.srec" & C:/git/RA2A1_Safety/srec/srec_cat @C:/git/RA2A1_Safety/srec/CRCcalcCmd256KB.txt

srec_cat: Original.srec: 2305: hexadecimal digit expected

make[1]: [makefile:139: post-build] Error 1 (ignored)

I understand that there is a file or dependency that I must get rid of every time I rebuild the project, but I can't find it. I've tried deleting the addcrc.srec and Original.srec files but nothing. The solution I have found is to make the code in one repository and the addcrc.srec in another, so that every time I need to modify the code I work in the first repository and when I need to create the addcrc.srec I completely delete the project from the second repository and put the modified one to make a clean compilation of the addcrc.srec, but it is not a good solution. Is there any way to be able to rebuild the addcrc.srec after modifying the code easily?

Thanks in advance!

Best regards,

Aitor Azkolain

  • Hello Aitor,

    Thanks for reaching out Renesas Engineering Community.

    As far I can understand your issue is that as soon as you added some extra  code lines and changes in your project and you build it again the output file addcrc.srec is not generated and your project doesn't build?

    In order to replicate your issue I took the project I shared with you in the thread you have posted in the past in our Community and added some changes:

    https://community.renesas.com/mcu-mpu/ra/f/forum/33143/selftest-rom-crc-problem

    And the project built with no issues and the addcrc.srec file gets generated when I perform a clean and then build  to build the project.

    In case you add a change to a specific file in your project the build as it is in e2studio is incremental build and does not build the whole project and files again but only the files that you have added changes too. So the post build command is not executed.

    You need either to select Build all or to perform a Clean project and than build.

    However would it be possible to share with us your project to check your command settings and be able to replicate exactly your issue?

    Thank you.

    Best Regards,

    IK_Renesas

  • Hi IK_Renesas,

    Sorry for the delay, I think I found a solution. When I need to rebuild, I just clean the project and build it without the post-build commands. Once compiled, I add the post-build commands to rebuild the modified code with the CRC and it works.

    Thanks in advance.

    Best regards, 

    Aitor Azkolain