Hi,
In our application we are using a specific section to copy/paste an independent piece of code, we build it with different '#include "*.c"' and then can hot swap pieces of the resulting binary. We reserved a section for that independent code's RAM and BSS and we followed the existing code for the Global Section Table in the linker file:
__bss_section_table = .;
LONG( ADDR(.bss));
LONG( SIZEOF(.bss));
LONG( ADDR(.bss_RAM2));
LONG( SIZEOF(.bss_RAM2));
LONG( ADDR(.bss_RAM_BLAH)); /* our BSS */
LONG( SIZEOF(.bss_RAM_BLAH)); /* our BSS */
LONG( ADDR(.bss_RAM3));
LONG( SIZEOF(.bss_RAM3));
__bss_section_table_end = .;
The issue we are facing is that when we want to compare the rest of the binary to check integrity the 'LONG( SIZEOF(.bss_RAM_BLAH));' variable has changed between different compilations so that it messes with our integrity check.
My question is: is it required to have that declaration in the Global Section Table? What's the purpose of it?
Thanks,
JP
Hi JPLopez
Thank you for posting your questions.
Please let us know your chip part number thus we can assign to right enginner for answering your questions.
Thanks
Jun Zhang
Of course, it's the i.MX RT1021. Thank you!
Hi @JPLopez ,
You can refer to section 18.13.1 of MCUXpresso_IDE_User_guide.pdf. I think the best way is not modify link file by yourself, but use IDE to generate link file.
If it's not enough to you, you can use Freemarker linker script. The flexspi_nor_polling_transfer is a good demo.
Regards,
Jing
Hi @JPLopez ,
Do you mean the binary code block can be copied to any address and call by function pointer?
Regards,
Jing