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.

issue with include file in TI assembler V20.2.5

Other Parts Discussed in Thread: MSP430FR6989

Hi all,

Some time ago I used TI assembler V4.4.6 to assemble some programs for MSP430FR6989.

Program consisted of ten ".include" files within a main.asm file (like main.asm template given by assembler project).
All .include files defined constants, variables and macros that other ".includes" files would reuse. it worked without problem.
Now with the TIV20.2.5 assembler, in CCS V10.2, this no longer works. :-(
to check it, just include in main.asm 2 files
.include "file1.asm"
.include "file2.asm. In file1.asm, define: foo .set 1 in file2.asm, define: bar .set foo. "build project" generates the following error: the following symbol are undefined in file2.asm: foo.
hope there is a way to fix this, otherwise the tool is just unusable ...
Thank you for your help

Claude
 
  • Hi Claude,

    It might caused by the assembler version. My suggestion is that rebuild your project in the newest assembler and CCS version.

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    It seems I'm using the last version of TI assembler & CCS.

    Checking update on CCS does nothing else.

    BR

    Claude

  • to be sure, I deleted and reinstalled, the last version of CCS et TI compiler, with the same result, infortunately.

    Claude

  • Hi All,

    I respond to myself ;-)

    Well, remembering that TI assembler was primarly made to compile code from C/C++ compiler, (it's not intended to be a standalone tool), when you .include file in your main.asm, don't forget to "exclude from build" them (right click on file & select exclude from build). This way, assembler don't assemble (as an object module) files included as it should do normally.

    BTW, a couple of week ago, I asked how to emulate the .ORG directive to move SPC at assembly time. It's useless. The key to understand that is inside  the file lnk_xxxx in your project directory. In this file, you find a MEMORY block which describe the physical memory structure of MCU. Next we have a SECTION block which describe how to linker recognize memory and define "namespaces". That should be enough to avoid gracefully .ORG. If not, you can create your own section using .usect directive, but don't forget to define it in SECTION block of lnk_xxxx file.

    Sorry for my poor english

    BR, Claude