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.

TMS320F28069F: Compile issue adding datalog.c to proj_lab11a

Part Number: TMS320F28069F
Other Parts Discussed in Thread: MOTORWARE

I've been trying to add datalog.c from v18 proj_lab1b to an application based on V16 proj_lab11a but keep running into compile issues. see error below.

I copied the datalog module into the TI v16 sw/module/ directory.  Then added the module in CCS using the add file project menu.  However, after adding the code snippets the compiler doesn't seem to pick up on the addition of a new module.  What step am I missing.  I didn't see an explicit declaration of datalog.c or .h in the proj_lab1b example.

>> Compilation failure
subdir_rules.mk:135: recipe for target 'proj_lab11a.obj' failed
"C:/ti/motorware/motorware_1_01_00_16/sw/solutions/instaspin_foc/src/proj_lab11a.c", line 579: error #20: identifier "datalogHandle" is undefined
"C:/ti/motorware/motorware_1_01_00_16/sw/solutions/instaspin_foc/src/proj_lab11a.c", line 579: warning #225-D: function "DATALOG_init" declared implicitly
"C:/ti/motorware/motorware_1_01_00_16/sw/solutions/instaspin_foc/src/proj_lab11a.c", line 579: error #20: identifier "datalog" is undefined
"C:/ti/motorware/motorware_1_01_00_16/sw/solutions/instaspin_foc/src/proj_lab11a.c", line 1446: warning #225-D: function "DATALOG_update" declared implicitly
"C:/ti/motorware/motorware_1_01_00_16/sw/solutions/instaspin_foc/src/proj_lab11a.c", line 1446: error #20: identifier "datalogHandle" is undefined
3 errors detected in the compilation of "C:/ti/motorware/motorware_1_01_00_16/sw/solutions/instaspin_foc/src/proj_lab11a.c".

However, to see if this was the issue I added an explicit include for  datalog.h in main.h and then I get this error.

Linking>
warning #10247-D: creating output section "graph_data" without a SECTIONS specification
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/blocking fails for section
"graph_data" size 0x9a0page 1. Available memory ranges:
BOOT_RSVD size: 0x4e unused: 0x4e max hole: 0x4e
RAMM1 size: 0x400 unused: 0x50 max hole: 0x50
USB_RAM size: 0x800 unused: 0x800 max hole: 0x800
error #10010: errors encountered during linking; "proj_lab11a.out" not built

  • So after doing more research I decided to leave in the explicit include of datalog.h in main.h and work on the link warning. 

    The solution to the warning is adding this to F28069F_ram_lnk.cmd

       graph_data       : > RAML0_L8,   PAGE = 0

    Which I found from in the v18 project.  With that added the project compiles successfully.

    I get that the memory section needed to be defined, but why did I have to explicitly include datalog.h in main.h in my v18 project where as it wasn't in the v16 project?

  • That means the reserve RAM is not enough for datalog data buffer. You should change the .cmd file refer to the lab01b, and add datalog.c to the project, and the search directory in project properties for datalog.h.