We have migrated our development from SDK 6.02 to SDK 8.02. However, when building our application from a Yocto build instead of building in my local machine I got compilation errors.
The problem is because of the name of functions McSPIMasterModeConfig and McSPIMasterModeEnable, that in pdk_am57xx_1_0_19 have been renamed to McSPIControllerModeConfig
and McSPIControllerModeEnable. Specifically, they are dfined at ~/ti/pdk_am57xx_1_0_19/packages/ti/csl/src/ip/mcspi/V0/mcspi.h while in SDK6 it was in ~/ti/pdk_am57xx_1_0_16/packages/ti/csl/src/ip/mcspi/V0/mcspi.h
The new naming is stated in the RTOS Migration Guide, so it is clear to me that we should go with the new names. When building locally, I set PDK_INSTALL_DIR ?= ${TI_RTOS_PATH}/pdk_am57xx_1_0_19 and it works, but when launching the build from Yocto the path is set by meta-ti, and the result file is build/tmp/sysroots-components/smc_8series/common-csl-ip-rtos/usr/share/ti/ti-pdk-tree/packages/ti/csl/src/ip/mcspi/V0/mcspi.h, which has the old names instead of the new ones.
This means that my code can only compile locally or remotely, but not both!
I have not been able to determine how to make meta-ti recipes to point to the proper PDK version. Our meta-ti points to tag 08.02.00.006, which is the same that the SDK 08.02 yocto build uses:
- ti-pdk-fetch points to git://git.ti.com/processor-sdk/pdk.git revision a1ace885998e9adbcbbd0abf8b9ded6ba9ec54ff
-
common-csl-ip.inc points to git://git.ti.com/keystone-rtos/common-csl-ip.git revision 027d26031709ad6a0e9f84625d11a3419e486467
It seems that the mcspi.h is grabbed from common-csl-ip.inc, but in none of the branches the src/ip/mcspi/V0/mcspi.h file has the new names.
So, the question can be asked in several ways:
- Why PDK differs when built from meta-ti or when downloaded from TI's SDK page?
- How can we make meta-ti match PDK sources to be the same?
- Where does shipped SDK grab the sources? I couldn't find the mcspi.h with the new names anywhere in the repos (likely I searched wrong)