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.

makefile variables doubt in SDK_5.0.3

Other Parts Discussed in Thread: AM3517

Hello, i am working with Linux SDK5.0.3 and AM3517. If you go to the example-applications folder, for instance to the dhyrstone example (SDK_AM3517/example-applications/arm-benchmarks-1.3/armv7a/dhrystone and open the makefile of such project , i have the next doubt:

I am not able to find in which file are declared the next variables i write in bold: INCLUDES, CFLAGS, LIBS. Pls. could you help me?

#   ----------------------------------------------------------------------------
#   Compiler and Linker flags for Debug
#   ----------------------------------------------------------------------------
OBJDIR_D := Debug
BINDIR_D := $(OBJDIR_D)
LIBS_D := $(LIBS)
OBJS_D := $(SRCS:%.c=$(OBJDIR_D)/%.o)
ALL_DEBUG := -g3 -gdwarf-2

#   ----------------------------------------------------------------------------
#   Compiler include directories
#   ----------------------------------------------------------------------------
INCLUDES :=

#   ----------------------------------------------------------------------------
#   All compiler options to be passed to the command line
#   ----------------------------------------------------------------------------
ALL_CFLAGS := $(INCLUDES)                  \
              -march=armv7-a               \
              -mtune=cortex-a8             \
              -c                           \
              $(CFLAGS)

LDFLAGS :=    -march=armv7-a               \
              -mtune=cortex-a8,            \
              -Wl,--hash-style=gnu         \
              -Wl,-O1                      \

Thanks in advance

  • Alberto,

    These makefiles were generated by Eclipse and use some standard eclipse variables to allow setting additional flags and parameters.  In this case these variables are not actually being used.  The Makefile we use most often is actually the one in example-applications/am-benchmarks

    Chase

  • Hello Chase,

    I understood after reading documentation that these projects were makefile based projects (not CCS projects that generate a makefile).  I do not understand well the function of the makefile under example-applications/arm-benchmarks, it looks that build all the projects under arm-benchmarks, but i suppose that you can go to any particular project under arm-benchmarks like arm-benchmarks-1.3/armv7a/ dhrystone project, and you can build that project without going to the upper makefile. Pls. confirm me that these are not makefile based projects, but in any case i am not able to see where is the path to the libraries against these projects are built ( i do not see the libray path neither in the makefile nor the eclipse enviroment)

     

    Thanks

  • Alberto,

    Yes, you can go to the individual benchmark directory and just type "make" to build this project.

    These makefiles were generated using an eclipse plugin that set a bunch of variables that you could set through that plugin.  However, we no longer use that plugin, and instead just use a makefile project.  So the original makefiles were left alone and they still have the variables defined, just not used.  It is similar to having a DEBUG variable defined so that someone can set DEBUG to modify the flags for a build but not using it by default.

    Chase

  • Thanks Chase, it is starting to be clear to me know. Just another doubt about this subject. If you open the drystoner project with the Code Composer Studio, I cannot see any reference to the library path, that i think should be /linux-devkit/arm-arago-linux-gnueabi/usr/lib.

    If you go to dhrystone propierties -> C/C++ General -> Path and Symbols -> includes -> TI GNU C, you can see written these 2 path directories:

    /linux-devkit/arm-arago-linux-gnueabi/usr/include (headers files for libraries)

    /linux-devkit/lib/gcc/arm-arago-linux-gnueabi/4.5.3/include (I do not know why this header path is included in this project ??)

    In C/C++ General -> Path and Symbols -> Library Paths, there is no any path written, neither in the makefile, so how this example build against libraries?

     

    Thanks

    Alberto

  • Alberto,

    The toolchain itself knows how to find the standard libraries.  See the following wiki page for some information on the toolchain.

    http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_GCC_Toolchain

    Chase

  • Thanks again Chase, just a last doubt

    Do you know why is this header file included in this project?, which kind of libraries use these includes?:

    /linux-devkit/lib/gcc/arm-arago-linux-gnueabi/4.5.3/include

    Thanks

    Alberto

  • Alberto,

    Those look to be inludes for the toolchain itself.  I'm guessing that the toolchain has this built in by default.

    Chase