Hi there!
I'm using EK-RA2A1 evaluation board and trying to implement IEC 60730/60335 Self Test Library for RA MCU (CM4_CM23) to the project. When following the attached PDF about how to implement the CRC calculation of the ROM, when building the project doesn't create addcrc.srec so I can't add to the debug and the crc calculation gives error.
Added the "arm-none-eabi-objcopy -O srec "${ProjName}.elf" "Original.srec" & ${ProjDirPath}/srec/srec_cat @${ProjDirPath}/srec/CRCcalcCmd256KB.txt" to Project/Properties/C C++ Build/Settings -> Build Steps -> Post-build steps -> Command(s) but it does nothing apparently.
What am I missing? Thanks in advance!
Best regars,
Aitor Azkolain
Hello,
Thank you for reaching out Renesas Engineering Community!
Have you downloaded the SRecord tool required?
Please advise section 2.2.1 of this document and follow the steps described:
https://www.renesas.com/us/en/document/apn/ra-family-iec-6073060335-self-test-library-ra-mcu-cm4cm23
Regards,
IK
Hi IK,
First of all, thank you for you fast reply!
Yes, I added the SRecord (v1.65.0) to my project as shown in the following picture:
And then added the command specified in the pdf as follow:
Hello again,
Probably something has not been inserted correctly to the Post Build Commands.
I will attach for you a project tested on EK-RA6M4 which is using the srec_cat.exe to calculate the CRC with STM32-le method.
As you can see as you I have created a project which includes an srec folder which has the txt script and the srec_cat.exe to calculate the checksum.
In post build commands I have set:
To generate the Original.srec file from the project .elf file in Debug folder. The Original.srec file is going to be used as the input file for the final calculation of the checksum and execute the srec to give me the calculated result.
arm-none-eabi-objcopy -O srec "${ProjName}.elf" "Original.srec" & ${ProjDirPath}/srec/srec_cat @${ProjDirPath}/srec/CRCcalcCmdDebug1MB.txt
In my txt file I have set the memory adress where I want the final CRC result to be stored and also I have set the output to be printed in the console tab as soon as the project builds in hex format.
And here is the CRC printed:
If I go to the .txt file and change the output to the addcrc.srec file then this file in Debug folder will be generated, holding the CRC value:
I perform one clean build and then build again the project.
I see that the srec output file I want has been created:
And if I open this file, I see that:
I see that the final CRC is hold in the adress I declared in the .txt script.
Find the project attached for your reference.
RA6M4_CRC_test_srec.zip
Hope it helps.
Hello sir,
I tried the added project and it work, I think I found the error. When building it seems the project I made doesn't find the folder srec and the file inside, maybe I'm not doing it the right way or I need to add the path in the building configuration. How do you add the srec folder and the files to the project? The steps I follow are File->New->Renesas C/C++ Project-> Renesas RA and then I select the EK-RA2A1. Once the project is created, I add the srec folder with right click in the project main folder and then New->Folder. Finally, I copy/paste the .txt and .exe files into the folder. This is the error shown:
Thanks in advance.
Best regards,
I found the error. The problem was that windows set as project folder path One Drive, and the it breaks. I did again in a local path (C disk for example) and worked. Thanks a lot!
Thanks for your feedback Aitor.
Best Regards,