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.

PROCESSOR-SDK-AM437X: AM437x

Part Number: PROCESSOR-SDK-AM437X

I am using processor_sdk_rtos_am437x_6_03_00_106 and pdk_am437x_1_0_17. 


According to instructions in the Developers Manual of proc SDK, noted under this link  

  

I am trying to create a custom board library.

Section 3.1.3.5 titled Creating Board Library with Custom Name refers to this goal. I am trying to create a board library for myCustomBoard according to instructions in that section of the manual.

I have followed the instructions but at the end when I try to build the library, the file include $(PDK_INSTALL_PATH)/ti/build/Rules.make is missing. So I can't build the library. 

The manual does indicate that building board libraries for AM335x and AM437x targets requires additional precautions, but it does not explain what those precautions are. Also the Board package lacks any documentation in the pdk package which is not helpful. 

Are you able to supply a template for the Rules.mk file that I could use with the rest of the set up in the Board package to build the library?

  • A template for Rules.make file NOT Rules.mk.

  • Hi,

    Thank you for reporting this documentation issue. You can use the alternative approach of invoking the build in command line

    gmake board_lib LIMIT_BOARDS=myCustomBoard 

    Here is an application note that can help you build a custom board library (it was written for AM335x but is applicable to AM437x): Board porting up using Processor SDK RTOS for AM335x/AMIC110.

    Regards,

    Jianzhong

  • Hi

    Thanks for your reply but the same problem remains. As I explained before, there are refences to the Rules.make so the build does not get started. I have been using the command line and the gmake command as you have outlined and with more parameters as have been outlined in the procSDK manual.

    Here is the response I get when running gmake board_lin LIMIT_BOARDS=myCustomBoard. Prior to running the gmake command, I ran the pdksetupen.bat to make sure the setup is correct.  As you can see below, the compiler is looking for Rules.make file and can not find it because it is not there. 


    PS C:\ti\pdk_am437x_1_0_17\PACKAGES> .\pdksetupenv.bat
    ***************************************************
    Environment Configuration:
    ***************************************************
    SDK_INSTALL_PATH : C:/ti
    PDK_INSTALL_PATH : C:/ti/pdk_am437x_1_0_17/PACKAGES
    GMAKE_INSTALL_PATH : C:/ti/xdctools_3_55_02_22_core
    PDK_SOC : am437x
    PDK_VERSION : 1_0_17
    RULES_MAKE : C:/ti/pdk_am437x_1_0_17/PACKAGES/ti/build/Rules.make
    ***************************************************
    PS C:\ti\pdk_am437x_1_0_17\PACKAGES> gmake board_lib LIMIT_BOARDS=myCustomBoard
    makefile:19: /ti/build/Rules.make: No such file or directory
    gmake: *** No rule to make target '/ti/build/Rules.make'. Stop.
    PS C:\ti\pdk_am437x_1_0_17\PACKAGES>

  • In the makefile.mk located at C:\ti\pdk_am437x_1_0_17\packages\ti\board\build , in the first line we have the following include statement:

    include $(PDK_INSTALL_PATH)/ti/build/Rules.make

    There is no such file in the build directory. There is a Rules.make file in the Starterware directory as in C:\ti\pdk_am437x_1_0_17\packages\ti\starterware, so if I were to change the include statement, I could point to the Rules.make file in the Starterware directory, but I am not sure if this is the Rules.make file that is intended to be used. Please check and let me know. I can easily make the changes to other files to point to Rules.make in Starterware if that is the correct file.

  • Hi,

    Sorry for the confusion. I figured out the problem:

    1. Building "board_lib" from top level makefile is not supported in Processor-SDK 6.3 and newer releases. Please refer to http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_release_specific.html#building-of-libraries-of-individual-pdk-components. Unfortunately,should be:

    C:\ti\pdk_am437x_1_0_17\packages>pdksetupenv.bat
    
    C:\ti\pdk_am437x_1_0_17\packages>cd ti\board
    
    C:\ti\pdk_am437x_1_0_17\packages\ti\board>gmake LIMIT_BOARDS="myCustomBoard"

    2. In addition, the instructions miss one step. You'll need to add your board to the BOARD_LIST_am437x in ti\build\soc_info.mk:

    BOARD_LIST_am437x = evmAM437x idkAM437x skAM437x myCustomBoard

    These fixes should build your custom board_lib. I'll get the documentation fixed as soon as possible.

    Regards,

    Jianzhong

  • I followed your instructions. I get the following:

    PS C:\ti\pdk_am437x_1_0_17\PACKAGES> .\pdksetupenv.bat
    ***************************************************
    Environment Configuration:
    ***************************************************
    SDK_INSTALL_PATH : C:/ti
    PDK_INSTALL_PATH : C:/ti/pdk_am437x_1_0_17/PACKAGES
    GMAKE_INSTALL_PATH : C:/ti/xdctools_3_55_02_22_core
    PDK_SOC : am437x
    PDK_VERSION : 1_0_17
    RULES_MAKE : C:/ti/pdk_am437x_1_0_17/PACKAGES/ti/build/Rules.make
    ***************************************************
    PS C:\ti\pdk_am437x_1_0_17\PACKAGES> cd ti/board
    PS C:\ti\pdk_am437x_1_0_17\PACKAGES\ti\board> gmake LIMIT_BOARDS="myCustomBoard"
    makefile:45: /ti/build/comp_top.mk: No such file or directory
    gmake: *** No rule to make target '/ti/build/comp_top.mk'. Stop.
    PS C:\ti\pdk_am437x_1_0_17\PACKAGES\ti\board>

    As you can see, the message says on line 45, /ti/build/comp_top.mk is not found as a directory or file. The file is exactly in that directory. I have checked for it. But there is something wrong in the top makefile in the /ti/board directory.

    Here is the content of the make file:


    ifeq ($(RULES_MAKE), )
    include $(PDK_INSTALL_PATH)/ti/build/Rules.make
    else
    include $(RULES_MAKE)
    endif

    COMP = board_lib

    lib_$(COMP)_BUILD_DEPENDENCY = board

    $(COMP)_DOXYGEN_SUPPORT = no

    include $(PDK_INSTALL_PATH)/ti/build/comp_top.mk

    The highlighted line is line 45.

    It is funny because now the line to find Rules.make is working but comp_top.mk is not being found and it is there! So it seems like there is a problem with an environment setting.

    Looking forward to hearing from you.

    Farouk

  • I did some more digging into this with gmake with switch -d which gives a big dump of what make is trying to do. It seems there is a problem that makes comp_top.mk become a target for gmake, and not another include file. Have a look:

    PS C:\ti\pdk_am437x_1_0_17\packages\ti\board> gmake -d LIMIT_BOARD="myCustomBoard"
    GNU Make 4.2.1
    Built for Windows32
    Copyright (C) 1988-2016 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Reading makefiles...
    Reading makefile 'makefile'...
    Reading makefile '/ti/build/Rules.make' (search path) (no ~ expansion)...
    Reading makefile '\ti\build\comp_top.mk' (search path) (no ~ expansion)...
    Updating makefiles....
    Considering target file '\ti\build\comp_top.mk'.
    File '\ti\build\comp_top.mk' does not exist.
    Looking for an implicit rule for '\ti\build\comp_top.mk'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.o'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.c'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.cc'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.C'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.cpp'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.p'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.f'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.F'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.m'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.r'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.s'.
    Trying pattern rule with stem 'comp_top.mk'.
    Trying implicit prerequisite '\ti\build\comp_top.mk.S'.

    Please note that this is not the full output. It is only the first few lines. But the rest looks similar. gmake is looking for some implicit rules to build ti\build\comp_top.mk which is clearly wrong.

  • Hi Farouk,

    Can you first try the following and see if it builds:

    C:\ti\pdk_am437x_1_0_17\packages>pdksetupenv.bat
    C:\ti\pdk_am437x_1_0_17\packages>cd ti\board
    C:\ti\pdk_am437x_1_0_17\packages\ti\board>gmake LIMIT_BOARDS="evmAM437x"
    

    This worked fine for me.

    Thanks,

    Jianzhong

  • Just did it. I get the same.


    PS C:\ti\pdk_am437x_1_0_17\packages> .\pdksetupenv.bat
    ***************************************************
    Environment Configuration:
    ***************************************************
    SDK_INSTALL_PATH : C:/ti
    PDK_INSTALL_PATH : C:/ti/pdk_am437x_1_0_17/packages
    GMAKE_INSTALL_PATH : C:/ti/xdctools_3_55_02_22_core
    PDK_SOC : am437x
    PDK_VERSION : 1_0_17
    RULES_MAKE : C:/ti/pdk_am437x_1_0_17/packages/ti/build/Rules.make
    ***************************************************
    PS C:\ti\pdk_am437x_1_0_17\packages> cd ti\board
    PS C:\ti\pdk_am437x_1_0_17\packages\ti\board> gmake LIMIT_BOARDS="evmAM437x"
    makefile:45: \ti\build\comp_top.mk: No such file or directory
    gmake: *** No rule to make target '\ti\build\comp_top.mk'. Stop.
    PS C:\ti\pdk_am437x_1_0_17\packages\ti\board>

  • May be something is corrupted in my top level makefile. Here is a copy of mine. perhaps you can compare with yours.

    Quote:


    ifeq ($(RULES_MAKE), )
    include $(PDK_INSTALL_PATH)/ti/build/Rules.make
    else
    include $(RULES_MAKE)
    endif

    COMP = board_lib

    lib_$(COMP)_BUILD_DEPENDENCY = board

    $(COMP)_DOXYGEN_SUPPORT = no
    include $(PDK_INSTALL_PATH)\ti\build\comp_top.mk /*<------- this is the 45th line in the make file and the file C:\ti\pdk_am437x_1_0_17\packages\ti\board\makefile.mk*/

  • Are you using Windows power shell? That may be the problem. Can you try Command Prompt instead?

    Thanks,

    Jianzhong

  • Thank you. Yes. I was using the Power Shell in Windows. I switched to Command Line and the compilation process got underway. A few boards have compiled,

    but when I got to myCustomBoard, I got a fatal error with the following message: 

    QUOTE:

    In file included from src/myCustomBoard/idkAM437x.c:39:0:
    c:/ti/pdk_am437x_1_0_17/packages/ti/starterware/include/chipdb.h:77:10: fatal error: chipdb_defs.h: No such file or directory
    #include "chipdb_defs.h"
    ^~~~~~~~~~~~~~~
    compilation terminated.

    UNQUOTE

    There must be something wrong in one of the files. I will look for it and will update. But also since that is probably an unrelated issue, you can close this question if you want.

    Thanks again for your help.