Would it be possible to automatically direct all of the constants in a particular file to a section that is not .const?
In a particular file, I want the compiler put the constants into a new section called .const2 while still putting the constants in the rest of the project into .const as it normally does.
Please note, I want to do this without manually placing the constants in a struct/variable and placing them in a new location with pragma. This method is tedious, error-prone and can easily brick my boards when trying to upgrade in the field using a serial port with a legacy tool.
Any suggestions?