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
  • iniitial prj compile with error in r20an0604eu0103-ek-ra4m3-exampleproject (3)\ek_ra4m3\trustzone\rtc\e2studio\rtc_s_ek_ra4m3_ep 

    I din't update anything, all trustzon security project build with following fsp_vector_t not declared error, would you help? it stall me for couple of weeks, thanks.

    ../src/g_rtc_guard.c:114:60: error: unknown type name 'fsp_version_t'; did you mean 'fsp_vector_t'?
    114 | BSP_CMSE_NONSECURE_ENTRY fsp_err_t g_rtc_version_get_guard(fsp_version_t *version)
    | ^~~~~~~~~~~~~
    | fsp_vector_t

  • Hello Sky!

    How's it going so far? I hope you could wait for our experts or somebody from this forum to give you a definite answer. In the meantime, you might want to refer to the FSP documentation here: https://renesas.github.io/fsp/group___r_e_n_e_s_a_s___c_o_m_m_o_n.html?pos=442,18,722,18,776,18,897,18 

    All the best!

    Sai
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-support.renesas.com/knowledgeBase

  • 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.

Reply
  • 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.

Children