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.

[参考译文] CCS/DRA750:CPU 负载图为空

Guru**** 3040470 points

Other Parts Discussed in Thread: SYSBIOS

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/868684/ccs-dra750-cpu-load-graph-is-empty

器件型号:DRA750
Thread 中讨论的其他器件:SYSBIOS

工具/软件:Code Composer Studio

如果我像附件一样配置.cfg, 则在使用 CCS 和 XDS560v2STM 调试器进行检查时,CPU 负载图为空。

已安装 RTOS 和 UIA

xdctools_3_32_01_22_core

UIA_2_00_06_52

BIOS_6_46_05_55

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


    /*==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== *
    UART 样本的/* CFG 脚本*/
    /*==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== *

    /*配置对象模型的根*/
    VAR 计划= xdc.useModule('xdc.cfg.Program');
    var cfgArgs = Program.build.cfgArgs;
    var rb =(cfgArgs.profile ="发布"? true:false);

    /*移动 BIOS 以释放 Build。 这是为了缩短链接时间*/
    xdc.loadPackage ("ti.sysbios").profile="发布";

    /*使用模块*/
    VAR 任务= xdc.useModule('ti.sysbios.knl.Task');
    VAR 空闲= xdc.useModule('ti.sysbios.knl.Idle');
    VAR BIOS = xdc.useModule('ti.sysbios.BIOS');
    VAR 启动= xdc.useModule('xdc.runtime.Startup');
    VAR SysStd = xdc.useModule('ti.sysbios.smp.SysStd');
    VAR 断言= xdc.useModule('xdc.runtime.Assert');
    VAR Main = xdc.useModule('xdc.runtime.Main');
    VAR 内存= xdc.useModule('xdc.runtime.Memory');
    VAR 诊断= xdc.useModule('xdc.runtime.Diags');
    VAR 信标= xdc.useModule('ti.sysbios.knl.Semaphore');
    VAR HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    VAR HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
    VAR GIO = xdc.useModule('ti.sysbios.io.GIO');
    VAR 时钟= xdc.useModule('ti.sysbios.knl.Clock');
    VAR 时间戳= xdc.useModule('xdc.runtime.Timestamp');
    VAR Core = xdc.useModule('ti.sysbios.family.arm.ducati.Core');
    VAR HalCore = xdc.useModule('ti.sysbios.hal.Core');
    VAR Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    VAR SyncSem = xdc.useModule('ti.sysbios.syncs.SyncSem');
    VAR Cache = xdc.useModule('ti.sysbios.hal.unicache.Cache');
    VAR HalCache = xdc.useModule('ti.sysbios.hal.Cache');
    VAR GateDualCore = xdc.useModule('ti.sysbios.family.arm.ducati.GateSmp');
    VAR 邮箱= xdc.useModule('ti.sysbios.knl.Mailbox');
    VAR EDMA3LLDDRV = XDC.loadPackage ('ti.sdo.EDMA3.drv');
    VAR EDMA = XDC.loadPackage ("ti.sdo.EDMA3.drv.sample");
    VAR Load = xdc.useModule('ti.sysbios.utils.Load');
    VAR 计时器= xdc.useModule('ti.sysbios.hal.Timer');
    VAR DmTimer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
    VAR 默认值= xdc.useModule('xdc.runtime.Defaults');

    Semaphore.supportsEvents = true;

    var heap_size =@IPU1_heap@;

    /*将其与提供 dmTimers 的 SYS_CLK 频率相匹配。 *
    DmTimer.checkFrequency = false;//在 SMP 上检查不能正常工作,因此必须将其禁用
    DmTimer.intFreq.hi = 0;
    DmTimer.intFreq.lo = 19200000;

    var count_cpu_load = java.lang.System.getenv ("count_cpu_load");
    如果(COUNT_CPU_LOAD = 1)
    {
    xdc.print ("#!!! 当前构建包括计算 CPU 负载!!!" );
    idle.addFunc ('&idle_func1');
    }

    if (!rb)
    Defaults.common$.namedInstance = true;

    /*计算用于 Hwi 处理的时间的负载*/
    load.hwiEnabled = true;

    /*启用高速缓存*/
    cache.enableCache = true;


    /*无 RTS 堆*/
    program.heap = 0;
    program.argSize = 100;/*最小大小*/
    program.stack = 0x4000;

    /*使用适当的逻辑门来保护堆实例*/
    VAR gateParams = new GateDualCore.Params;
    VAR gateInstance = GateDualCore.create (gateParams);
    HeapMem.common$.gate = gateInstance;

    /*创建默认堆*/
    var heapMemParams = new HeapMem.Params();
    heapMemParams.size = heap_size;
    Memory.defaultHeapInstance = HeapMem.create (heapMemParams);
    Memory.defaultHeapSize = heap_size;

    /*配置系统模块*/
    VAR SysMin = xdc.useModule('ti.sysbios.smp.SysMin');
    SysMin。bufSize = 0x1000;
    SysMin。flushAtExit = false;

    /*通过 linkcmd.xdt 过滤生成的链接器命令,以便可以添加自定义段*/
    program.linkTemplate = java.lang.System.getenv ("os_path")+"/ipu1/linkcmd_ipu1.xdt";

    /*禁用 SMP BIOS */
    BIOS.smpEnabled = true;

    /* BIOS lib 指令插入*/
    BIOS.libType = BIOS.LibType_Custom;

    /*修复 M4的正确时钟*/
    bios.cpufreq.hi = 0;
    bios.cpufreq.lo = 21250000;//实际 CPU 时钟速率*/
    BIOS.logsEnabled = true
    /*如果程序是使用发行配置文件构建的,则“Remove (删除)”会被置为有效*/
    IF (RB)
    BIOS.sertsEnabled = false;

    /*将引用声明为 abort 包装函数*/
    VAR 系统= xdc.useModule('xdc.runtime.System');
    System.SupportProxy = SysMin;
    system.abortFxn ="服务器管理程序宏包装程序(&A);

    core.ipuId = 1;
    core.id = 0;
    /* CBE Original:这不做任何事情,而是设置我们不使用的 CurrentCore,从而摆脱空值*/
    如果(0)
    {
    if (CurrentCore ="m4video")
    {
    core.id = 1;
    GateDualCore.initGates = true;
    }
    }

    /*以微秒为单位的时钟节拍*/
    clock.tickPeriod = 1000;

    /*在 TSK 创建期间将 NULL 作为堆栈传递时的堆栈大小*/
    Task.defaultStackSize = 0x4000;
    Task.defaultAffinity = 0;

    /*段映射相对于默认值*/

    Program.sectMap[".plt"]="IPU1_PROG";

    /*如果程序是使用发行配置文件构建的,则“Remove (删除)”会被置为有效*/
    Defaults.common$.diags_INTERNAL =(rb? diags.always_off:diags.always_on);
    Defaults.common$.diags_ASSERT =(rb? diags.always_off:diags.always_on);


    /*在 BIOS 编译中压缩文件名*/
    VAR SourceDir = xdc.useModule('xdc.cfg.SourceDir');
    SourceDir.verbose = 1;

    /*为系统模块设置代理。 这将在中的运行时启用 print 语句
    *应用程序*/
    System.SupportProxy = SysStd;

    /* MMU 配置*/
    xdc.loadCapsule ("bspCommon_Ammu_Spartan_M4.cfg");

    VAR GIO = xdc.useModule('ti.sysbios.io.GIO');
    VAR 任务= xdc.useModule('ti.sysbios.knl.Task');
    VAR IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');

    /* UIA 日志记录模块*/
    /*如果使用 UIA,则必须禁用所有其他记录器实例*/
    如果(cfgArgs.profilingEnabled)
    {
    打印("---------------------------------------------------- ");
    print("UIA Profiling enabled");
    打印("---------------------------------------------------- ");

    VAR LoggerStreamer2 = xdc.useModule('ti.uia.sysbios.LoggerStreamer2');
    LoggerStream2.isTimestampEnabled = true;

    VAR loadLogger = LoggerStream2.create();

    loadLogger.instance.name ='OsalLoadLogger";
    loadLogger.bufSize = cfgArgs.profilingLogBufSize;
    loadLogger.primeFxn ='&profilingLoggerPrime';
    loadLogger.exchangeFxn ='profilingLoggerExchange';
    loadLogger.context = 0;

    program.global.loadLogger = loadLogger;
    program.global.load_logger_BUF_size = cfgArgs.profilingLogBufSize;

    VAR UIABenchmark = xdc.useModule('ti.uia.events.UIABenchmark');
    VAR LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');

    LoggingSetup.loadLogger = loadLogger;

    LoggingSetup.benchmarkLogging = false;
    LoggingSetup.countingAndGraphingLogging = true;
    LoggingSetup.enableContextAwareFunctionProfiler = true;
    LoggingSetup.enableTaskProfiler =真;
    LoggingSetup.loadHwiLogging = false;
    LoggingSetup.loadLoggerSize = cfgArgs.profilingLogBufSize;
    LoggingSetup.loadLogging =真;
    LoggingSetup.loadLoggingRuntimeControl = true;
    LoggingSetup.loadSwiLogging = false;
    LoggingSetup.loadTaskLogging =真;
    LoggingSetup.logerType = LoggingSetup.LoggerType_STOPMODE;
    LoggingSetup.mainLoggerSize = cfgArgs.profilingLogBufSize;
    LoggingSetup.mainLogging = true;
    LoggingSetup.mainLoggingRuntimeControl = true;
    LoggingSetup.maxEventSize = 128;
    LoggingSetup.multicoreEventCorr相关性= false;
    LoggingSetup.profileLogging = true;
    LoggingSetup.snapshotLogging = false;
    LoggingSetup.sysbiosHwiLogging = false;
    LoggingSetup.sysbiosHwiLoggingRuntimeControl = false;
    LoggingSetup.sysbiosLoggerSize = cfgArgs.profilingLogBufSize;
    LoggingSetup.sysbiosSemaphoreLogging = false;
    LoggingSetup.sysbiosSemaphoreLoggingRuntimeControl = false;
    LoggingSetup.sysbiosLogging = false;
    LoggingSetup.sysbiosLoggingRuntimeControl =错误;
    LoggingSetup.sysbiosTaskLogging = true;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;
    }

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

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

    您好!

    您能否查看此常见问题解答: https://e2e.ti.com/support/processors/f/791/t/850830。 这可能会有所帮助。

    此外、您不会显式设置 SYSBIOS 记录器(仅 LoggingSetup.loadLogger = loadLogger)。 您希望 SYSBIOS 使用哪个记录器?  

    此外、我在.cfg 中看到"BIOS.logsEnabled = true"。 这是无效语法。 它应该是"BIOS.logsEnabled = true;"

    Todd

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

    我可以获得日志记录,但 CPU 负载仍然为空。

    另外,Execution Graph 现在可以正常工作。

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

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

    您已将加载记录器设置为 LoggerStream2实例。 如果未明确设置,LoggingSetup 将为您创建 LoggerStopMode 实例。

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

    感谢您的帮助。 它现在可以在 LoggerStopMode、

    但是,您能否向我展示在目标运行时如何更新 CPU 负载。

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

    您好!

    我认为我们没有运行时记录器流的完整示例。  您能否了解一下 xdc.runtime.Log 模块?  

    谢谢、

    Alex