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.

MSP430AFE221: Can't get "hello world" to link in Code Composer generated project

Part Number: MSP430AFE221

Hello,

I'm trying to get a "hello world" to work with Code composer v11 on Windows. I can't post in the code composer forum as it insists I put a "part number" in the field and then it only lets me post in the MSP forum so apologies if I'm asking my dumb question in the wrong forum!

I use Code composer to create a "hello world" and hit build. It then complains with errors in the linker cmd file. At the top of the file it says that this file is not used in the IDE which seems contradictory. It said to put some settings in the project properties which I did except for "-c LINK USING C CONVENTIONS" which I couldn't see in the project properties linking section.

Anyway, it's coming up with multiple errors like this:

<Linking>
"../lnk_msp430afe221.cmd", line 98: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment fails for section ".cio" size 0x120. Available memory ranges:
RAM size: 0x100 unused: 0x100 max hole: 0x100

Line 98 in the cmd file is

    .cio        : {} > RAM                  /* C I/O Buffer                      */


What should I do to get hello world compiling and linking?

Thanks

Peter

  • Hi Peter,

    "../lnk_msp430afe221.cmd", line 98: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment fails for section ".cio" size 0x120. Available memory ranges:
    RAM size: 0x100 unused: 0x100 max hole: 0x100

    It seems that your variable is out of range which makes the error. MSP430AEF221 only has 256 Bytes RAM for user application. Your "Hello world" code is larger than it.

    I will suggest you can refer to below example project to start with your requirements:

    https://dev.ti.com/tirex/explore/node?node=A__AGg08IsK1teDpFCzyd.Zfg__msp430ware__IOGqZri__LATEST&placeholder=true&search=MSP430AFE 

    B.R.

    Sal

  • Hello Sal,

    Thanks for your reply.

    I'd really like to get the most simple example working for some test automation that I'm doing for the compiler. I already have a more complicated example project compiling. I want something with just one source file and a simple set of commands to compile and link it. I tried dong them from scratch but I don't know what to put in these cmd files so I thought CCS would generate something usable.

    I've changed the hello world that CCS generated so that it doesn't even call printf or have any include files. Now I get about 5 less errors and just have one left. Ah - I had set the stack size too big in the IDE. Once I turned that down (to below 0x100),  I got no linking error.

    Thanks for the info - the fact that it was too large had not occurred to me.

    Cheers

    Peter

  • Generally, the first program for an MCU is a "blinky", a program to flash a led - toggle a GPIO*. TI should have an example program in Resource Explorer.

    No strings or stdio, so no large amount of RAM required.

  • Thanks - I will probably make use of that with the next compiler

**Attention** This is a public forum