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.

[参考译文] CC1314R10:SysConfig 复制了宏 CONFIG_TI_DRIVERS_ADCBUF_COUNT 的定义

Guru**** 2473260 points
Other Parts Discussed in Thread: CC1314R10, SYSCONFIG, SYSBIOS

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1394644/cc1314r10-duplicate-definition-of-macro-config_ti_drivers_adcbuf_count-by-sysconfig

器件型号:CC1314R10
Thread 中讨论的其他器件: SysConfigSysBIOS

工具与软件:

您好!

我们目前正在使用 CC1314R10进行新的开发、目前正在使用 SysConfig 和 TI-RTOS7设置项目。

但是、使用 ADCBuf 驱动程序会导致生成无效配置。 CONFIG_TI_DRIVERS_ADCBUF_COUNT 为 ti_drivers_config.h 文件中的 ADCBuf 部分以及 ADCBuf 通道生成宏。  

我们使用的是当前 SDK simplelink_cc13xx_cc26xx_sdk_7_41_00_17。

使用 adcbuf 连续示例并增加 ADCBuf 通道可重现此问题。

摘录自 ti_drivers_config.h

/*
 *  ======== ADCBuf ========
 */

extern const uint_least8_t                  CONFIG_ADCBUF_0_CONST;
#define CONFIG_ADCBUF_0                     0
#define CONFIG_TI_DRIVERS_ADCBUF_COUNT      1

/*
 * ======== ADCBuf Channels ========
 */

/* DIO24 */
extern const uint_least8_t                  CONFIG_ADCBUF_0_CHANNEL_0_CONST;
#define CONFIG_ADCBUF_0_CHANNEL_0           0
/* DIO23 */
extern const uint_least8_t                  ADCBUF_CHANNEL_0_CONST;
#define ADCBUF_CHANNEL_0                    1
#define CONFIG_TI_DRIVERS_ADCBUF_COUNT      2

修改后的 SysConfig 文件:

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --board "/ti/boards/LP_EM_CC1314R10" --rtos "tirtos7" --product "simplelink_cc13xx_cc26xx_sdk@7.41.00.17"
 * @versions {"tool":"1.18.1+3343"}
 */

/**
 * Import the modules used in this configuration.
 */
const Display     = scripting.addModule("/ti/display/Display");
const Display1    = Display.addInstance();
const ADCBuf      = scripting.addModule("/ti/drivers/ADCBuf");
const ADCBuf1     = ADCBuf.addInstance();
const Settings    = scripting.addModule("/ti/posix/tirtos/Settings");
const BIOS        = scripting.addModule("/ti/sysbios/BIOS");
const Event       = scripting.addModule("/ti/sysbios/knl/Event");
const Idle        = scripting.addModule("/ti/sysbios/knl/Idle", {}, false);
const Idle2       = Idle.addInstance();
const Mailbox     = scripting.addModule("/ti/sysbios/knl/Mailbox");
const Error       = scripting.addModule("/ti/sysbios/runtime/Error");
const SysCallback = scripting.addModule("/ti/sysbios/runtime/SysCallback");
const Timestamp   = scripting.addModule("/ti/sysbios/runtime/Timestamp");

/**
 * Write custom configuration values to the imported modules.
 */
Display1.$name      = "CONFIG_Display_0";
Display1.$hardware  = system.deviceData.board.components.XDS110UART;
Display1.uart.$name = "CONFIG_UART2_0";

ADCBuf1.$name                = "CONFIG_ADCBUF_0";
ADCBuf1.channels             = 2;
ADCBuf1.timerInstance.$name  = "CONFIG_GPTIMER_0";
ADCBuf1.adcBufChannel0.$name = "CONFIG_ADCBUF_0_CHANNEL_0";
ADCBuf1.adcBufChannel1.$name = "ADCBUF_CHANNEL_0";

const CCFG              = scripting.addModule("/ti/devices/CCFG", {}, false);
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

BIOS.assertsEnabled = false;
BIOS.heapBaseAddr   = "__primary_heap_start__";
BIOS.heapEndAddr    = "__primary_heap_end__";

const Clock      = scripting.addModule("/ti/sysbios/knl/Clock", {}, false);
Clock.tickPeriod = 10;

const Timer = scripting.addModule("/ti/sysbios/family/arm/v8m/cc26x4/Timer", {}, false);

Idle2.$name   = "powerIdle";
Idle2.idleFxn = "Power_idleFunc";

const Semaphore            = scripting.addModule("/ti/sysbios/knl/Semaphore", {}, false);
Semaphore.supportsPriority = false;

const Swi         = scripting.addModule("/ti/sysbios/knl/Swi", {}, false);
Swi.numPriorities = 6;

const Task             = scripting.addModule("/ti/sysbios/knl/Task", {}, false);
Task.checkStackFlag    = false;
Task.defaultStackSize  = 512;
Task.idleTaskStackSize = 512;
Task.numPriorities     = 6;

Error.policy       = "Error_SPIN";
Error.printDetails = false;

const System           = scripting.addModule("/ti/sysbios/runtime/System", {}, false);
System.abortFxn        = "System_abortSpin";
System.exitFxn         = "System_exitSpin";
System.extendedFormats = "%f";
System.supportModule   = "SysCallback";

/**
 * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
 * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
 * re-solve from scratch.
 */
Display1.uart.uart.$suggestSolution                = "UART0";
Display1.uart.uart.txPin.$suggestSolution          = "boosterpack.4";
Display1.uart.uart.rxPin.$suggestSolution          = "boosterpack.3";
ADCBuf1.adc.$suggestSolution                       = "ADC0";
ADCBuf1.adc.dmaADCChannel.$suggestSolution         = "DMA_CH7";
ADCBuf1.timerInstance.timer.$suggestSolution       = "GPTM0";
ADCBuf1.adcBufChannel0.adc.$suggestSolution        = "ADC0";
ADCBuf1.adcBufChannel0.adc.adcPin.$suggestSolution = "boosterpack.6";
ADCBuf1.adcBufChannel1.adc.$suggestSolution        = "ADC0";
ADCBuf1.adcBufChannel1.adc.adcPin.$suggestSolution = "boosterpack.2";
Timer.rtc.$suggestSolution                         = "RTC0";

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Pascal:

    感谢您发送编修。

    我将为此提交一个错误票证。 同时、我会建议禁用 SysConfig 生成 ti_drivers_config 文件并手动进行更正。

    谢谢、

    Marie H.