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.

TMS320F280025: TI SysConfig生成外设配置文件编译失败问题

Part Number: TMS320F280025
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* can.c
*
* Created on: 202356
* 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.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* can.h
*
* Created on: 202356
* 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.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//#############################################################################
//
// 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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

工程是28002x的例程,可以正常编译。使用sysconfig生成的CAN外设配置文件错误,编译器没有找到对应该的头文件。

  • 你好,请将完整错误日志发上来。

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    **** 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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 使用sysconfig生成的CAN外设配置文件错误

    你是添加了其他文件吗?

  • 我现在新建了一个新的工作区,并导入C2000WARE例程。编译通过后新建.syscfg文件,配置CAN外设后编译无法通过。我无法通过提示信息排除问题。

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    **** 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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    **** 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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 编译通过后新建.syscfg文件

    你是如何新建的?

  • 右键工程——NEW——file——文件名称设置为can.syscfg

  • 不推荐这样的方式来新建syscfg文件,因为确实会有很多问题。

    比较推荐导入一个带有syscfg文件的空工程,然后在其中修改代码。

  • 你好,请首先再工程properties中product添加sysconfig然后再新建syscfg文件,然后再进行配置。

    同时将该页面配置成下图:

    然后再工程中包含driverlib:

    这是编译应该就能成功了。

  • 编译过程依然找不到#include "inc/hw_memmap.h"。在CLB例程中,点击#include "inc/hw_memmap.h"会进入#hw_memmap.h"。即使把这些文件添加到工程也不起作用。

    问题应该是工程属性不同,可是我不知道要怎样配置。

  • 我们更希望新建一个独立的工程,而非从例程中修改。有链接到其他文件夹的工程不利于归档保存。

  • 有尝试过在工程properties中将#include "inc/hw_memmap.h"该文件路径添加到include路径中吗?

  • 我搜索了本地磁盘,没有找到"inc/hw_memmap.h"文件。只有"hw_memmap.h",该文件已经添加到工程,并且Include Options已添加该文件路径。

  • 只有"hw_memmap.h"

    是的,就是这个文件。inc 是它的上级文件夹名称。

    该文件已经添加到工程,并且Include Options已添加该文件路径。

    这就有点奇怪了。方便将工程发上来吗?