S32K3 工具篇6:如何将RTD EB工程导入到S32DS
- 1. MCAL_Plugins->Link Source Resource Filters
- 2. Includes
- 3. Preprocessor
- 4. Linker
- 5. optimization
- 6. main.c
这个主题实际上,之前已经有多人写过,并且写的很好,只是实际操作中,可能还会遇到些坑,所以本文不会详细的写文章步骤,但是会提供一个真实直接操作的视频流程,主要参考的文章来源链接:
https://www.wpgdadatong.com.cn/blog/detail/74936
方法非常有用,已经试过RTD4.0.0 MCAL现有代码,并且也导入到自己配置的MCAL代码,方法可靠有效。
平台:
SW32K3_S32M27x_RTD_R21-11_4.0.0
S32DS3.5
EB tresos Studio 29.0
S32K344-EVB
话不多说,直接上视频:
K344_MCAL_EBtoS32DS35_RTD400
主要步骤有如下几步:
STEP 1. S32DS工程新建
STEP 2. S32DS 工程配置
包括文件夹删减,增加,滤波条件添加,包含文件,链接文件,优化条件,宏定义等。
STEP 3.新建EB工程
配置,或者拿现有的RTD的配置拷贝过去,这样避免一些不必要的问题报错。
STEP 4.编译下载
下面给出相关的一些需要拷贝的文件:
1. MCAL_Plugins->Link Source Resource Filters
2. Includes
"${ProjDirPath}/Generate/include"
"${MCAL_PLUGIN_PATH}/Adc${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Ae${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/BaseNXP${MCAL_MODULE_NAME_SUFFIX}/header"
"${MCAL_PLUGIN_PATH}/BaseNXP${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Can_43_FLEXCAN${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/CanIf${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/CanTrcv_43_AE${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Crc${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/CryIf${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Crypto_43_HSE${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Csm${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Dem${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Det${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Dio${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Dpga${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/EcuM${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Eth_43_GMAC${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/EthIf${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/EthSwt${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/EthTrcv${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Fee${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Gdu${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Gpt${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/I2c${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/I2s${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Icu${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Lin_43_LPUART_FLEXIO${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/LinIf${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/LinTrcv_43_AE${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Mcl${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Mcu${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Mem_43_EEP${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Mem_43_EXFLS${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Mem_43_INFLS${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/MemAcc${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/MemIf${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Ocotp${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Ocu${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Os${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Platform${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Platform${MCAL_MODULE_NAME_SUFFIX}/startup/include"
"${MCAL_PLUGIN_PATH}/Port${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Pwm${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Rm${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Rte${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Sent${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Spi${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Uart${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Wdg${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/WdgIf${MCAL_MODULE_NAME_SUFFIX}/include"
"${MCAL_PLUGIN_PATH}/Zipwire${MCAL_MODULE_NAME_SUFFIX}/include"
3. Preprocessor
S32K3XX
S32K344
GCC
USE_SW_VECTOR_MODE
D_CACHE_ENABLE
I_CACHE_ENABLE
ENABLE_FPU
4. Linker
"${MCAL_PLUGIN_PATH}/Platform${MCAL_MODULE_NAME_SUFFIX}/build_files/gcc/linker_flash_s32k344.ld"
5. optimization
-fno-short-enums -funsigned-char -fomit-frame-pointer -fstack-usage
6. main.c
Comment:
#include "check_example.h
#Exit_Example(TRUE);