fsp_version_t not found in example ra4m3 project truszon project

hi,there

    fsp_version_t not found in example ra4m3 project truszon project, where does fsp_version_t defined? thanks in advanced.

BR

RY

Parents Reply Children
  • fsp_version_t has been removed from FSP 3.0.0 when the VersionGet APIs were removed ( github.com/.../62 ) It look like the project you are using has not been updated to work with FSP 3.0.0 yet.

    Try these versions : -

    FSP_3_0_0_EK_RA4M3_Trustzone_RTC.zip

    (I removed the function from the secure project and updated the linker scripts for both secure and non-secure  projects)

  • thanks for reply,Jeremy,

  • c:/renesas/ra/e2studio_v2021-01_fsp_v2.3.0/toolchains/gcc_arm/9_2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/g_rtc_guard.o: in function `g_rtc_version_get_guard':
    C:\Users\rikey\e2_studio\workspace\rtc_s_ek_ra4m3_ep\Debug/../src/g_rtc_guard.c:134: undefined reference to `R_RTC_VersionGet'
    c:/renesas/ra/e2studio_v2021-01_fsp_v2.3.0/toolchains/gcc_arm/9_2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ./ra/fsp/src/bsp/mcu/all/bsp_security.o: in function `R_BSP_NonSecureEnter':
    C:\Users\rikey\e2_studio\workspace\rtc_s_ek_ra4m3_ep\Debug/../ra/fsp/src/bsp/mcu/all/bsp_security.c:201: undefined reference to `FLASH_NS_IMAGE_START'
    collect2.exe: error: ld returned 1 exit status
    makefile:68: recipe for target 'rtc_s_ek_ra4m3_ep.elf' failed
    make: *** [rtc_s_ek_ra4m3_ep.elf] Error 1

  • sorry for computer issue,and sent some garbage, please help on the error for FLASH_NS_IMAGE_START, How can I set FLASH_NS_IMAGE_START? thanks in advanced.

  • sorry for computer issue,and sent some garbage, please help on the error for FLASH_NS_IMAGE_START, How can I set FLASH_NS_IMAGE_START? thanks in advanced.

  • Are you using the versions of the projects I posted? I totally removed the function g_rtc_version_get_guard() from the secure project, and deleted the file srcipts/fsp.ld from both the secure and non-secure projects and regenerated both the projects contents, to update the linker scripts to the linker scripts for FSP 3.0.0

  • hi  Jeremy,

        thanks for the prompt response, I used the project you post, I'll double check it again.

        but for FLASH_NS_IMAGE_START,it's located in bsp_security.c, you mean you don't use it in fsp.ld and then FLASH_NS_IMAGE_START should be a issue?

       how can I put rtc_s_ek_ra4m3_ep and rtc_ns_ek_ra4m3_ep image in MCU at same time? 

       and can we program flash when MCU in NSECSD state?

       thanks in advanced.

       Sky

  • FLASH_NS_IMAGE_START is a symbol defined in the linker script, this is why I had to update the linker scripts :-

    "... and deleted the file srcipts/fsp.ld from both the secure and non-secure projects and regenerated both the projects contents, to update the linker scripts to the linker scripts for FSP 3.0.0"

  • hi Jeremy, in src/g_rtc_guard.c you uploaded , line 134, there are   return R_RTC_VersionGet (version_checked); please check, tthanks. and secondly,I used code  you updated, why report FLASH_NS_IMAGE_START undefined? how I solve R_RTC_VersionGet and FLASH_NS_IMAGE_START issue? thanks. 

    SKY

  • In the code I uploaded, in the secure project, the file g_rtc_guard.c the function is totally removed by #if 0 #endif :- 

    #if 0
    BSP_CMSE_NONSECURE_ENTRY fsp_err_t g_rtc_version_get_guard(fsp_version_t *version)
    {
        /* Verify all pointers are in non-secure memory. */
        fsp_version_t *version_checked = cmse_check_pointed_object (version, CMSE_AU_NONSECURE);
        FSP_ASSERT (version == version_checked);

        /* TODO: add your own security checks here */

        return R_RTC_VersionGet (version_checked);
    }
    #endif

    Which version of the FSP are you using? The projects built fine for me.

  • hi Jeremy,

        thanks now both S/NS can be build.

        did you try load both your rtc_s_ek_ra4m3_ep/rtc_ns_ek_ra4m3_ep  into mcu at same time? which do I need update?  thanks.

       br

       sky

  • Both the Secure and Non-secure applications need to be programmed into the RA device. In the debug profile I used, both of the elf files are being loaded :-

  • thanks for prompt response, so only when mcu in SSD state, can we download rtc_ns_ek_ra4m3(S+NS elf) into mcu right?  can i down load rtc_s_ek_rt4m4 into mcu when mcu in SSDstate, then switch mcu into nsecssd, then down load rtc_ns_ek_ra4m3?