E2 studios how to check the file size of the output file?

Hey I came across this unusual problem while trying to debug using the R5F51101 microcontroller.

My initial project was build for the R5F51105 microcontroller and it was consuming around 75 kb of space on the Rom, I was able to determine this my checking the ".text" size given in the .map file or the ".text" size in the Memory usage tab in the section tab.

I am unsure about memory usage because the RAM/ROM usage tab shows an error message stating some sections have invalid addresses.

Now my code compiles, builds and runs on the R5F51105 microcontroller without a hitch and I am also able to flash the generated output file in my case a ".mot" file using the Renesas flash programmer V2.03.

Now in my trials to reduce the code size, I mistakenly used the R5F51101 microcontroller which is a 32Kb ROM device and was successfully able to put the device into debug and run it, however the code size was still somewhere around 60kb.

The device settings in the e2 studio properties and debug properties were set to R5F51105(128KB) on this run, surprisingly everything worked as usual,

Now out of curiosity, I tried to flash the generated mot file to the lower memory device and It successfully flashed and worked.

This has been confusing me for quite some time now, I hope you can give some insight into what I am doing wrong or not understanding.

Thanks

  • Hello, sebi.

    > debug properties were set to R5F51105(128KB) on this run, surprisingly everything worked as usual,
    Did you use simulator or emulator?
    If emulator successfully flashed, then the device actually have bigger ROM. Otherwise verification will fail at flashing.

    Do you use GCC(GNURX) or CC-RX?
    GCC believe linker script and don't know how much memory is actually available (CC-RX could check about internal memory).
    Therefore GCC may not warn even you used too much memory.

  • I debugged it on hardware,
    if I change the project settings to R5F1101 and put it into debug after running it the program goes into an undefined exception.
    I used the GNURX.
    Thanks.