This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello there,
We are trying to build our elf(.out) file using IAR tool chain and then we are converting that file to RPRC format.
This conversion was working fine as expected until we tried to add a post build operation to fill the empty sections in our binary image, using the utility tool of IAR(ielftool).
Before this fill operation, RPRC was generating 2 sections(1.separate section for IRAM, 2.separate section for DRAM), but after the fill operation RPRC is generating only 1 section(Combining both IRAM and DRAM).
And due to this, Bootloader is trying to load this single sections to IRAM region, but fails as the size of the section from RPRC is more than the allowed range of IRAM(0x30000).
How elf2rprc.js is creating different sections?
Is it possible to create a 2 sections, one for IRAM with fixed size i.e 0x30000 and other section with remaining data for DRAM?
I have attached the elf dump and RPRC files. left side is "without fill" and right side is "with fill"
Hello,
Are you anywhere using xipGen tool in your build steps? If possible, please share the build logs (without -s in the make) to have a full picture of your build steps.
Thanks!
Yes we are using xipGen in our build steps and attached zip contains both "with Fill" and "withoutFill" log files. Let me know if you need further information.xipGen_Tool_Log.zip
Hello,
Yes we are using xipGen in our build steps
This explains the reason for the issue.
Could you please skip anything related to the XIP in your build steps and try generating the image?
Regards,
Prashant
Hello Prashant,
I skipped the XIP step in my build. This is resolving my issue. But could you explain a bit more about the possible root cause of this issue. I dont have any XIP sections in the code, all sections are non-XIP and I am just trying to fill the empty sections with 0x00.
Hello,
The issue is because of the XIP generator tool design.
The build procedure is the following:
At the end of the 2nd step, everything works as expected. However, at third step, the XIP generator tool splits and generates the RPRCs with the design that any consecutive sections will be merged together to one section. This means, when you are filling the empty area with 0x0s, the XIP generator tool sees the IRAM and DRAM as consecutive sections and merge them into one ultimately leading to the issue.
So, the solution is to just skip the third step in the build steps which is not a concern since you are not using XIP sections.
Regards,
Prashant