top of page
neletenkeha

Makefile Generation Mistake On Ccs For Mac: Avoiding Errors and Warnings



Most users will not need to adjust the default settings underBuilder and Makefile generation. These are set to use thedefault build command and to generate makefiles automatically. Advanced users may wish to customize the gmake command or even use a differentmake utility. See Changing the make utility if you wish to use a makeutility other than the default gmake.


makefile.defs is used for defining additional make rules for SYS/BIOSprojects. makefile.init and makefile.targets are not used by the TIbuild environment. They are inserted into the makefile by one of theEclipse components(CDT) and can be used to extend the behavior. Forexample, you can create these optional makefiles in the top-level folderof the project:




Makefile Generation Mistake On Ccs For Mac



1. Create a makefile.targets that contains rules for theadditional make targets and place the file in the top-level folder ofthe project. For example, a makefile.targets file to perform additionalclean commands (in this case, delete the main.asm file) could look likethis:


This example illustrates how to hook into the generated makefile toscript a custom pre-build step. This is useful in cases where thecommands cannot be run as a pre-build step in CCS (for example, in caseswhere you want the main build to fail if the pre-build fails).


As additional reference, these external web posts touch on the subject ofthese makefiles: Eclipse Community forum thread -cdt-generate-makefile-with-makefile-init-makefile-defs-makefile-target


The figure below shows a typical software development flow and gives anidea of the build tools and files involved when a project is built inCCS. All of this is handled in the background by the makefile, howeverit is helpful to have an understanding of the build flow to betterunderstand the build output that appears in the CCS build console.


The file Debug/makefile has an error in the "#Tool invocations" section when building on a 2015 iMac, as shown in the screenshot below. I understand that this is due to the incompatibility of the file extension, as the extension there is the location on the Windows machine it is pushed from. I read through the makefile, and I see this problem all over the place.


The makefile is a generated file, think of it as an intermediate file. You do not want that to be shared between users. The project files themselves can be setup to be hostOS agnostic. However when the makefile is generated during the build that is going to end up with paths specific to the machine you are running the build on.


The build process also requires the selection of a toolchain or template makefile. The toolchain or template makefile determines which compiler runs, during the make phase of the build. For more information, see Configure Toolchain (ToolchainInfo) or Template Makefile Build Process.


To use C++ language support, you could need to configure the code generator to use a specific compiler. For example, if a supported compiler is not installed on your Microsoft Windows computer, the default compiler is the lcc C compiler shipped with the MATLAB product. This compiler does not support C++. If you do not configure the code generator to use a C++ compiler before you specify C++ for code generation, the software produces an error message.


If you select a template makefile (TMF) based system target file, such as rsim.tlc, the Build process subpane displays template makefile parameters for configuring the build process. The Template makefile parameter displays the default TMF file for the selected system target file. If the system target file supports compiler-specific template makefiles (for example, Rapid Simulation or S-Function system target files), you can set Template makefile to a compiler-specific TMF. For valid TMF names, see Compare System Target File Support Across Products.


When the code generator builds models with S-functions, source code for the S-functions can be either in the current folder or in the same folder as their MEX-file. The code generator adds an include path to the generated makefiles whenever it finds a file named sfncname.h in the same folder as the S-function MEX-file. This folder must be on the MATLAB path.


"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 12 clean -O DEL /F "tirtos_builds_CC1310_LAUNCHXL_release_ccs.lib" "../src/makefile.libs" "configPkg\linker.cmd" "configPkg\compiler.opt" makefile:145: recipe for target 'clean' failedThe system cannot find the file specified.gmake: [clean] Error 1 (ignored)The system cannot find the file specified.gmake: [clean] Error 2 (ignored)RMDIR /S/Q "configPkg\" makefile:145: recipe for target 'clean' failed'Finished clean'' '


"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 12 all -O gmake[1]: Entering directory 'C:/ti/NewWorkSpaceV7/tirtos_builds_CC1310_LAUNCHXL_release_ccs/Debug''Building file: ../release.cfg''Invoking: XDCtools'"C:/ti/xdctools_3_50_02_20_core/xs" --xdcpath="C:/ti/simplelink_cc13x0_sdk_1_60_00_21/source;C:/ti/simplelink_cc13x0_sdk_1_60_00_21/kernel/tirtos/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M3 -p ti.platforms.simplelink:CC1310F128 -r release -c "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS" --compileOptions " -DDeviceFamily_CC13X0 " "../release.cfg"making package.mak (because of package.bld) ...generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...configuring release.xem3 from package/cfg/release_pem3.cfg ...generating custom ROM library makefile ... Starting build of library sources ...making C:/ti/NewWorkSpaceV7/tirtos_builds_CC1310_LAUNCHXL_release_ccs/src/sysbios/rom_sysbios.aem3 ...gmake[1]: Entering directory `C:/ti/NewWorkSpaceV7/tirtos_builds_CC1310_LAUNCHXL_release_ccs/src/sysbios'clem3 C:/ti/simplelink_cc13x0_sdk_1_60_00_21/kernel/tirtos/packages/ti/sysbios/BIOS.c ...


js: "C:/ti/xdctools_3_50_02_20_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!gmake.exe: *** [package/cfg/release_pem3.xdl] Error 1gmake.exe: *** Deleting file `package/cfg/release_pem3.xdl'gmake.exe: *** [package/cfg/release_pem3.xdl] Deleting file `package/cfg/release_pem3.h'gmake.exe: *** [package/cfg/release_pem3.xdl] Deleting file `package/cfg/release_pem3.c'js: "C:/ti/xdctools_3_50_02_20_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.gmake[1]: *** [build-1317695535-inproc] Error 1gmake[1]: Leaving directory 'C:/ti/NewWorkSpaceV7/tirtos_builds_CC1310_LAUNCHXL_release_ccs/Debug''Building file: ../release.cfg''Invoking: XDCtools'"C:/ti/xdctools_3_50_02_20_core/xs" --xdcpath="C:/ti/simplelink_cc13x0_sdk_1_60_00_21/source;C:/ti/simplelink_cc13x0_sdk_1_60_00_21/kernel/tirtos/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M3 -p ti.platforms.simplelink:CC1310F128 -r release -c "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS" --compileOptions " -DDeviceFamily_CC13X0 " "../release.cfg"configuring release.xem3 from package/cfg/release_pem3.cfg ...generating custom ROM library makefile ... Starting build of library sources ...making C:/ti/NewWorkSpaceV7/tirtos_builds_CC1310_LAUNCHXL_release_ccs/src/sysbios/rom_sysbios.aem3 ...gmake[1]: Entering directory `C:/ti/NewWorkSpaceV7/tirtos_builds_CC1310_LAUNCHXL_release_ccs/src/sysbios'clem3 C:/ti/simplelink_cc13x0_sdk_1_60_00_21/kernel/tirtos/packages/ti/sysbios/BIOS.c ...


js: "C:/ti/xdctools_3_50_02_20_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!xdctools_3_50_02_20_core\gmake.exe: *** [package/cfg/release_pem3.xdl] Error 1xdctools_3_50_02_20_core\gmake.exe: *** Deleting file `package/cfg/release_pem3.xdl'xdctools_3_50_02_20_core\gmake.exe: *** [package/cfg/release_pem3.xdl] Deleting file `package/cfg/release_pem3.h'xdctools_3_50_02_20_core\gmake.exe: *** [package/cfg/release_pem3.xdl] Deleting file `package/cfg/release_pem3.c'js: "C:/ti/xdctools_3_50_02_20_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.gmake[2]: *** [build-1317695535-inproc] Error 1gmake[1]: *** [build-1317695535] Error 2gmake[1]: Target 'configPkg/linker.cmd' not remade because of errors.gmake: *** [all] Error 2subdir_rules.mk:9: recipe for target 'build-1317695535' failedmakefile:127: recipe for target 'all' failed


A makefile consists of a set of dependencies and rules. A dependency has a target (a file to be created) and a set of source files upon which it is dependent. The rules describe how to create the target from the dependent files. Typically, the target is a single executable file.


The makefile is read by the make command, which determines the target file or files that are to be made and then compares the dates and times of the source files to decide which rules need to be invoked to construct the target. Often, other intermediate targets have to be created before the final target can be made.The make command uses the makefile to determine the order in which the targets have to be made and the correct sequence of rules to invoke.


The second part of the makefile specifies the rules that describe how to create a target. In the example in the previous section, what command should be used after the make command has determined that 2.o needs rebuilding? It may be that simply using gcc -c 2.c is sufficient.


The make command has processed the dependencies section of the makefile and determined the files that need to be created and in which order. Even though you listed how to create myapp first, make has determined the correct order for creating the files. It has then invoked the appropriate commands you gave it in the rules section for creating those files. The make command displays the commands as it executes them. You can now test your makefile to see whether it handles changes to the file b.h correctly: 2ff7e9595c


0 views0 comments

Recent Posts

See All

Bình luận


!
Widget Didn’t Load
Check your internet and refresh this page.
If that doesn’t work, contact us.
bottom of page