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.

[参考译文] CC1310:Simplelink SDK 与较旧的 TI-RTOS 闪存效率对比

Guru**** 2539500 points
Other Parts Discussed in Thread: HDC2010, CC1310, SYSCONFIG, CC1312R

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/992845/cc1310-simplelink-sdk-versus-older-ti-rtos-flash-memory-efficiency

器件型号:CC1310
主题中讨论的其他部件:HDC2010SysConfigCC1312R

您好!

我们正在基于 CC1310F32RSMR 和 HDC2010开发低于1GHz 的传感器应用  

我们最初将 TI 项目 TIDA00488-TIDA00758作为代码开发的起点、因为它在应用中与我们的需求非常相似、具有  专用于 HDC 线路传感器的基本关断、无线电 Tx 和 I2C 处理程序。

这是使用 TI-RTOS v2.14.1-20、XDS 工具 v3.31.1.33和编译器 v5.2.5开发的、我们已经安装并成功构建了这些工具-闪存消耗了19.5k -这太棒了!

但是、我们担心这是在较旧的平台上构建的、据我所知、TI 不再支持该平台。

因此、我们尝试使用 Simplelink SDK v4.10.101和编译器 v18.12.7.LTS 重写非常类似的代码。

为此、我们从"pinStandby_CC1310_LAUNCHXL_tirtos_ccs"示例开始、并从"rfPacketTx_CC1310_LAUNCHXL_tirtos_ccs"示例移植到无线电处理程序代码中。

其原因是、pinStandby 不支持 POSIX 、使其变得更轻、甚至比"空项目"更小-闪 存仅16k、无无线电-这很好。

但是、由于无线电工作、未 实施 I2C 或传感器特定应用代码 -闪存消耗 已超过25.5k - 这是巨大的!

旧版 RTOS /编译器和新 SDK 之间的代码效率差异是否会很大?

或者、Simplelink SDK 是否默认启用其他需要禁用的外设和功能?

提前感谢。

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

    我使用旧的 TI-RTOS 版本测试了 rfPacketTX 示例、并将其与最新的 SDK 版本进行了比较。

    与 TI-RTOS 版本相比、SDK 版本使用的闪存增加了4k、SRAM 增加了3k。

    我认为这是由于实现差异、而不是因为 SDK 中添加了不必要的外设代码。 我将 SDK 版本与 CC1312R 上的相同示例进行了比较、其中您具有 SysConfig、只为您使用的外设添加外设代码、并且闪存使用量也相等。

    不幸的是,我未能弄清楚执行上的差异造成这种情况的原因。

    BR

    Siri

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

    你(们)好、Siri

    感谢您花时间运行这些测试。 非常感谢。

    鉴于您的调查结果与我们自己的调查结果相当相似、哪一项可以排除用户错误、此处的建议是什么?

    在成本关键型应用中、从32k 闪存升级到64k 可能是可行和不可行项目之间的区别-是否建议回滚到基于 TIRTOS 的旧项目?

    如果是、您建议使用哪种旧版本?

    感谢你的帮助。

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

    我已经详细介绍了这一点、并注意到 SDK 示例(至少一次)使用射频多模式驱动程序而不是单模驱动程序、因此将其更改为单模(如果不需要多模模式)将为您节省大约1k 的闪存。

    您还可以浏览.cfg 文件并比较这两个版本、以查看是否有任何可以帮助您减少闪存使用的内容。

    在最新 SDK 中、射频补丁通常更大、因为补丁中可能已经执行了错误修复等。

    我强烈建议您使用我们最新的 SDK、而不是旧的 TI-RTOS 版本。

    BR

    Siri

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

    你(们)好、Siri

    谢谢..并且完全理解您关于坚持使用最新 SDK 的建议。

    为了做到这一点、我们研究了修改.cfg、但必须承认、没有取得太多进展。

    虽然项目目录中没有.cfg、但我相信内核会使用该路径上的共享文件?

    C:\ti\simplelink_cc13x0_sdk_4_10_02_04\kernel\tirtos\builds\CC1310_LAUNCHXL\release

    假设我们仅需要 I2C、RF (现在保持多模式)、我们可以在其中禁用 SPI、UART、NVS 等

    我已附上文件内容以供参考

    此外、如果您可以向我们提供有关使用 TI .cfg 的应用手册、我们将不胜感激。

    谢谢

    /*
     * Copyright (c) 2015-2017, Texas Instruments Incorporated
     * 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.
     */
    
    
    
    /* ================ Boot configuration ================ */
    var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
    /*
     * This module contains family specific Boot APIs and configuration settings.
     * See the SYS/BIOS API guide for more information.
     */
    
    
    
    /* ================ Clock configuration ================ */
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    /*
     * When using Power and calibrateRCOSC is set to true, this should be set to 10.
     * The timer used by the Clock module supports TickMode_DYNAMIC. This enables us
     * to set the tick period to 10 us without generating the overhead of additional
     * interrupts.
     *
     * Note: The calibrateRCOSC parameter is set within the Power configuration
     *     structure in the "Board.c" file.
     */
    Clock.tickPeriod = 10;
    
    
    
    /* ================ Defaults (module) configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    /*
     * A flag to allow module names to be loaded on the target. Module name
     * strings are placed in the .const section for debugging purposes.
     *
     * Pick one:
     *  - true (default)
     *      Setting this parameter to true will include name strings in the .const
     *      section so that Errors and Asserts are easier to debug.
     *  - false
     *      Setting this parameter to false will reduce footprint in the .const
     *      section. As a result, Error and Assert messages will contain an
     *      "unknown module" prefix instead of the actual module name.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Defaults.common$.namedModule = true;
    Defaults.common$.namedModule = false;
    
    
    
    /* ================ Error configuration ================ */
    var Error = xdc.useModule('xdc.runtime.Error');
    /*
     * This function is called to handle all raised errors, but unlike
     * Error.raiseHook, this function is responsible for completely handling the
     * error with an appropriately initialized Error_Block.
     *
     * Pick one:
     *  - Error.policyDefault (default)
     *      Calls Error.raiseHook with an initialized Error_Block structure and logs
     *      the error using the module's logger.
     *  - Error.policySpin
     *      Simple alternative that traps on a while(1) loop for minimized target
     *      footprint.
     *      Using Error.policySpin, the Error.raiseHook will NOT called.
     *  - Error.policyMin
     *      Lightweight policy function that does minimum processing and returns.
     */
    //Error.policyFxn = Error.policyDefault;
    //Error.policyFxn = Error.policySpin;
    Error.policyFxn = Error.policyMin;
    
    /*
     * If Error.policyFxn is set to Error.policyDefault, this function is called
     * whenever an error is raised by the Error module.
     *
     * Pick one:
     *  - Error.print (default)
     *      Errors are formatted and output via System_printf() for easier
     *      debugging.
     *  - null
     *      Errors are not formatted or logged. This option reduces code footprint.
     *  - non-null function
     *      Errors invoke custom user function. See the Error module documentation
     *      for more details.
     */
    //Error.raiseHook = Error.print;
    Error.raiseHook = null;
    //Error.raiseHook = "&myErrorFxn";
    
    /*
     * If Error.policyFxn is set to Error.policyDefault, this option applies to the
     * maximum number of times the Error.raiseHook function can be recursively
     * invoked. This option limits the possibility of an infinite recursion that
     * could lead to a stack overflow.
     * The default value is 16.
     */
    Error.maxDepth = 2;
    
    
    
    /* ================ Hwi configuration ================ */
    var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
    /*
     * Checks for Hwi (system) stack overruns while in the Idle loop.
     *
     * Pick one:
     *  - true (default)
     *      Checks the top word for system stack overflows during the idle loop and
     *      raises an Error if one is detected.
     *  - false
     *      Disabling the runtime check improves runtime performance and yields a
     *      reduced flash footprint.
     */
    //halHwi.checkStackFlag = true;
    halHwi.checkStackFlag = false;
    
    /*
     * The following options alter the system's behavior when a hardware exception
     * is detected.
     *
     * Pick one:
     *  - Hwi.enableException = true
     *      This option causes the default m3Hwi.excHandlerFunc function to fully
     *      decode an exception and dump the registers to the system console.
     *      This option raises errors in the Error module and displays the
     *      exception in ROV.
     *  - Hwi.enableException = false
     *      This option reduces code footprint by not decoding or printing the
     *      exception to the system console.
     *      It however still raises errors in the Error module and displays the
     *      exception in ROV.
     *  - Hwi.excHandlerFunc = null
     *      This is the most aggressive option for code footprint savings; but it
     *      can difficult to debug exceptions. It reduces flash footprint by
     *      plugging in a default while(1) trap when exception occur. This option
     *      does not raise an error with the Error module.
     */
    //m3Hwi.enableException = true;
    //m3Hwi.enableException = false;
    m3Hwi.excHandlerFunc = null;
    
    /*
     * Enable hardware exception generation when dividing by zero.
     *
     * Pick one:
     *  - 0 (default)
     *      Disables hardware exceptions when dividing by zero
     *  - 1
     *      Enables hardware exceptions when dividing by zero
     */
    m3Hwi.nvicCCR.DIV_0_TRP = 0;
    //m3Hwi.nvicCCR.DIV_0_TRP = 1;
    
    
    
    /* ================ Idle configuration ================ */
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    /*
     * The Idle module is used to specify a list of functions to be called when no
     * other tasks are running in the system.
     *
     * Functions added here will be run continuously within the idle task.
     *
     * Function signature:
     *     Void func(Void);
     */
    //Idle.addFunc("&myIdleFunc");
    
    Idle.addFunc('&Power_idleFunc');  /* add the Power module's idle function */
    
    
    
    /* ================ Kernel (SYS/BIOS) configuration ================ */
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    /*
     * Enable asserts in the BIOS library.
     *
     * Pick one:
     *  - true (default)
     *      Enables asserts for debugging purposes.
     *  - false
     *      Disables asserts for a reduced code footprint and better performance.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //BIOS.assertsEnabled = true;
    BIOS.assertsEnabled = false;
    
    /*
     * A flag to determine if xdc.runtime sources are to be included in a custom
     * built BIOS library.
     *
     * Pick one:
     *  - false (default)
     *      The pre-built xdc.runtime library is provided by the respective target
     *      used to build the application.
     *  - true
     *      xdc.runtime library sources are to be included in the custom BIOS
     *      library. This option yields the most efficient library in both code
     *      footprint and runtime performance.
     */
    //BIOS.includeXdcRuntime = false;
    BIOS.includeXdcRuntime = true;
    
    /*
     * The SYS/BIOS runtime is provided in the form of a library that is linked
     * with the application. Several forms of this library are provided with the
     * SYS/BIOS product.
     *
     * Pick one:
     *   - BIOS.LibType_Custom
     *      Custom built library that is highly optimized for code footprint and
     *      runtime performance.
     *   - BIOS.LibType_Debug
     *      Custom built library that is non-optimized that can be used to
     *      single-step through APIs with a debugger.
     *
     */
    BIOS.libType = BIOS.LibType_Custom;
    //BIOS.libType = BIOS.LibType_Debug;
    
    /*
     * Runtime instance creation enable flag.
     *
     * Pick one:
     *   - true (default)
     *      Allows Mod_create() and Mod_delete() to be called at runtime which
     *      requires a default heap for dynamic memory allocation.
     *   - false
     *      Reduces code footprint by disallowing Mod_create() and Mod_delete() to
     *      be called at runtime. Object instances are constructed via
     *      Mod_construct() and destructed via Mod_destruct().
     *
     *  When using BIOS in ROM:
     *      This option must be set to true.
     */
    BIOS.runtimeCreatesEnabled = true;
    //BIOS.runtimeCreatesEnabled = false;
    
    /*
     * Enable logs in the BIOS library.
     *
     * Pick one:
     *  - true (default)
     *      Enables logs for debugging purposes.
     *  - false
     *      Disables logging for reduced code footprint and improved runtime
     *      performance.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //BIOS.logsEnabled = true;
    BIOS.logsEnabled = false;
    
    
    
    /* ================ Memory configuration ================ */
    var Memory = xdc.useModule('xdc.runtime.Memory');
    /*
     * The Memory module itself simply provides a common interface for any
     * variety of system and application specific memory management policies
     * implemented by the IHeap modules(Ex. HeapMem, HeapBuf).
     */
    
    /*
     * Use HeapMem primary heap instance to use linker-defined memory region
     * Add HeapTrack on top to find over-writes, invalid frees, and
     * aid in finding the correct sizing of the heap and memory leaks.
     */
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    HeapMem.primaryHeapBaseAddr = "&__primary_heap_start__";
    HeapMem.primaryHeapEndAddr = "&__primary_heap_end__";
    
    var heapMemParams = new HeapMem.Params();
    heapMemParams.usePrimaryHeap = true;
    
    //var HeapTrack = xdc.useModule('ti.sysbios.heaps.HeapTrack');
    //var heapTrackParams = new HeapTrack.Params;
    //heapTrackParams.heap = HeapMem.create(heapMemParams);
    //Program.global.heap0 = HeapTrack.create(heapTrackParams);
    Program.global.heap0 = HeapMem.create(heapMemParams);
    
    Memory.defaultHeapInstance = Program.global.heap0;
    
    
    
    /* ================ Program configuration ================ */
    /*
     *  Program.stack must be set to 0 to allow the setting
     *  of the system stack size to be determined in the example's
     *  linker command file.
     */
    Program.stack = 0;
    
    
    /*
     * Uncomment to enable Semihosting for GNU targets to print to the CCS console.
     * Please read the following TIRTOS Wiki page for more information on Semihosting:
     * processors.wiki.ti.com/.../TI-RTOS_Examples_SemiHosting
     */
    
    if (Program.build.target.$name.match(/gnu/)) {
        //var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
    }
    /* ================ ROM configuration ================ */
    /*
     * To use BIOS in flash, comment out the code block below.
     */
    var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    ROM.romName = ROM.CC1350;
    
    
    
    /* ================ Semaphore configuration ================ */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    /*
     * Enables global support for Task priority pend queuing.
     *
     * Pick one:
     *  - true (default)
     *      This allows pending tasks to be serviced based on their task priority.
     *  - false
     *      Pending tasks are services based on first in, first out basis.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsPriority = true;
    Semaphore.supportsPriority = false;
    
    /*
     * Allows for the implicit posting of events through the semaphore,
     * disable for additional code saving.
     *
     * Pick one:
     *  - true
     *      This allows the Semaphore module to post semaphores and events
     *      simultaneously.
     *  - false (default)
     *      Events must be explicitly posted to unblock tasks.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsEvents = true;
    Semaphore.supportsEvents = false;
    
    
    
    /* ================ Swi configuration ================ */
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    /*
     * A software interrupt is an object that encapsulates a function to be
     * executed and a priority. Software interrupts are prioritized, preempt tasks
     * and are preempted by hardware interrupt service routines.
     *
     * This module is included to allow Swi's in a users' application.
     */
    /*
     * Reduce the number of swi priorities from the default of 16.
     * Decreasing the number of swi priorities yields memory savings.
     */
    Swi.numPriorities = 6;
    
    
    
    /* ================ System configuration ================ */
    var System = xdc.useModule('xdc.runtime.System');
    /*
     * The Abort handler is called when the system exits abnormally.
     *
     * Pick one:
     *  - System.abortStd (default)
     *      Call the ANSI C Standard 'abort()' to terminate the application.
     *  - System.abortSpin
     *      A lightweight abort function that loops indefinitely in a while(1) trap
     *      function.
     *  - A custom abort handler
     *      A user-defined function. See the System module documentation for
     *      details.
     */
    //System.abortFxn = System.abortStd;
    System.abortFxn = System.abortSpin;
    //System.abortFxn = "&myAbortSystem";
    
    /*
     * The Exit handler is called when the system exits normally.
     *
     * Pick one:
     *  - System.exitStd (default)
     *      Call the ANSI C Standard 'exit()' to terminate the application.
     *  - System.exitSpin
     *      A lightweight exit function that loops indefinitely in a while(1) trap
     *      function.
     *  - A custom exit function
     *      A user-defined function. See the System module documentation for
     *      details.
     */
    //System.exitFxn = System.exitStd;
    System.exitFxn = System.exitSpin;
    //System.exitFxn = "&myExitSystem";
    
    /*
     * Minimize exit handler array in the System module. The System module includes
     * an array of functions that are registered with System_atexit() which is
     * called by System_exit(). The default value is 8.
     */
    System.maxAtexitHandlers = 2;
    
    /*
     * Enable System_printf() to display floats.  Use the longer '%f%$L%$S%$F'
     * if your code has SYS/BIOS instrumentation enabled (Asserts/Error/Log),
     * as is typical with the 'debug' profile.
     */
    //System.extendedFormats = '%f%$L%$S%$F';
    System.extendedFormats = '%f%$S';
    
    /*
     * The System.SupportProxy defines a low-level implementation of System
     * functions such as System_printf(), System_flush(), etc.
     *
     * Pick one pair:
     *  - SysMin
     *      This module maintains an internal configurable circular buffer that
     *      stores the output until System_flush() is called.
     *      The size of the circular buffer is set via SysMin.bufSize.
     *  - SysCallback
     *      SysCallback allows for user-defined implementations for System APIs.
     *      The SysCallback support proxy has a smaller code footprint and can be
     *      used to supply custom System_printf services.
     *      The default SysCallback functions point to stub functions. See the
     *      SysCallback module's documentation.
     */
    //var SysMin = xdc.useModule('xdc.runtime.SysMin');
    //SysMin.bufSize = 128;
    //System.SupportProxy = SysMin;
    var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
    System.SupportProxy = SysCallback;
    //SysCallback.abortFxn = "&myUserAbort";
    //SysCallback.exitFxn  = "&myUserExit";
    //SysCallback.flushFxn = "&myUserFlush";
    //SysCallback.putchFxn = "&myUserPutch";
    //SysCallback.readyFxn = "&myUserReady";
    
    
    
    /* ================ Task configuration ================ */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    /*
     * Check task stacks for overflow conditions.
     *
     * Pick one:
     *  - true (default)
     *      Enables runtime checks for task stack overflow conditions during
     *      context switching ("from" and "to")
     *  - false
     *      Disables runtime checks for task stack overflow conditions.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Task.checkStackFlag = true;
    Task.checkStackFlag = false;
    
    /*
     * Set the default task stack size when creating tasks.
     *
     * The default is dependent on the device being used. Reducing the default stack
     * size yields greater memory savings.
     */
    Task.defaultStackSize = 512;
    
    /*
     * Enables the idle task.
     *
     * Pick one:
     *  - true (default)
     *      Creates a task with priority of 0 which calls idle hook functions. This
     *      option must be set to true to gain power savings provided by the Power
     *      module.
     *  - false
     *      No idle task is created. This option consumes less memory as no
     *      additional default task stack is needed.
     *      To gain power savings by the Power module without having the idle task,
     *      add Idle.run as the Task.allBlockedFunc.
     */
    Task.enableIdleTask = true;
    //Task.enableIdleTask = false;
    //Task.allBlockedFunc = Idle.run;
    
    /*
     * If Task.enableIdleTask is set to true, this option sets the idle task's
     * stack size.
     *
     * Reducing the idle stack size yields greater memory savings.
     */
    Task.idleTaskStackSize = 512;
    
    /*
     * Reduce the number of task priorities.
     * The default is 16.
     * Decreasing the number of task priorities yield memory savings.
     */
    Task.numPriorities = 6;
    
    
    
    /* ================ Text configuration ================ */
    var Text = xdc.useModule('xdc.runtime.Text');
    /*
     * These strings are placed in the .const section. Setting this parameter to
     * false will save space in the .const section. Error, Assert and Log messages
     * will print raw ids and args instead of a formatted message.
     *
     * Pick one:
     *  - true (default)
     *      This option loads test string into the .const for easier debugging.
     *  - false
     *      This option reduces the .const footprint.
     */
    //Text.isLoaded = true;
    Text.isLoaded = false;
    
    
    
    /* ================ Types configuration ================ */
    var Types = xdc.useModule('xdc.runtime.Types');
    /*
     * This module defines basic constants and types used throughout the
     * xdc.runtime package.
     */
    
    
    
    /* ================ Application Specific Instances ================ */
    
    /* ================ Diagnostics configuration ================ */
    //var Diags = xdc.useModule('xdc.runtime.Diags');
    /*
     * You use the Diags module to set and clear bits in a module's diagnostics
     * mask for the purpose of controlling diagnostics within that module. A
     * module diagnostics mask controls both Assert and Log statements
     * within that module, disabling these statements yields
     * code savings.
     */
    
    /* ================ Logging configuration ================ */
    //var Log = xdc.useModule('xdc.runtime.Log');
    /*
     * Modules and the application code generate Log_Event events by calling
     * the Log module's functions.
     * Disabling all Log statements here will allow the optimizer to completely
     * remove all Log code from the application.
     *
     * Note: In order to generate Log events in your application both the Diags
     *       and the Log mask must be set. See the SYS/BIOS API guide for
     *       more information.
     */
    
    /*
     * LoggingSetup configures TI-RTOS modules to capture user-specified information
     * such as CPU Load, Task Load and Task Execution so that it can be
     * displayed by System Analyzer.
     */
    //var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    //LoggingSetup.loadLoggerSize = 256;
    //LoggingSetup.mainLoggerSize = 512;
    //LoggingSetup.sysbiosLoggerSize = 1024;
    
    /* ================ Main configuration ================ */
    var Main = xdc.useModule('xdc.runtime.Main');
    /*  Configuration of this Main module is used for all code not in a module */
    
    
    
    /* ================ POSIX configuration ================ */
    var Settings = xdc.useModule('ti.posix.tirtos.Settings');
    
    if (Program.build.target.$name.match(/iar/)) {
        /* 
         * For the IAR target, the 'ti.posix.tirtos.Settings' uses the
         * MultithreadSupport module. By default, the MultithreadSupport module
         * use the '--threaded_lib' library which provides a separate 'errno'
         * per thread and makes other rts libraries reentrant. This library has
         * a larger footprint which can be a problem for some apps, so we
         * override the default and disable it here.
         */
        var MultithreadSupport = 
            xdc.useModule('ti.sysbios.rts.iar.MultithreadSupport');
        MultithreadSupport.enableMultithreadSupport = false;
    }
    
    
    /* ================ Event configuration ================ */
    var Event = xdc.useModule('ti.sysbios.knl.Event');
    
    
    
    /* ================ Mailbox configuration ================ */
    var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');
    

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

    您将在此处找到有关如何从 TI-RTOS 移植到 SDK 的指南:

    https://dev.ti.com/tirex/explore/content/simplelink_cc13x0_sdk_4_10_01_01/docs/proprietary-rf/proprietary-rf-users-guide/proprietary-rf-guide/ti_rtos_to_device_sdk.html

    但是,我强烈建议您从最新 SDK 中的空示例开始,然后尝试将应用程序“移动”到空示例。

    以下指南将为您提供有关 SDK 构建方式的一些信息:

    https://dev.ti.com/tirex/explore/content/simplelink_cc13x0_sdk_4_10_01_01/docs/simplelink_mcu_sdk/Users_Guide.html

    如果从空示例开始、您将看到不同的驱动程序在闪存大小中增加了多少。 在包含所需的驱动程序并对其进行初始化之前、闪存使用量不会增加。

    BR

    Siri

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

    你(们)好、Siri

    谢谢。

    但该配置文件来自 SDK 工程、而不是移植的 RTOS 工程。

    如初始消息中所述、我们在最新的 SDK 驱动程序示例中开始了关断项目。因此、请充分了解不同项目的闪存使用情况。

    我们试图理解的是如何按照您的建议使用此.cfg 文件来保存闪存。

    我们减少了优先级、允许的任务等数量、但未对重建闪存大小进行更改。

    此致

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

    我对这个进行了更多的研究、通过更改.cfg 似乎很难减小闪存大小。 我测试了一些东西,但似乎如果您使用的是 release.cfg,它几乎针对小尺寸进行了优化:-()

    例如、如果启用日志以进行调试等、您可以轻松地看到闪存大小增加。在.cfg 中、但减小闪存大小似乎要困难得多。

    BR

    Siri