This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
/* * can.c * * Created on: 2023年5月6日 * Author: Administrator */ /* * Copyright (c) 2020 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "can.h" void Board_init() { EALLOW; PinMux_init(); CAN_init(); EDIS; } void PinMux_init() { // // CANA -> myCAN0 Pinmux // GPIO_setPinConfig(GPIO_12_CANA_RX); GPIO_setPinConfig(GPIO_13_CANA_TX); } void CAN_init(){ //myCAN0 initialization CAN_initModule(myCAN0_BASE); // Refer to the Driver Library User Guide for information on how to set // tighter timing control. Additionally, consult the device data sheet // for more information about the CAN module clocking. // CAN_setBitTiming(myCAN0_BASE, 7, 0, 15, 7, 3); // Enable CAN Interrupts CAN_enableInterrupt(myCAN0_BASE, CAN_INT_IE0); CAN_enableGlobalInterrupt(myCAN0_BASE, CAN_GLOBAL_INT_CANINT0); // Initialize the transmit message object used for sending CAN messages. // Message Object Parameters: // Message Object ID Number: 1 // Message Identifier: 100 // Message Frame: CAN_MSG_FRAME_EXT // Message Type: CAN_MSG_OBJ_TYPE_RX // Message ID Mask: 0 // Message Object Flags: // Message Data Length: 0 Bytes // CAN_setupMessageObject(myCAN0_BASE, 1, myCAN0_MessageObj1_ID, CAN_MSG_FRAME_EXT,CAN_MSG_OBJ_TYPE_RX, 0, 0,0); // Initialize the transmit message object used for sending CAN messages. // Message Object Parameters: // Message Object ID Number: 2 // Message Identifier: 200 // Message Frame: CAN_MSG_FRAME_EXT // Message Type: CAN_MSG_OBJ_TYPE_TX // Message ID Mask: 0 // Message Object Flags: // Message Data Length: 0 Bytes // CAN_setupMessageObject(myCAN0_BASE, 2, myCAN0_MessageObj2_ID, CAN_MSG_FRAME_EXT,CAN_MSG_OBJ_TYPE_TX, 0, 0,0); CAN_setInterruptMux(myCAN0_BASE, 0); // // Start CAN module operations // CAN_startModule(myCAN0_BASE); }
/* * can.h * * Created on: 2023年5月6日 * Author: Administrator */ /* * Copyright (c) 2020 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef CAN_H #define CAN_H // // Included Files // #include "driverlib.h" #include "device.h" #define GPIO_PIN_CANA_RX 12 #define GPIO_PIN_CANA_TX 13 #define myCAN0_BASE CANA_BASE #define myCAN0_MessageObj1_ID 100 #define myCAN0_MessageObj2_ID 200 void Board_init(); void CAN_init(); void PinMux_init(); #endif // end of BOARD_H definition
//############################################################################# // // FILE: driverlib.h // // TITLE: Device setup for examples. // //############################################################################# // // // $Copyright: // Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the // distribution. // // Neither the name of Texas Instruments Incorporated nor the names of // its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // $ //############################################################################# #ifndef DRIVERLIB_H #define DRIVERLIB_H #include "inc/hw_memmap.h" #include "adc.h" #include "asysctl.h" #include "bgcrc.h" #include "can.h" #include "clb.h" #include "cmpss.h" #include "cpu.h" #include "cputimer.h" #include "dcc.h" #include "dcsm.h" #include "debug.h" #include "dma.h" #include "ecap.h" #include "epwm.h" #include "eqep.h" #include "erad.h" #include "flash.h" #include "fsi.h" #include "gpio.h" #include "hrcap.h" #include "hrpwm.h" #include "i2c.h" #include "interrupt.h" #include "lin.h" #include "memcfg.h" #include "pin_map.h" #include "pmbus.h" #include "sci.h" #include "spi.h" #include "sysctl.h" #include "version.h" #include "xbar.h" #include "driver_inclusive_terminology_mapping.h" #endif // end of DRIVERLIB_H definition
工程是28002x的例程,可以正常编译。使用sysconfig生成的CAN外设配置文件错误,编译器没有找到对应该的头文件。
**** Build of configuration CPU1_RAM for project adc_ex1_soc_epwm **** "C:\\ti\\ccs1020\\ccs\\utils\\bin\\gmake" -k -j 8 all -O Building file: "../can.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f28002x/headers/include" --include_path="E:/pz dsp/DSP01/28335_DEMO/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --advice:performance=all --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="can.d_raw" --include_path="E:/pz dsp/DSP01/28335_DEMO/adc_ex1_soc_epwm/CPU1_RAM/syscfg" "../can.c" >> Compilation failure subdir_rules.mk:9: recipe for target 'can.obj' failed "../can.c", line 58: warning #225-D: function "GPIO_setPinConfig" declared implicitly "../can.c", line 58: error #20: identifier "GPIO_12_CANA_RX" is undefined "../can.c", line 59: error #20: identifier "GPIO_13_CANA_TX" is undefined "../can.c", line 66: warning #225-D: function "CAN_initModule" declared implicitly "../can.c", line 66: error #20: identifier "CANA_BASE" is undefined "../can.c", line 72: warning #225-D: function "CAN_setBitTiming" declared implicitly "../can.c", line 75: warning #225-D: function "CAN_enableInterrupt" declared implicitly "../can.c", line 75: error #20: identifier "CAN_INT_IE0" is undefined "../can.c", line 77: warning #225-D: function "CAN_enableGlobalInterrupt" declared implicitly "../can.c", line 77: error #20: identifier "CAN_GLOBAL_INT_CANINT0" is undefined "../can.c", line 89: warning #225-D: function "CAN_setupMessageObject" declared implicitly "../can.c", line 89: error #20: identifier "CAN_MSG_FRAME_EXT" is undefined "../can.c", line 89: error #20: identifier "CAN_MSG_OBJ_TYPE_RX" is undefined "../can.c", line 101: error #20: identifier "CAN_MSG_OBJ_TYPE_TX" is undefined "../can.c", line 102: warning #225-D: function "CAN_setInterruptMux" declared implicitly "../can.c", line 106: warning #225-D: function "CAN_startModule" declared implicitly 8 errors detected in the compilation of "../can.c". gmake: *** [can.obj] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
我现在新建了一个新的工作区,并导入C2000WARE例程。编译通过后新建.syscfg文件,配置CAN外设后编译无法通过。我无法通过提示信息排除问题。
**** Build of configuration CPU1_RAM for project adc_ex1_soc_epwm **** "C:\\ti\\ccs1020\\ccs\\utils\\bin\\gmake" -k -j 8 all -O Building file: "../can.syscfg" Invoking: SysConfig "C:/ti/sysconfig_1.16.1/sysconfig_cli.bat" -o "syscfg" "../can.syscfg" Usage: cli [-o <dir>] [-s <file>] [-u <string>] [-b <name>] [-d <name>] [-p <name>] [-r <name>] [--treatWarningsAsErrors] [--quiet -q] <script> cli --help cli --version example: cli -s meta_data/sdk.json -d MSP432P401R scripts/two_uarts.js example: -s sdk.json -d MSP432P401R -o ./display_cfg sdk/cfgs/display.syscfg Note that the all arguments other than '--help' and '--version' may also be specified via the script with an embedded @cliArgs comment directive. E.g. // @cliArgs -d MSP432P401R If an argument is embedded in a script and explicitly specified via the CLI then precedence is given to the CLI arguments. Additionally, specifying "--board" or "--device" on the CLI will override any "--board" and "--device" arguments specified in the script. subdir_rules.mk:16: recipe for target 'build-1338379343' failed Missing argument: --board or --device must be specified gmake: *** [build-1338379343] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
**** Build of configuration CPU1_RAM for project adc_ex1_soc_epwm **** "C:\\ti\\ccs1020\\ccs\\utils\\bin\\gmake" -k -j 8 all -O Building file: "../f28002x_codestartbranch.asm" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_codestartbranch.d_raw" "../f28002x_codestartbranch.asm" Finished building: "../f28002x_codestartbranch.asm" Building file: "../f28002x_cputimers.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_cputimers.d_raw" "../f28002x_cputimers.c" Finished building: "../f28002x_cputimers.c" Building file: "../f28002x_adc.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_adc.d_raw" "../f28002x_adc.c" Finished building: "../f28002x_adc.c" Building file: "../f28002x_defaultisr.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_defaultisr.d_raw" "../f28002x_defaultisr.c" Finished building: "../f28002x_defaultisr.c" Building file: "../f28002x_epwm.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_epwm.d_raw" "../f28002x_epwm.c" Finished building: "../f28002x_epwm.c" Building file: "../f28002x_piectrl.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_piectrl.d_raw" "../f28002x_piectrl.c" Finished building: "../f28002x_piectrl.c" Building file: "../adc_ex1_soc_epwm.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="adc_ex1_soc_epwm.d_raw" "../adc_ex1_soc_epwm.c" Finished building: "../adc_ex1_soc_epwm.c" Building file: "../f28002x_dma.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_dma.d_raw" "../f28002x_dma.c" Finished building: "../f28002x_dma.c" Building file: "../f28002x_usdelay.asm" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_usdelay.d_raw" "../f28002x_usdelay.asm" Finished building: "../f28002x_usdelay.asm" Building file: "../f28002x_pievect.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_pievect.d_raw" "../f28002x_pievect.c" Finished building: "../f28002x_pievect.c" Building file: "../f28002x_tempsensorconv.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_tempsensorconv.d_raw" "../f28002x_tempsensorconv.c" "../f28002x_tempsensorconv.c", line 103 (col. 48): advice #2614-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division. Finished building: "../f28002x_tempsensorconv.c" Building file: "../f28002x_gpio.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_gpio.d_raw" "../f28002x_gpio.c" Finished building: "../f28002x_gpio.c" Building file: "../f28002x_sysctrl.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_sysctrl.d_raw" "../f28002x_sysctrl.c" "../f28002x_sysctrl.c", line 800 (col. 33): advice #2614-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division. Finished building: "../f28002x_sysctrl.c" Building file: "../f28002x_globalvariabledefs.c" Invoking: C2000 Compiler "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/adc_ex1_soc_epwm" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/device_support/f28002x/headers/include" --include_path="C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="f28002x_globalvariabledefs.d_raw" "../f28002x_globalvariabledefs.c" Finished building: "../f28002x_globalvariabledefs.c" Building target: "adc_ex1_soc_epwm.out" Invoking: C2000 Linker "C:/ti/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"adc_ex1_soc_epwm.map" --heap_size=0x100 --stack_size=0x200 --warn_sections -i"C:/ti/ti-cgt-c2000_22.6.0.LTS/lib" -i"C:/ti/ti-cgt-c2000_22.6.0.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="adc_ex1_soc_epwm_linkInfo.xml" --entry_point=code_start --rom_model -o "adc_ex1_soc_epwm.out" "./adc_ex1_soc_epwm.obj" "./f28002x_adc.obj" "./f28002x_codestartbranch.obj" "./f28002x_cputimers.obj" "./f28002x_defaultisr.obj" "./f28002x_dma.obj" "./f28002x_epwm.obj" "./f28002x_globalvariabledefs.obj" "./f28002x_gpio.obj" "./f28002x_piectrl.obj" "./f28002x_pievect.obj" "./f28002x_sysctrl.obj" "./f28002x_tempsensorconv.obj" "./f28002x_usdelay.obj" "../28002x_generic_ram_lnk.cmd" "../f28002x_headers_nonbios.cmd" -llibc.a <Linking> Finished building target: "adc_ex1_soc_epwm.out" **** Build Finished ****
你好,请首先再工程properties中product添加sysconfig然后再新建syscfg文件,然后再进行配置。
同时将该页面配置成下图:
然后再工程中包含driverlib:
这是编译应该就能成功了。
编译过程依然找不到#include "inc/hw_memmap.h"。在CLB例程中,点击#include "inc/hw_memmap.h"会进入#hw_memmap.h"。即使把这些文件添加到工程也不起作用。
问题应该是工程属性不同,可是我不知道要怎样配置。
我搜索了本地磁盘,没有找到"inc/hw_memmap.h"文件。只有"hw_memmap.h",该文件已经添加到工程,并且Include Options已添加该文件路径。
只有"hw_memmap.h"
是的,就是这个文件。inc 是它的上级文件夹名称。
该文件已经添加到工程,并且Include Options已添加该文件路径。
这就有点奇怪了。方便将工程发上来吗?