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.

Compiler build errors on M3 project beta code to support the LV Motor example on the Concerto supplied by TI

Other Parts Discussed in Thread: CONTROLSUITE

I finaly got my c28 project to build without errors now working on M3.

In the M3 project, I have several persistent errors and warnings.  two errors and two warnings are in the file F28M35x_Adc.c

two  are on comments lines: 29, 30 see below

// CPU_RATE define statement in the F28M35xA_Examples.h file must
// contain the correct CPU clock period in nanoseconds.

the error is the same for both lines

Multiple markers at this line
    - explicit type is missing ("int"
     assumed)

I also get the very same errors and warnings for the following two lines 29, 30 in the file F28M35x_Device.h

extern cregister volatile unsigned int IFR;
extern cregister volatile unsigned int IER;

I get a fifth warning in file LVMA_M3.c on line 796

 IntRAMRegister(FAULT_SYSTICK,SysTickIntHandler);

function declared implicitly

and a sixth warning in file httpd.c line77

static int command;

function declared implicitly

I am sure the IntRAMRegister warning is behind the errors, but can't locate in what file the function exists.  Any guidance would be much appreciated.

  • The C2000 compiler recognizes the registers IFR and IER, but the ARM compiler does not.  You probably cannot use the header file F28M35x_Device.h in your ARM program.

    As to the sixth warning, most likely you have a function-like macro named command somewhere.

  • Thank you Archaeologist,

    Trouble is F28M35x_Device.h is referenced by memcopy.h which in turn is referenced by LVMA_M3.c which was supplied by TI.  See prolog below

    //###########################################################################
    // $TI Release: F28M35x Driver Library vBeta1 $
    // $Release Date: August 31, 2011 $
    //###########################################################################

    In TI's defense this is Beta code so I don't expect it to necessarily build without issues.  But possibly you could tell me what I need to do at a high level to remove memcopy/F28M35x_Device.h from the build.  By the way, I tried to simply remove the file F28M35x_Device.h to see what happens which is when I traced the reference back to the LVMA_M3.c beta code. 

    I got the impression from one of your colleagues, Remesh Ramamorthy, who graciously supplied the beta code that the code had actually worked.  I did try subsequently to reach out to him to verify, but never got a reply.  Perhaps you could tell me if the code actually did work at some point.  This would be invaluable to me in that then I would know whether I was doing something entirely wrong or simply I just need to fiish the coding properly to get it to work.  Any guidance would be much appreciated.

  • I'm sorry, I don't know anything about that software.  I think you'll get better answers to this question on the Concerto forum.

  • Erich White said:
    I got the impression from one of your colleagues, Remesh Ramamorthy, who graciously supplied the beta code that the code had actually worked.  I did try subsequently to reach out to him to verify, but never got a reply.  Perhaps you could tell me if the code actually did work at some point.  This would be invaluable to me in that then I would know whether I was doing something entirely wrong or simply I just need to fiish the coding properly to get it to work.  Any guidance would be much appreciated.

    Hi Erich,

    I touched base with Ramesh and he indicated that the code was working. 

    The Archaeologist is correct that the code you are seeing in the M3 project doesn't belong to M3 but is 28x code so I'm at a bit of a loss as to how it got pulled into the M3 project.

    -Lori

  • Than you so much  for getting back to me Lori.  That puts a whole new spin on things.  I have a virging downloaded copy and check that.  It has the c28x references in the M3 project as well.  Doubt it's worth looking into further.  Base on Archeoligit's observation, I removed the c28x file and based on other posts regrading TI MemCopy errors I was getting, I changed that to memcpy the c++ analog to the MemCopy function.

    I have one last build problem on the M3 side and that's a reference to a shared memory API prototype: RamMReqSharedMemAccess.  I get a symbol not resolved.  I have been looking for the function so I can ensure the project points to where it's located, but can't seem to locate it.  I realized that extern is more specific than include but still the environment compiler/linker must need to know where a function is located such that  the address can be resolved on the compiler/linker second or third pass.

    Lori - disregard my question about RamMReqSharedMemAccess - I found it in ..\Mware\driverlib\ram.c

    Erich

  • Erich White said:

    I have one last build problem on the M3 side and that's a reference to a shared memory API prototype: RamMReqSharedMemAccess.  I get a symbol not resolved.  I have been looking for the function so I can ensure the project points to where it's located, but can't seem to locate it.  I realized that extern is more specific than include but still the environment compiler/linker must need to know where a function is located such that  the address can be resolved on the compiler/linker second or third pass.

    Lori - disregard my question about RamMReqSharedMemAccess - I found it in ..\Mware\driverlib\ram.c

    ah I was just getting ready to point you to the MWare directory.   In controlSUITE we are up to version 2.0 of the support for the F28M35x.  I'm not sure if the beta SW you have came with a beta version of the MWare as well.  (www.ti.com/controlSUITE).

    -Lori

  • Lori - while I was able to locate the API function and ensure its file was included, I still get the unresolved symbol error.  I have tried several approaches: making the extern a weak extern, adding -z nodefs to the linkage editor all to no avail.  Obviously I am doing something incorrectly.  Can you shed some light on this?  Any guidance would be greatly appreciated.

    Erich

  • Erich White said:

    Lori - while I was able to locate the API function and ensure its file was included, I still get the unresolved symbol error.  I have tried several approaches: making the extern a weak extern, adding -z nodefs to the linkage editor all to no avail.  Obviously I am doing something incorrectly.  Can you shed some light on this?  Any guidance would be greatly appreciated.

    Erich

    Erich,

    If the .c source is within the project, and the function prototype is in the source file that calls it (could be via a #include header) then it should work.  Perhaps try a "build all" to make sure everything gets rebuilt.  

    When this happens to me it is usually because I really didn't have the .c or .lib in the project somehow. 

    -Lori

  • I believe I have all set up as you mention and ran a BUILD ALL but it still fails with symbol not resolved.  Here is what I have.

    1) In my project I have added the files: ram.c and ram.h  (ram.c) contains the API function.  I did not copy but linked them.

    2) I have ipc.h which contains the prototype:

    extern void RamMReqSharedMemAccess (unsigned long ulMask,
                                        unsigned short ulMaster);


    3) and of course LVMA_M3.c that calls the prototype:

      // assign S6 of the shared ram for use by the c28
        RamMReqSharedMemAccess((S6_ACCESS),C28_MASTER); 

    HERE IS THE OUTPUT FROM THE COMPILER

    **** Build of configuration Debug for project LVMA_F28M35x_M3 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
    'Building target: LVMA_M3.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv5/tools/compiler/tms470/bin/cl470" -mv7M3 --code_state=16 --abi=eabi -me -g --gcc --diag_warning=225 --gen_func_subsections=on --ual -z --stack_size=256 -m"LVMA_M3.map" --heap_size=0 -i"C:/ti/ccsv5/tools/compiler/tms470/lib" -i"C:/ti/controlSUITE/device_support/f28m35x/v120/MWare/driverlib" -i"C:/ti/ccsv5/tools/compiler/tms470/include" --warn_sections --rom_model -o "LVMA_M3.out"  "./ustdlib.obj" "./uip_timer.obj" "./uip_arp.obj" "./uip.obj" "./uartstdio.obj" "./startup_ccs.obj" "./ram.obj" "./httpd.obj" "./ethernet_comm.obj" "./dhcpc.obj" "./dcsm_z2_secvalues.obj" "./dcsm_z1_secvalues.obj" "./commros_comm.obj" "./LVMA_M3.obj" -l"rtsv7M3_T_le_eabi.lib" "../commros_cortexM3_c_small.lib" "C:/ti/controlSUITE/device_support/f28m35x/v120/MWare/driverlib/ccs/Debug/driverlib.lib" "../lvmultiaxis_m3.cmd"
    <Linking>

     undefined              first referenced
      symbol                    in file     
     ---------              ----------------
     RamMReqSharedMemAccess ./LVMA_M3.obj   

    error: unresolved symbols remain

    error: errors encountered during linking; "LVMA_M3.out" not built
    gmake: *** [LVMA_M3.out] Error 1
    gmake: Target `all' not remade because of errors.
    >> Compilation failure

    **** Build Finished ****


       

  • Erich White said:
      // assign S6 of the shared ram for use by the c28
        RamMReqSharedMemAccess((S6_ACCESS),C28_MASTER); 

    Erich,

    In ram.c I see the function as:

    RAMMReqSharedMemAccess(unsigned long ulMask, unsigned short usMaster)

    C is case sensitive so this is why the linker doesn't see a match.    This was probably changed between the beta and release of these functions.

    Regards

    Lori

  • Excellent, it worked!  I only have two warnings regarding unused variables....maybe placed there but not used by the TI team.  Not sure, but now at least I get a build.  I sure appreciate the assistance.

    Erich