EQUates definitions doesn't became global

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

EQUates definitions doesn't became global

1,606 Views
55boy
Contributor I
This is my first experience with CodeWarrior. I am a Pemicro IDE user. I developed a target application with 56F8014VFAE. I am programming only in Assembler. At this moment I configured all the project including the LCF and I write several *.asm initialization files. I successfully run a little program to verify hardware communication (USB TAP) and target behavior.
When I begun to write the application programms I define some constants using the EQU directive in one *.asm file outside any section definition. These constants are working fine inside this file and even inside each defined section in this file, but don't work in other *.asm files that use the same constant. I think I do as indicated in the "DSP56800x Embedded Systems Assembler Manual" observing the linking order but doesn't work. The OPT CONST doesn't work or I don't know the appropiate use. I resolve the problem using mulptiple definitions in each file but it seems messy to me. I will appreciate any advise. Thanks.
Labels (1)
Tags (1)
0 Kudos
2 Replies

329 Views
CrasyCat
Specialist III
Hello
 
Usually if you are programming in relocatable assembly (i.e with several assembly units or source files) you need to tell the assembler which symbols are visible from outside (to other modules).
 
This is usually done through an assembly directive GLOBAL in the module where the symbol is defined.
Then you have to make the external symbol known from other modules.
You can use directive XREF in that purpose.
 
Please refer to {Install}\Help\PDF\56800x_Assembler.pdf chapter "Directives for more information on those directives.
 
I hope this helps.
 
CrasyCat
0 Kudos

329 Views
55boy
Contributor I
Thanks for your answer. I've probe that solution and doesn't work either. Global and Xdef definition work only inside sections but not for the EQUates (again I think I'm doing right but I'm not shure). Because of this I put some global needed EQUates outside any section in one of my assembler files. This EQUates work perfectly inside that file when used on any defined section, but only inside that assembler file. I can't used that definition in other assembler files.
0 Kudos