(Nano-)Bootloader, Flashloader (<=SSP 1.3.0), Downloader, Secure Boot Manager (S5 only): Please advise what to choose for a S3A1 UART/USB field update?

We started in 2016 with S7 and S3 µC and developed our own boards, since that we are waiting for an easy to implement and maintainable bootloader/flashloader.

Every time in the last years when I've visited the Renesas booth on embedded world, they guys told me that an useable bootloader framework will be offered in the future.

Then finally when Renesas provides a bootloader/flashloader, Renesas - as far as I know - stopped the support with SSP 1.3.0., why?

May be I'm the only developer, who is confused which bootloader to choose now, ensuring support by Renesas also in future SSP versions.

So I'm not misunderstood, I have to say that I really appreciate SSP and also the support here in RenesasRulz, but regarding the subject bootloader I can't see a really clear and future-proof concept compared to other SSP modules.

E.g. ST provides CAN/Ethernet/USB/UART bootloader versions for their STM32 Cortex M series, why it is not possible to provide something similar for the Synergy family?

Background of this post is, that we actually have to plan a project for huge number of devices, installed all over the country in the next years, but being now unsure which solution we should choose.

What other piece of advice can you give us than to implement the bootloader itself?

Thank you very much and best regards

Ralph

  • Hi Ian,

    thank you for providing the scripts. When I compile your S3A1 sample the .._crc.srec file is generated via the "CRC_Script" , which is included in your project folder. I've searched over and over but I was unable to find where this script is invoked and where to configure that. In your script you use the "r_fl_mot_converter_modified.py" script in the pack I've got, there is only the "r_fl_mot_converter.py" script , is there any relevant difference?

    Thanks and best regards

    Ralph
  • Hi Ralph,

     

    The CRC version of the SREC file is created by an e2studio custom build phase. This can be found in the Builders section of the project's peroperties.

     

     

    This is only needed when using the debugger and the first build and not when using a free running version of the donloader and/or subsequent builds.

     

    Apologies for not included the newer Python file. Please find it attached. This was modified by another form user, Erik, and fixes an issue where a 4k section of flash can be mistaken for RAM and excluded from the output.

     

    Regards,

     

    Ian.

    r_fl_mot_converter_modified.zip

  • Hi Ian,

    thank you for providing the modified Python script! Actually I've got the problem, that your bootloader (S3A1) won't jump to my own downloader application (also S3A1), caused by different CRC values.
    But the image is correct located - for my opinion - because, when I change the the crc value in the debugger, so that the values are equal, the downloader is started correctly (leds are flashing) and also the breakpoints work correctly (symbols match with .._crc_srec file).

    I don't know what the reason could be, I compared everything with your project but I can't found any difference until now.
    The header valid mask, image version everything is correct, but the CRC value. I use the same batch and the same values from your CRC script.

    May be you have any idea?

    Thanks and best regards

    Ralph
  • Hi Ralph,

    In the crc_add.bat file on the call to srec_cat.exe (line 33) temporarily remove the "2> nul" from the end of the line. This will then allow the srec_cat.exe tool to output to the build console. If there is anything going wrong with this tool it will be displayed. You can ignore the warning about a hole in the area being checksummed as the hole is where the CRC is being placed.

    Regards,

    Ian.
  • If the ID code is included in the S-Record the CRC calculate by the tool will be over a different range from the CRC calculated by the bootloader, so the CRC will be different.
  • Thank you for your replies!

    Yes,  Jeremy you are right, after adding "NOLOAD" in the linker script to the ID code,  they weren't part of crc calculation any longer and crc values are equal now!

    I've compiled the flashloader projekt with Visual studio and replaced "r_fl_mot_converter.py" with "r_fl_mot_converter_modified.py".

    But nevertheless, if I wan't to convert the srec file into a bch file or if I want to connect to the S3A1 MCU nothing happens, no entry to the log window (only after saving the default options):

     

    So actually I'm still stucking in the flashloader app! I hope I'm not to annoying, but I'm very grateful for any support!

    Thanks and best regards

    Ralph

  • The python scripts need to be in the same directory as the executable. If I debug the GUI under VS I see :-

    If I leave the python scripts in their default location.

    If I then copy the scripts into the directory where the .exe is (while still debugging under VS):-

    The GUI runs as expected :-

     

    pyserial and modcrc need to be downloaded and installed in python as well.

  • Hi Jeremy,

    thank you very much for your very helpful reply!

    I've copied the files and installed pyserial and modcrc successfully, so far so good.

     

    But the visual studio output window shows the following syntax errors:

     The first one is shown when I press the convert button,  the 2nd one when I press the connect button. Do you have any idea what's going wrong?

     

    Thank you and best regards!

    Ralph

  • Which version of Python are you using? I see :-

    When I try to open an invalid s-record file. The flashloader documentation shows :-

     

    I am using python 2.7.16

  • Hi Jeremy,

    thanks again for your advice! I've installed Python V3.8, which is obviously not compatible with the actual provided flashloader scripts.
    But indeed with Python Version 2.7.16 it works so far (convert and connect), during the day I will also test the download function...

    Thank you and best regards

    Ralph