I was able to fix this by changing .word_addressable from 1 to 0 in the QSPI configuration block. I am now able to write to QSPI FLASH using functions as well as to program QSPI FLASH using blhost and then execute in place (XIP). I am using __attribute__ ((used,section(".text_Flash2"))) to assign specific functions to be programmed into QSPI FLASH. This is confirmed by examining the build results showing memory usage, the .srec file, the .map file, and Saleae logic analyzer captures.
I am not able to program or debug QSPI FLASH and XIP from MCUXpresso using a JLink. I don't know if I have the right .cfx file for the Winbond FLASH, or if there is something else wrong. I would like to get this working in order to debug our application.
I have not been able to assign an entire .o file to .text_Flash2. I get many "multiple definition" errors. I suspect that the same .o file is getting placed in both .text and .text_Flash2. If I try to use EXCLUDE_FILE, I get syntax errors. I don't understand .ld syntax well enough to resolve this.
Any help you can give with any of these issues will be appreciated. Thanks.