We are using the MKE18F512VLH16, and using startup code from MCUXpresso with FreeRTOS.
A while back, we had altered the initial FTFE_FOPT byte from 0x7D to 0x79 to disable the NMI pin at boot because we don't use it. On that particular board, we discovered that if that pin was pulled low at power up, it didn't boot properly. We redesigned it to make sure that pin wasn't pulled low, not fully understanding why it wouldn't boot properly.
On a new board, I forgot that little quirk, and didn't take that into consideration, so if the pin is pulled low, it doesn't boot. Looking into the FTFE_FOPT register, it appears that in the configuration it was using, pulling NMI low means "boot from ROM" and leaving it high means "boot from Flash"
What exactly is "boot from ROM" in a KE18? I found if I simply change the FOPT[7]:FOPT[1] to 01, it seems to boot fine regardless of what PTD3 is pulled to. If that's all it takes, that would save us from having to modify several boards.