Wanted to follow this up. I fixed my problem. It turned out not to be related at all to C/C++ linkage. I can reliably recreate the behavior by simply linking to a library that has the xip files instead of including them in the project directly. I still don't understand this because the files are identical, the projects have identical board.h files, the are both made from the exact same SDK, etcetera. If anyone can shed light on this I'd love to learn.
Resolution:
Ensure the main project (the one making the executable) is building the xip files, not linking to a library containing them
Setup information:
Eval board MIMXRT1060-EVK (SCH-313357 Rev.A2)
MCUXpresso IDE v10.3.1 [Build 2233] [2019-02-20]
SDK_2.x_EVK-MIMXRT1060 version 2.5.1
XIP_DEVICE driver version 2.0.0.
J-Link PLUS debugger
Steps to reproduce:
Click on Import SDK example(s)...
Select evkmimxrt1060, click Next
Import a simple project ( I used the "iled_blinky" demo)
Add a basic C static library to the project (see steps below if needed)
Exclude the xip folder from the build (Right click on project, Resource Configurations, Exclude from Build...)
Now build and load the program to the board, it will not boot. If you suspend the debugger you will find the PC in the bootrom address range.
Steps to add a basic library (if needed):
Create a C static library for the same board:
Click New project...
Leave everything to default except change to C Static Library
Click Finish
Build the library
Add the library to the evkmimxrt1060_iled_blinky project:
Properties>Paths and Symbols>Libraries, click Add..., enter library name (default for me was MIMXRT1062xxxxA_Project)
Properties>Paths and Symbols>Library Paths, click Add..., click Workspace..., select the folder containing the .a file (in my case this was /MIMXRT1062xxxxA_Project/Debug). It will only be there after you build.