MSPM0G3507: debug log to CIO console with GCC compiler

Part Number: MSPM0G3507

Hi,

I would appreciate it if an empty example (project) were available to write debug text to the CIO console using printf...

I tried it with an empty project from the wizard and the TI compiler. That works.

However, attempts with `-heap_size=512` etc., as discussed in various threads, do not help. What parameters must be available to GCC for the output to be sent to the CIO?

CCS 20.4.0.13 

Thanks for any support!

  • Did you try to increase the stack size?

  • If I try to change the stack or heap size, I got an error at building.

    Adding heap_size=0x400 to the GNU linker command:

    [26]Building target: "empty_compilerGCC.out"
    [27]Invoking: GNU Linker
    [28]"C:/ti/gcc_arm_none_eabi_9_2_1/bin/arm-none-eabi-gcc-9.2.1.exe" @"device.opt" -O2 -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -mthumb -mfloat-abi=soft -Wl,-Map,",\"empty_compilerGCC.map\"" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/mspm0_sdk_2_09_00_01/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x" -L"C:/ti/mspm0_sdk_2_09_00_01/source" -L"C:/Users/.../empty_compilerGCC" -L"C:/.../empty_compilerGCC/Debug/syscfg" -L"C:/ti/gcc_arm_none_eabi_9_2_1/arm-none-eabi/lib/thumb/v6-m/nofp" -Wl, --heap_size=0x400 -march=armv6-m -mthumb --specs=nosys.specs -o"empty_compilerGCC.out" "./empty.o" "./ti_msp_dl_config.o" "./startup_mspm0g350x_gcc.o" -Wl,-T"./device_linker.lds" -Wl,-Tdevice.lds.genlibs -l:driverlib.a -lgcc -lc -lm
    [29]arm-none-eabi-gcc-9.2.1.exe: error: unrecognized command line option '--heap_size=0x400'


    Adding stack_size=0x400 to the GNU linker command:

    Invoking: GNU Linker
    [28]"C:/ti/gcc_arm_none_eabi_9_2_1/bin/arm-none-eabi-gcc-9.2.1.exe" @"device.opt" -O2 -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -mthumb -mfloat-abi=soft -Wl,-Map,",\"empty_compilerGCC.map\"" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/mspm0_sdk_2_09_00_01/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x" -L"C:/ti/mspm0_sdk_2_09_00_01/source" -L"C:/Users/.../empty_compilerGCC" -L"C:/Users/.../empty_compilerGCC/Debug/syscfg" -L"C:/ti/gcc_arm_none_eabi_9_2_1/arm-none-eabi/lib/thumb/v6-m/nofp" -Wl, --stack_size=0x400 -march=armv6-m -mthumb --specs=nosys.specs -o"empty_compilerGCC.out" "./empty.o" "./ti_msp_dl_config.o" "./startup_mspm0g350x_gcc.o" -Wl,-T"./device_linker.lds" -Wl,-Tdevice.lds.genlibs -l:driverlib.a -lgcc -lc -lm
    [29]arm-none-eabi-gcc-9.2.1.exe: error: unrecognized command line option '--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) {
        }
    }

    In the project settings, there isn't a special stack or heap size input field to edit (like using TI compiler...).