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.

[参考译文] MSPM0G3507:通过 GCC 编译器记录到 CIO 控制台的调试日志

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1613840/mspm0g3507-debug-log-to-cio-console-with-gcc-compiler

器件型号: MSPM0G3507

您好、

如果有一个空示例(工程)可以使用 printf...将调试文本写入 CIO 控制台、我将不胜感激。

我在向导和 TI 编译器中的空工程中试用了该软件。 是有效的。

但是、`-heap_size=512`等尝试(如各种线程中所述)没有任何帮助。 GCC 必须提供哪些参数才能将输出发送给 CIO?

CCS 20.4.0.13  

感谢您的支持!

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

    您是否尝试增加了堆栈大小?

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

    如果我尝试更改堆栈或堆大小、我在构建时遇到错误。

    将 heap_size=0x400 添加到 GNU 链接器命令:

    [26]Construction target:“empty_compilergc.out"</s>“
    [27]Killing:GNU Linker
    [28]“C:/ti/gcc_arm_none_eabi_9_2_1/bin/arm-none-eabi-gcc-9.2.1.exe /ti/mspm0_sdk_2_09_00_01/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x /Users/.../empty_compilerGCC “@“device.opt"-O2“-O2 -ffunction-sections -Fdata-sections -g -gdwarf-3 -gstrict-dwarf -wall -mthum-mfloat-abi=soft -wl /ti/mspm0_sdk_2_09_00_01/source、-map /.../empty_compilerGCC/Debug/syscfg、“、\“ empty_compilergc.map\“/ti/gcc_arm_none_eabi_9_2_1/arm-none-eabi/lib/thumb/v6-m/nofp
    [29]arm-none-eabi-gcc-9.2.1.exe:错误:无法识别的命令行选项'--heap_size=0x400'


    将 STACK_size=0x400 添加到 GNU 链接器命令:

    调用:GNU 链接器
    [28]“C:/ti/gcc_arm_none_eabi_9_2_1/bin/arm-none-eabi-gcc-9.2.1.exe /ti/mspm0_sdk_2_09_00_01/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x /Users/.../empty_compilerGCC “@“device.opt"-O2“-O2 -ffunction-sections -Fdata-sections -g -gdwarf-3 -gstrict-dwarf -wall -mthum-mfloat-abi=soft -wl /ti/mspm0_sdk_2_09_00_01/source、-map /Users/.../empty_compilerGCC/Debug/syscfg、“、\“ empty_compilergc.map\“/ti/gcc_arm_none_eabi_9_2_1/arm-none-eabi/lib/thumb/v6-m/nofp
    [29]arm-none-eabi-gcc-9.2.1.exe:错误:无法识别的命令行选项'--stack_size=0x400'

    #include "ti_msp_dl_config.h"
    #include <stdio.h>
    
    int main(void)
    {
        SYSCFG_DL_init();
        fflush(stdout);
        printf("Hello world\n");
        fflush(stdout);
        while (1) {
        }
    }

    在工程设置中、没有要编辑的特殊栈或堆大小输入字段(例如,使用 TI 编译器...)。

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

    抱歉、我不熟悉 gcc。

    是否确实需要 printf()? 你可以通过一些更轻的东西像 puts () 吗?

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

    不间断电源... 我可以恢复已解决状态吗?

    使用 puts() 是相同的问题。

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

    您可以在此处发帖请求撤消“已解决“:

     站点支持论坛 

    除了这一点,我真的不知道 gcc,所以其他人将不得不蜂鸣。

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

    也许 CCS 通过 GCC 编译器不支持 CIO。 我错过了 链接器说明中的.cio 部分和变量 CIOBUF。 我如何实施这项功能、以便通过 CIO 内存分配来构建它... ?