R7FS7G2 Dev Kit SD Card

I have the dev kit for the R7FS7G2. I have been doing some tests reading files from the SD card. the card is rated as 10. My reads using the fx_file_read are about 340K/s. That seems pretty slow. Is there a way to speed up the read?
  • SD card is inserted into the USB host port

  • Try changing the driver on SSC to DMA and see if it gets better. Read as many bytes as possible per read call to FileX.
  • In reply to Chuck:

    Hi Chuck,

    Hope this helps: renesasrulz.com/.../34343

    Regards,
    adboc
  • In reply to larry_c_not_Renesas:

    Can you please tell me where so set this?
  • In reply to Chuck:

    Hi Chuck,

    You should add "USBX Host Class Mass Storage Source" module in the configurator as presented in screenshots in this post: renesasrulz.com/.../34343

    Regards,
    adboc

  • In reply to adboc:

    So that causes an #error "Secure builder required to compile this file" ux_host_class_storage_activate.c

    I did a search on this error and found this page:

    synergygallery.renesas.com/.../r20ut4243eu0101-synergy-e2studio-v620-relnote.pdf

    section 5.17 5.17
    Build fails with secure builder required error after Migrating IAR v7.x tool chain project to IAR v8.x
    Importing an existing project with IAR v7.x toolchain to e2 studio v6.2.0 with IAR toolchain v
    8.x updates the command line by removing the isde call causing the build to fail with the errors
    secure build required to build the file.
    Workaround: Go to Properties of the project:
    1.Add environment variable if missing:
    SECURE_BUILD_COMMAND: ${renesas.support.targetLoc:synergy-build} /isdebuild
    2.Update Command Line pattern IAR C/C++ Compiler for ARM setting if following command is missing:
    ${SECURE_BUILD_COMMAND}
    3.Update Command Line pattern IAR C/C++ Assembler for ARM if following command is missing:
    ${SECURE_BUILD_COMMAND}
    Issue ID:
    19495

    I found the environment variables and added the SECURE_BUILD_COMMAND value
    However, I could not find the Command Line pattern IAR C/C++ Compiler for ARM setting

    Am I in the right rabbit hole?
  • In reply to Chuck:

    Hello Chuck,

    You may find these settings in Project > Properties > C/C++ Build > Settings > IAR C/C++ Compiler for ARM and IAR Assembler for ARM. Command line for the first one should look like:
    ${SECURE_BUILD_COMMAND} ${COMMAND} ${INPUTS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${FLAGS}

    For the assembler:
    ${SECURE_BUILD_COMMAND} ${COMMAND} "${InputFileRelPath}" ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${FLAGS}

    Regards,
    adboc
  • In reply to adboc:

    Sorry, I dont see IAR C/C++ Compiler and IAR Assembler. I do see Cross GNU C Compiler and Cross ARM GNU Assembler.
  • In reply to Chuck:

    Hello,

    what is the project history - for example, was it migrated from IAR EW for Synergy to e2 studio?

    What toolchain is currently selected in your project? This information can be found in the:
    Synergy Configuraton window > Summary tab
    or in the:
    Project > Properties > C/C++ Build > Tool Chain Editor > Current toolchain.

    Depending on the toolchain selection, the following values should be set in the project properties:
    Project > Properties > C/C++ Build > Settings >

    • (GCC ARM Embedded)
      Cross ARM GNU Assembler > Command line pattern:
      ${SECURE_BUILD_COMMAND} ${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
      Cross ARM C Compiler > Command line pattern:
      ${SECURE_BUILD_COMMAND} ${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c ${INPUTS}
    • (IAR Toolchain for ARM - (8.x))
      IAR C/C++ Compiler for ARM > Command line pattern:
      ${SECURE_BUILD_COMMAND} ${COMMAND} ${INPUTS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${FLAGS}
      IAR Assembler for ARM > Command line pattern:
      ${SECURE_BUILD_COMMAND} ${COMMAND} "${InputFileRelPath}" ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${FLAGS}

    Please also verify that you have the SECURE_BUILD_COMMAND environment variable defined in the:
    Project > Properties > C/C++ Build > Environment
    SECURE_BUILD_COMMAND  = ${renesas.support.targetLoc:synergy-build}/isdebuild

    Best regards,
    anper

  • In reply to anper:

    I was able to fix all the build issues. Still haveing slow transfers on usbhost