Hi all,
We have an exiqting project which we compiled with MCUXpresso and now we want to migrate to a CMake build in order to do some CICD on our servers.
I've got everything compiling and linking, but the code fails when flashed to the board when doing flash operations, it seems to be related to flexspi_nor_flash operations and I have a suspicion that the XIP is not correctly configured.
These are our link options:
target_link_options(${EXECUTABLE} PRIVATE
-mcpu=cortex-m7
-mfpu=fpv5-d16
-mfloat-abi=hard
-mthumb
-nostdlib
-Wl,--undefined=FreeRTOSDebugConfig,-Map=${EXECUTABLE_OUTPUT_PATH}/${PROJECT_NAME}.map,--sort-section=alignment,--gc-sections
-Wl,--cref
-Xlinker -print-memory-usage -Xlinker
-v
-L "${CMAKE_SOURCE_DIR}/ld"
-T "${LINKER_FILE}"
)
With the ld folder containing the linker files as generated by MCUXpresso, and the linker file being project_name_Debug.ld.
FYI: We have extra linker script input sections configured in MCUXpresso using the project settings in the IDE, which generates the linkscripts folder. But as I understand it, these are used to generate the .ld files so this should not be the issue. (I can also see the sections in the ld file).
The reason I suspect I'm doing something wrong with XIP, is because I include the xip-directory & source files in the build, but I fail to see how they are used or referenced in the code or linker file.
Can someone clarify this for me?
Any ideas?
xip folder contains:
- fsl_flexspi_nor_boot.c & .h
- evkmimxrt1064_flexspi_nor_config.c & .h
Thanks in advance!