I am trying to get a call order from .asm and ,c files using ofd2000 but am having trouble getting details from a .asm file calling a .c function.
Our compiler options are
SET C2000_C_OPTION= REM Assembler options SET C2000_C_OPTION=%C2000_C_OPTION% --cdebug_asm_data SET C2000_C_OPTION=%C2000_C_OPTION% --cross_reference SET C2000_C_OPTION=%C2000_C_OPTION% --output_all_syms REM Compiler options SET C2000_C_OPTION=%C2000_C_OPTION% --silicon_version=28 SET C2000_C_OPTION=%C2000_C_OPTION% --float_support=fpu32 SET C2000_C_OPTION=%C2000_C_OPTION% --large_memory_model SET C2000_C_OPTION=%C2000_C_OPTION% --unified_memory SET C2000_C_OPTION=%C2000_C_OPTION% --opt_level=off SET C2000_C_OPTION=%C2000_C_OPTION% --symdebug:dwarf SET C2000_C_OPTION=%C2000_C_OPTION% --obj_directory=obj_dir SET C2000_C_OPTION=%C2000_C_OPTION% --gen_func_subsections=on REM Linker options SET C2000_C_OPTION=%C2000_C_OPTION% --run_linker SET C2000_C_OPTION=%C2000_C_OPTION% --warn_sections SET C2000_C_OPTION=%C2000_C_OPTION% --disable_auto_rts SET C2000_C_OPTION=%C2000_C_OPTION% --mapfile_contents=all SET C2000_C_OPTION=%C2000_C_OPTION% --rom_model
I am using the command
ofd2000-gx --obj_display=none
I notice that the XML output contains
- DW_TAG_compile_unit - indicates the .asm or .c filename
- DW_TAG_subprogram - indicates a function within the .asm or .c file
- DW_TAG_TI_reserved_3 - indicates a called function from that defined by DW_TAG_subprogram
I have the following
- Math.h
- FLOAT32 Math__Divide( IN FLOAT32 Dividend, IN FLOAT32 Divisor);
- Math.asm
- .def _Math__Divide
- .ref _MyCalledCFunction
- .sect ".text:_Math__Divide"
- .clink
- _Math__Divide:
- ; some assembler code
- LCR _MyCalledCFunction
- LRETR
- MyOuterC.c
- void Outer()
- {
- FLOAT32 a = Math__Divide(10, 2);
- }
- MyCalledC.h
- void MyCalledCFunction(void);
In the ofd2000 XML output I can see
- DW_TAG_compile_unit - <string>Math.asm</string>
- DW_TAG_subprogram - no tag at all
- DW_TAG_TI_reserved_3 - <string>_MyCalledCFunction</string>
The trouble is that as there is no DW_TAG_subprogram I don't know the name of the asm function (should be _MathDivide) that is calling MyCalledCFunction.
Am I doing something wrong with the compiler options, or the ofd2000 command line or is there some other reason why the tag is missing for the assembler routine?
Thanks
Darren