The link file is already set up to located the config bytes at address 0x0400.
What I was trying to figure out was how to add the code to my software.
I finally figured it out.
Here's what I had to add:
unsigned int flashProtectionField[] __attribute__ ((section(".cfmconfig"))) = {
0x01020304,
0x05060708,
0xffffffff,
0xffbeffff
};
the first two lines can be anything as they are the passkey code values.
The last line is the most critical as it sets the protection level for flash memory.