S7G2 Custom board Ethernet bootloader

Hi, I am trying to develop a secondary bootloader project which should do the following:

(Vaguely speaking)

  • Check for a flag in a QSPI based external flash memory
  • If the flag is set, it should reboot into the secondary bootloader mode
  • In secondary bootloader mode, it should be able to download/receive a firmware image and write it in internal flash
  • Jump to newly downloaded application image

I have read the post where one of the users needed a similar thing: Ethernet Flash bootloader. It was proposed to use a TFTP-based bootloader example (I guess made for SK-S7G2, I may be wrong!). The TFTP based example can be downloaded from the same post or here

The post quotes that "The TFTP bootloader example works only with single-slot images that start at 0x40000 (256k mark)".

I could see in the properties that the starting address of the first flash area is set to 0x040000, and the size of the first flash area is set to 0x3c0000.

I am working on a custom board based on R7FS7G27H3A01CFC. e2 studio version is 7.3.0, SSP version is 1.6.0 (Installed as a combined platform installer).

When I look into the e2 studio installation directory, I can see a lot of pack files for a about 4 versions that I have copied when I was trying to work with bootloader and downloader frameworks. It contains the following files that are relevant to flashloader framework:


I installed the SSP and e2 studio platform installer required to use the TFTP boot example (e2 version The intention was to to understand what TFTP boot example does. I replicated what was set in the bootloader framework. I discarded the DHCP client instance, assigned a fixed IP to start with and ensured that the TFTP client refers the same IP data structure.

Hereon, I faced 2 major problems:

  1. When I tried the same thing, the code didn't compile stating that it would overflow ID_CODES section. When I modified the size of ID_CODES (I know, that was a horrible step) to get the code compiled, and I accidentally flashed the code into the device, the controller locked up. I had it replaced with a brand new controller and deleted the project right away!
  2. When I read the flashloader guide, I could understand why the controller got locked and then modified the s7g2.ld files per my understanding of the setup the uart bootloader+downloader example does. I followed the same steps to generate BCH file from SREC file, no error is reported but I think there is an issue, because the BCH file is of 52 bytes whereas the SREC is 468 KB. This was tried with Flashloader V1.1.0. I then tried the latest Flashloader (V1.1.2) that I downloaded from Software Add-ons on renesas website. That didn't even generate the BCH file. I checked the path to python (2.7) executable is correct. If I stick to flashloader V1.1.0 does the starting address of the first flash area (0x040000) be inserted in Executable Address field in Flashloader (SREC to BCH conversion) GUI and the size of the first flash area (0x3c0000) be entered in Valid Flash size field? If yes, what are other values (Max block size = 1024 as per in the configuration file, Header location, Fill space, Valid Mask) ?


  1. Can anyone help me understand what issue SREC to BCH conversion has?
  2. Can anyone verify if I have installed what all is required to get the bootloader framework functional?