Hi All,
I have a long used project based on GCC compiler(GNU Tools ARM Embedded 4.9 2015q3) directly. (No use the CCS IDE and Arm® code generation tools – compiler )
Recently, I start to consider the security issue, so the Flash unreadable protection operation is added.
After I configure the specified Flash to "Execute Only", then using the JTag to upload it, the value of the specified range is "0".
I think the protection is work!
But the chip will crash when the program execute the protected range.
I refer the below document to test the flash protection feature based on CCS 10.
https://www.ti.com/lit/an/spma044a/spma044a.pdf
It works normal and the chip not crash when execute the protected range.
I think the different of them is that I skip the step of adjusting compiler parameter in first project.
Then I recover the "Specify whether constants can be embedded in the code section (--embedded_constants)" to On in the CCS test project.
The chip also crash when executing the protected flash.
I read the description, and I realize this step is necessary.
After I search the "--embedded_constants", all document are based on "Arm® code generation tools – compiler"
I try to adjust the configuration refer the GCC compiler manual, but it no success.
gcc.gnu.org/.../Option-Summary.html
Could anyone know how to configure the GCC compiler to implement the "--embedded_constants" feature in the "Arm® code generation tools – compiler"?
Best regards.