S7 Bootloader question

Hi,

I am working on this basic bootloader application: renesasrulz.com/.../3223 and I am trying to upload the "S7SK_HMI_MMF" project. In this case, I have to copy on a USB stick the two binaries: flash.bin and qspi_flash.bin. My question is: what are they referred to? Is the first related to the executable and the second to the GUIX resources?

In particular, I would like to try to load my own GUIX HMI project application using the bootloader: how can I generate the two .bin files to copy on the USB stick? I saw there is a .bat file that should do the work, but it seems it doesn't work. Any help?

Thanks,

regards.

  • Hi Laser,

    As you may see in S7SK_HMI_MMF\src\gui\TimeAndTemp_resources.c, there are definitions with __attribute__ ((section(".qspi_flash"))) - all these resource will be placed in the QSPI Flash memory. I think you're right: the flash.bin is related to the exectuable and the qspi_flash.bin to the GUIX resources, in this case.

    I tested this batch file and it created flash.bin and qspi_flash.bin, I opened a console, changed directory to the S7SK_HMI_MMF and run the script:
    C:\PATH_TO_PROJECT\BootLoader\S7SK_BLv2.3\S7SK_HMI_MMF>bootloader_flash_qspi.bat Debug\S7SK_HMI_MMF.srec

    Do you see any errors?

    Regards,
    adboc
  • Hi adboc,
    yes, now I successful create the two .bin files by the execution of the batch file.
    I took a HMI SK-S7G2 example file and, as described in the notes,:


    -  I added the pre-build command (AddSectionAttribute.py) in the project property (the .py script that add the "__attribute__ ((section(".qspi_flash")))" to the resources)
    -  I replaced the S7G2.ld file from the bootloader example with the original one present in my project (this step should addresses correctly the application)
    -  I run the batch file and copy the two generated .bin on a USB stick

    The bootloader on the S7 seems to perform the updating (the onboard LEDs should blink as expected), but at the end , when I reset the board, I cannot see anything on the LCD!

    Perhaps are there any other steps ore configurations to do to the original project?
    In order to place the GUIX resources onto the QSPI, is sufficient to perform the first step described above?

  • Hi Laser,

    I succesfully run the bootloader with S7SK_HMI_MMF application. Please note that erasing and programming QSPI takes a long time, as the document suggests. When I run the application it took about one minute. Are you sure that these operations are completed? Is the green LED blinking? The board should reset automatically when the USB device is ejected.

    If you've made any modifications to S7SK_HMI_MMF, maybe try with the prebuilt flash.bin and qspi_flash.bin first.

    Adding a section attribute should be sufficient to place GUIX resources onto the QSPI.

    Regards,
    adboc
  • Hi adboc,
    the prebuilt flash.bin and qspi_flash.bin are loaded successfully by the bootloader.
    I tryied the following:
    I took the S7SK_HMI_MMF application, and I added a Text Button in the first screen. I generated the flash.bin and qspi_flash.bin and copied them onto a USB stick. When the bootloader has finished to load the new application (green LED blinking), I can see the original appication on the LCD, the newly added button appears but without its text inside.
    Then, I added a second button to the same screen. Now, when I load the flash.bin and qspi_flash.bin in the board with the boot loader, I cannot see anything on the LCD now!
    What is happening?
    1) In the first case, why the string doesn't appear?
    2) In the second case: why adding a button (or prompt or whatelse) to that GUIX project the screen becomes blank?
    Thank you!
  • Hello Laser,

    Have you verified that the command specified in pre-build steps runs successfully? If python script was provided with invalid path for resources, it will fail to add the necessary attribute and GUIX resources will be linked into code flash on the device instead. You can verify that by searching for "0x60000000" in the .map file to check if there are any references to symbols at that address.

    Regards
  • Hi,

    the python script seems to refer to the correct path. By the way, I can't understand why the resource file is called twice:

    C:\Python27\python.exe ${workspace_loc}/${ProjName}/AddSectionAttribute.py ${workspace_loc}/${ProjName}/src/gui/TimeAndTemp_resources.c ${workspace_loc}/${ProjName}/src/gui/TimeAndTemp_resources.c

    Perhaps are there any other resources to call when I modify the GUIX project?

    Is that script called automatically at every build or I have to run it explicitly?

    Looking for "0x60000000" in the .map file gives the following:

    Memory Configuration

    Name             Origin             Length             Attributes
    FLASH            0x02000000         0x00400000         xr
    RAM              0x1ffe0000         0x000a0000         xrw
    DATA_FLASH       0x40100000         0x00010000         xr
    QSPI_FLASH       0x60000000         0x04000000         xr
    SDRAM            0x90000000         0x02000000         xrw
    *default*        0x00000000         0xffffffff

    [...]

    .qspi_retentive
                    0x60000000        0x0
                    0x60000000                __qspi_retentive_start__ = .
     *(.qspi_retentive*)
                    0x60000000                __qspi_retentive_end__ = .
                    0x00000000                __qspi_retentive_size__ = (__qspi_retentive_end__ - __qspi_retentive_start__)

    .qspi_flash     0x60000000    0xc7eb0
                    0x60000000                __qspi_flash_start__ = .

    .qspi_flash     0x60000000    0xc7eb0
                    0x60000000                __qspi_flash_start__ = .
     *(.qspi_flash*)
     .qspi_flash    0x60000000    0xc7eb0 ./src/gui/TimeAndTemp_resources.o
                    0x60000000                display_1_theme_1_color_table
                    [...]
                    0x60000000                __qspi_region_start_address__ = __qspi_flash_start__
                    0x64000000                __qspi_region_end_address__ = (__qspi_flash_start__ + __qspi_region_max_size__)

    Could you see something wrong?

    I think it is only a probkem about visualization: in fact, the screen in blank, but the LED blinks correctly at every touch.

  • Hello Laser,

    Does your application use SPI with DTC to configure the display? By default DTC is automatically added to every SPI instance and in the standard project (linked into code flash) it works perfectly fine. When using MMF, address translation is performed only for the CPU access (that's why GUIX resources which are used by JPEG and D/AVE2D engines need to be placed in QSPI) - DTC tries to access MMF region directly when writing data through SPI that was originally placed in code flash (and is now linked to MMF). You'll need to remove DTC from SPI instance used for display config in order for your HMI application to work properly.

    Regards
  • Hello Karol,

    My project is generated from an import of the S7SK_HMI_MMF in the Bootloader folder from Renesas, so the configuration may be correct; in practise is exactly the same application, in which I only added a prompt text and a text button in the GUIX "main_window". The DTC seems to be not present, as shown in the following screenshot:

    Do you confirm that the pre build python command to give in the C/C++ Build properties must be the following? Is this the "TimeAndTemp_resources.c" the only resource file to add?

    C:\Python27\python.exe ${workspace_loc}/${ProjName}/AddSectionAttribute.py ${workspace_loc}/${ProjName}/src/gui/TimeAndTemp_resources.c ${workspace_loc}/${ProjName}/src/gui/TimeAndTemp_resources.c

     

    Thank you.

  • Hi Laser,

    Yes, this is the only file to add. Do you have Python 2.7 installed under C:\Python27? Please verify, that you're able to run C:\Python27\python.exe or change the path as needed. If you don't have it installed, the latest 2.7.x version for Windows is available at www.python.org/.../

    Regards,
    adboc
  • adboc,

    Yes, I have. Infact, the attributes seems they are added to the resource file:

    The problems seems to come out when I make some changes to the project (e.g. add a prompt to a window). When I do these changes, I guess the resources.c file would be updated. Does it make sense to verify in some way if the "updated resource" are correctly sent to QSPI?