Craig,
Thanks for this, I am (slowly) starting to understand how the pieces fit together, I think.
It explains why adding that XIP_EXTERNAL_FLASH symbol "fixed" my example code.
Having these different methods of initializing SDRAM adds to my confusion.
So to clarify, in the hopes it helps someone else:
1. When targeting a project to run from RAM (not xip), it could run from DTC RAM (on-chip), but you can change this to use SDRAM.
In this case, the SDRAM must be initialized so that the debugger can load and execute the project from SDRAM.
This is done by using the 1050RT_SDRAM_Init.scp as the connect script for the debugger. It uses a "basic-like" scripting language to configure the semc.
2. When using xip to execute a project from flash, SDRAM is not needed, but *is* initialized (for some reason?) This is done by configuring the project to use xip: adding the xip sdk components, adjusting the linker, adding flash memory definition and setting the XIP_EXTERNAL_FLASH symbol. The SDRAM configuration is performed by the flash bootloader using an array defined in fsl_flexspi_nor_boot.c
3. When "generically" using SDRAM (maybe not using xip or executing the project from SDRAM through a debugger), the fsl_semc driver can be used to configure the semc in the project, as shown in the semc driver example. This uses the MCUXpresso API functions (as documented in the *pdf* supplied with the SDK, not the web API docs!)