Compilation error with SD support

Hi 

Am working on S7G2-DK board .

I have a working project for ethernet and i have included SD card support then am getting many compilation eerrors

$e2_studio\workspace\IntegrationCode\synergy\ssp\inc\framework\el/fx_api.h:1202:47: error: conflicting types for '_fxe_file_attributes_read'
#define fx_file_attributes_read _fxe_file_attributes_read
^
$e2_studio\workspace\IntegrationCode\synergy\ssp_supplemental\filex_stub/filex_stub.h:115:13: note: in expansion of macro 'fx_file_attributes_read'
UINT fx_file_attributes_read(FX_MEDIA *media_ptr, CHAR *file_name, UINT *attributes_ptr);
^
$e2_studio\workspace\IntegrationCode\synergy\ssp\inc\framework\el/fx_api.h:1229:47: error: conflicting types for '_fxe_media_flush'
#define fx_media_flush _fxe_media_flush
^
$e2_studio\workspace\IntegrationCode\synergy\ssp_supplemental\filex_stub/filex_stub.h:129:13: note: in expansion of macro 'fx_media_flush'

 

 

please suggest , how to proceed

 

Thanks and Regards

Rizwan Syed

  • Hi Rizwan,

    Your project has likely both FileX and FileX Stub components. Currently it's not possible to have both in one project, I suggest removing FileX Stub. Which module from your application does require FileX Stub? NetX HTTP Server?

    Regards,
    adboc
  • In reply to adboc:

    Hi Adboc,

    Netx HTTP server was using FileX Stub .
    When i remove FileX stub , i get the following errors

    ../src/synergy_gen/main_thread.c: In function 'http_server_init':
    ../src/synergy_gen/main_thread.c:48:101: error: 'SYNERGY_NOT_DEFINED' undeclared (first use in this function)
    g_http_server_err = nx_http_server_create (&g_http_server, "g_http_server HTTP Server", &g_ip, &SYNERGY_NOT_DEFINED,

    ^
    src/synergy_gen/subdir.mk:33: recipe for target 'src/synergy_gen/main_thread.o' failed
    make: *** [src/synergy_gen/main_thread.o] Error 1
    make: *** Waiting for unfinished jobs....
    ../src/synergy_gen/sd_thread.c:38:6: error: redefinition of 'SYNERGY_NOT_DEFINED'
    VOID SYNERGY_NOT_DEFINED(VOID *cdc_instance)
    ^
    ../src/synergy_gen/sd_thread.c:23:6: note: previous definition of 'SYNERGY_NOT_DEFINED' was here
    void SYNERGY_NOT_DEFINED(VOID *cdc_instance)
    ^
    src/synergy_gen/subdir.mk:33: recipe for target 'src/synergy_gen/sd_thread.o' failed
    make: *** [src/synergy_gen/sd_thread.o] Error 1

    12:35:49 Build Failed. 7 errors, 4 warnings. (took 3s.154ms)


    How to proceed with this

    Thanks and Regards
    Rizwan Syed

  • In reply to rizwan:

    Hi Rizwan,

    Instead of removed FileX Stub instance, please attach the other FileX instance (click on "Add FileX" block and select your instance from "Use" submenu). HTTP Server should have valid FileX instance always attached (either FileX Stub or "normal" instance), even it does not read files from this instance.

    Regards,
    adboc
  • In reply to adboc:

     

    Thanks adboc for your reply.

    I have two threads one with ethernet and other with SD card functionality.

    I have added filex to my etherent thread.Still same issue is observed as mentioned at the starting of this thread.

     

    I have attached my threads screenshot.Please have a look and let me know for your valuable suggestions

     

    Thanks and Regards

    Rizwan Syed

  • In reply to rizwan:

    Hi Rizwan,

    I meant removing FileX Stub block, then "Add FileX" should appear instead. Click it, select Use > g_fx_media0 FileX on Block Media. FileX Source and ThreadX Source instances can be removed.

    Regards,
    adboc
  • In reply to adboc:

    Hi adboc,

    Thanks for your reply.

    When i create  g_fx_media0 FileX on Block Media    instead of filex stub. then  g_fx_media0 FileX on Block Media is created under ethernet thread.

    and i will have one more sd thread with similar  g_fx_media1 FileX on Block Media.( as shown in attached image)

    DO i need to remove  g_fx_media1  FileX on Block Media from sd thread and add required configuration in ethernet thread.Will it work.

    I need to add some configurations for SD card to check read write  functionality also.

     

    Please check what am doing is correct

    Please suggest

     

    Thanks and Regards

    Rizwan Syed

  • In reply to rizwan:

    Hi adboc,

    With the present scenario. am getting the following errors

    $integrationcode\synergy\ssp\inc\ssp_features.h:93:24: error: redefinition of 'g_vector_SDHIMMC_0_ACCS'
    const ssp_vector_t g_vector_##ip##_##channel##_##signal \
    ^
    ../src/synergy_gen/common_data.c:1222:1: note: in expansion of macro 'SSP_VECTOR_DEFINE_CHAN'
    SSP_VECTOR_DEFINE_CHAN(sdhimmc_accs_isr, SDHIMMC, ACCS, 0);
    ^
    $integrationcode\synergy\ssp\inc\ssp_features.h:93:24: note: previous definition of 'g_vector_SDHIMMC_0_ACCS' was here
    const ssp_vector_t g_vector_##ip##_##channel##_##signal \
    ^
    ../src/synergy_gen/common_data.c:26:1: note: in expansion of macro 'SSP_VECTOR_DEFINE_CHAN'
    SSP_VECTOR_DEFINE_CHAN(sdhimmc_accs_isr, SDHIMMC, ACCS, 0);
    ^
    $integrationcode\synergy\ssp\inc\ssp_features.h:95:29: error: redefinition of 'g_vector_info_SDHIMMC_0_ACCS'

    Please suggest

    Thanks and Regards
    Rizwan Syed
  • In reply to rizwan:

    Hi Rizwan,

    I've just done a simple project with two threads: one for NetX HTTP Server and the other for FileX on SDMMC. Here's how the main thread stacks look like finally:

    At the beginning, FileX on Block Media instance should be created in SD Thread. Then add NetX HTTP to the main thread and select FileX instance from the first thread:

    Regards,
    adboc

  • In reply to adboc:

    Hi Adboc

    Thanks for the reply.
    I have done similar procedure as mentioned.
    When i try to debug , my application stops at BSP_CFG_HANDLE_UNRECOVERABLE_ERROR (0);
    Usbx ppol memory size also changed to 65536

    void g_fx_media1_err_callback_internal(void * p_instance, void * p_data)
    {
    /** Suppress compiler warning for not using parameters. */
    SSP_PARAMETER_NOT_USED (p_instance);
    SSP_PARAMETER_NOT_USED (p_data);

    /** An error has occurred. Please check function arguments for more information. */
    BSP_CFG_HANDLE_UNRECOVERABLE_ERROR (0);
    }


    Please suggest how to proceed with this

    Thanks and Regards
    Rizwan Syed
  • In reply to rizwan:

    Hi Rizwan,

    Have you configured SDHI pins for a selected channel? Please show SDMMC driver configuration and SHDI pins configuration.

    Regards,
    adboc
  • In reply to adboc:

    HI Adboc,

    Actuallt ETH0 and SDHI0 both are using same pins.

    As of now i have disabled SDHI0.

     

     i have attached my SDMMC0 properties.

     

    .

     

    BSP_CFG_HANDLE_UNRECOVERABLE_ERROR (0);

    The above error is related to SDHI?

    Please suggest

     

    Thanks and Regards

    Rizwan Syed

  • In reply to rizwan:

    Hi Rizwan,

    Yes, this error is likely related to SDHI0 pins not being configured. SHDI0 pins must be enabled if you would like to use it. Have you considered using ETH1 instead of ETH0?

    Regards,
    adboc
  • In reply to adboc:

    Hi Adboc,

    Actually i have already tried only with ETH1 and SD.
    During that time also, my application stops at BSP_CFG_HANDLE_UNRECOVERABLE_ERROR (0);but in g_sf_console0

    void g_sf_console0_err_callback_internal(void * p_instance, void * p_data)
    {
    /** Suppress compiler warning for not using parameters. */
    SSP_PARAMETER_NOT_USED (p_instance);
    SSP_PARAMETER_NOT_USED (p_data);

    /** An error has occurred. Please check function arguments for more information. */
    BSP_CFG_HANDLE_UNRECOVERABLE_ERROR (0);
    }

    if ETH1 and SD works , its fine for me But now am getting BSP_CFG_HANDLE_UNRECOVERABLE_ERROR (0).
    ETH0 is not required.

    Thanks and Regards
    Rizwan Syed
  • In reply to rizwan:

    HI adboc,

    Issue is solved, There was some problem with console in PC.

    Thanks and Regards
    Rizwan Syed
  • SSP will automatically remove any duplicate components you have added graphically. Just make sure any g_ symbols you have added are what you want in your code. Best to start with working projects from Renesas. They exists for almost everything.