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: board_lib can not be done for idkAM437x based custom board

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4379, AMIC110

I am trying to build the board library for my custom board based on AM4379 processor. I am using pdk_am437x_1_0_17 to build the library. 

I have based the library for the new board, called "myCustomBoard" based on idkAM437x and before changing the files, I am just trying to build the library as available for idkAM437x. I can build the individual object files as listed below:

board.oa9fg, boardstub.oa9fg, enet_phy.oa9fg, idkAM437x.oa9fg, idkAM437x_ethernet_config.oa9fg, idkAM437x_info.oa9fg, idkAM437x_lld_init.oa9fg, idkAM437x_pinmux.oa9fg and qspi_flash.oa9fg

The aforementioned files are located in this directory which has been created when I compiled the board package with the command gmake LIMIT_BOARDS="myCustomBoard".

C:\ti\pdk_am437x_1_0_17\packages\ti\binary\ti\board\board\obj\myCustomBoard\a9\release

Now, I would like to generate a library using the archiver tool of the cross compiler. So I have used the following command according to the instructions in ti document titled " Board porting up using Processor SDK RTOS for AM335x/AMIC110" which was recommended to me earlier. Alternatively, the documentation of the processor SDK also indicates the following command for building the board library which is very similar to the previous one: gmake board_lib LIMIT_SOCS=am437x LIMIT_BOARDS=myCustomBoard LIMIT_CORES=a9host.

However, when I use the CMD line in Windows and run either command, I get the following response which says, there are no rules for generating board_lib. Am I missing something or is there something missing from the makefiles that tell the archiver to generate the board_lib. 

Here is the print out:


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
***************************************************

C:\ti\pdk_am437x_1_0_17\packages>gmake board_lib LIMIT_BOARDS="myCustomBoard"
gmake: *** No rule to make target 'board_lib'. Stop.

C:\ti\pdk_am437x_1_0_17\packages>

Please provide me with the guide line and the tools to make sure the board library build process goes all the way to the end.

Thanks.

  • Hi,

    Building "board_lib" from top level makefile is not supported in Processor-SDK 6.3 and newer releases. Please refer to the Migration Guide. You can do the following to build you custom board:

    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"

    Please note that 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

    Regards,

    Jianzhong

  • Hi Jianzhong,

    Thanks for your reply. I had already added myCustomBoard to the board list. Here is a cut and paste from soc_info.mk:

    BOARD_LIST_am335x = evmAM335x icev2AM335x iceAMIC110 skAM335x bbbAM335x
    BOARD_LIST_am437x = evmAM437x idkAM437x skAM437x myCustomBoard
    BOARD_LIST_am571x = idkAM571x
    BOARD_LIST_am572x = evmAM572x idkAM572x

    Still, I get the message 

    Quote

    C:\ti\pdk_am437x_1_0_17\packages>gmake board_lib LIMIT_BOARDS="myCustomBoard"
    gmake: *** No rule to make target 'board_lib'. Stop.

    Unquote. 

    "No rule to make target" could mean I am missing a file somewhere. I have indicated the object files that I have already created. Could there be some other stuff that is missing and that is why the target ti.board.aa9fg can not be made?

    Thanks.

  • Hi,

    Please refer to the commands I posted earlier. You'll need to do "gmake" from the board directory.

    Regards,

    Jianzhong

  • Hi JianZhong,

    Apologies for my mistake in posting the wrong text last time. I was experimenting with using other makefiles. But the result is as I reported, i.e. while the object files are built successfully, the archive is not built.

    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
    ***************************************************

    c:\ti\pdk_am437x_1_0_17\packages>cd ti/board

    c:\ti\pdk_am437x_1_0_17\packages\ti\board>gmake board_lib LIMIT_BOARDS="myCustomBoard"

    gmake: *** No rule to make target 'board_lib'. Stop.

    c:\ti\pdk_am437x_1_0_17\packages\ti\board>

  • Hi Farrokh,

    You don't need "board_lib" in the make command. You need to do:

    C:\ti\pdk_am437x_1_0_17\packages\ti\board>gmake LIMIT_BOARDS="myCustomBoard"

    Regards,

    Jianzhong

  • Hi JianZhongxu,

    The build of the library is finally successful. Thank you for your patience.

    It was my mistake. I was not checking in the right directory for the resulting lib. I found it in the lib directory of the board package for myCustomBoard. However, I found that the size of the file I built is 191kB verses over 500 kB for the original lib in idkAM437x. So I investigated a little. I used the readelf utility of gcc to see the content of the ti.board.aa9fg from the idkAM437x and compared it with the same from myCustomBoard. 

    The lib in idkAM437x originally provided by TI has the following 19 object files in it:

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(board.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(boardStub.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(idkAM437x.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(idkAM437x_info.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(idkAM437x_lld_init.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(idkAM437x_pinmux.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(enet_phy.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(qspi_flash.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(idkAM437x_ethernet_config.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(am43xx_control.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(pl310.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(hw_prcm_data.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(agraph.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(am43xx_chipdb.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(am43xx_prcm.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(hw_am43xx_chipdb.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(hw_am43xx_chipdb_baseaddr.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(hw_am43xx_chipdb_interrupt.oa9fg)

    C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\idkAM437x\a9\release\ti.board.aa9fg(am43xx_idkevm_pinmux_data.oa9fg)

    But myCustomBoard only has the following 9 files.

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(board.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(boardStub.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(idkAM437x.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(idkAM437x_info.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(idkAM437x_lld_init.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(idkAM437x_pinmux.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(enet_phy.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(qspi_flash.oa9fg)

    File: C:\ti\pdk_am437x_1_0_17\packages\ti\board\lib\myCustomBoard\a9\release\ti.board.aa9fg(idkAM437x_ethernet_config.oa9fg)

    So the same 9 object files can be seen in both builds, but the other 10 are only present in the original TI provided lib in idkAM437x and not in my build for myCustomBoard.

    Can you please explain why is there the difference? I have identified 6 of the 10 missing files in pdk package within the ..\..\starterware\soc\am43xx directory and there is a makefile there too. I suspect the build script is missing references to these 6 files. These 6 files are 

    am43xx_control.c

    am43xx_chipdb.c

    hw_am43xx_chipdb_interrupt.c

    hw_am43xx_chipdb.c

    am43xx_prcm.c

    hw_am43xx_chipdb_baseaddr.c

    The file hw_prcm_data.c  together with a makefile is in the subdirectory ..\..\starterware\soc\am43xx\am437x. I hope this will give you a good idea to tell me what is missing in the makefile(s) used in the build process and what should I fix to get the complete lib within the starterware to be built correctly.

  • Hi Farrokh,

    You need to add "myCustomBoard" to build starterware source files. In file pdk_am437x_1_0_17\packages\ti\board\src\src_files_starterware.mk, replace the following line

    ifeq ($(BOARD),$(filter $(BOARD), evmAM437x idkAM437x skAM437x))

    with

    ifeq ($(BOARD),$(filter $(BOARD), evmAM437x idkAM437x skAM437x, myCustomBoard))

    Add then add the following 

        ifeq ($(BOARD),$(filter $(BOARD), myCustomBoard))
            SRCS_COMMON += am43xx_myCustomBoard_pinmux_data.c
        endif

    after 

        ifeq ($(BOARD),$(filter $(BOARD), idkAM437x))
            SRCS_COMMON += am43xx_idkevm_pinmux_data.c
        endif
    

    I assume you have made a new pinmux data file: am43xx_myCustomBoard_pinmux_data.c. If not, you can use am43xx_idkevm_pinmux_data.c just for testing. 

    In addition, please make sure in step 4, you add myCustomBoard wherever ikdAM437x appears.

    With these changes, you should be able to build board lib. I'll update the documentation to reflect this.

    Regards,

    Jianzhong

  • Hi Jianzhong,

    Thanks for investigating and finding the problem. I made the change and it fixed everything. Now I get a ti.board.aa9fg that is 517kB and very close to the original 527 kB with all the 19 files included. I think the difference is a storage issue. I did not change anything with respect to idkAM437x files. I just wanted to make sure the build process is working first. Thanks. I think all is good so far now that the library is getting generated correctly.

    Regards

    Farouk