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.

CCS/BEAGLEBK: Build error

Part Number: BEAGLEBK

Tool/software: Code Composer Studio

http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs

In the step of linux remoteproc driver ,to  use the remoteproc driver to load that code into the PRU cores.

while compiling ,

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb

getting the error 

./scripts/gcc-version.sh: line 26: arm-linux-gnueabihf-gcc: command not found
./scripts/gcc-version.sh: line 27: arm-linux-gnueabihf-gcc: command not found
make: arm-linux-gnueabihf-gcc: Command not found
Makefile:953: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.

Compiling path is 

# manojsai@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e$

  • Hello,

    Did you export the PRU_CGT as per Lab 5 > Lab Steps > Building the PRU Firmware > Using the Provided Makefile?

     export PRU_CGT=<path_to_Linux_proc_sdk>/linux-devkit/sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru


    If that does not address your issue, please be specific about what steps you have done, what step you are on, and show the terminal instructions you used.

    Regards,

    Nick

  • Build the PRU Firmware
    1. Launch CCSv6 and select the default Workspace.
    2. Open the button_led_0 project.
    a. In the button_led_0 project, select File->Open File and copy in the resource_table_0.h file from <PRU_SW_PATH>/labs/lab_4 or use Project->Add Files... to add the file to the project and copy it into the workspace.
    b. In the AM335x.cmd file, add a line telling the linker where to place the new .resource_table section.
    Pru lab4 linkcmd.png
    c. In button_led_0.c include the resource_table_0.h file.
    #include <stdint.h>
    #include <pru_cfg.h>
    #include <pru_intc.h>
    #include "resource_table_0.h"
    d. Rebuild the project and ensure that it builds correctly without errors.
    3. Open the button_led_1 project.
    a. Select File->Open File and copy in the resource_table_1.h file from <PRU_SW_PATH>/labs/lab_4 or use Project->Add Files... and copy the file into the workspace.
    b. In button_led_1.c include the resource_table_1.h file.
    c. Rebuild the project and ensure that it builds correctly without errors.
    d. You may choose to launch the debugger and verify that both projects run without issues.
    Modify Device Tree Files to Account for PRU Cape
    The SDK includes example device tree source files for several TI and community boards, like the Beaglebone Black. Since the PRU cape requires certain pin muxing and configuration to be configured to be usable in Linux, this requires modifications to the device tree files.
    4. Modify to SDK provided DTS (devicetree source) files to account for the PRU cape.
    a. Copy the am335x-boneblack-prucape.dtsi from the <PRU_SW_PATH>/pru_cape directory to arch/arm/boot/dts.
    b. In your kernel source tree, open arch/arm/boot/dts/am335x-boneblack.dts for editing.
    c. Add the below line to include the PRU Cape DTS file to the bottom of the am335x-boneblack.dts file.
    #include "am335x-boneblack-prucape.dtsi"
    NOTE

    As per steps i followed



    Compile the DTS file:
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb

    while compiling i am getting the error follows :



    manojsai@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb

    ./scripts/gcc-version.sh: line 26: arm-linux-gnueabihf-gcc: command not found
    ./scripts/gcc-version.sh: line 27: arm-linux-gnueabihf-gcc: command not found
    make: arm-linux-gnueabihf-gcc: Command not found
    Makefile:953: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
    manojsai@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e$

    i am compiling the dtb file in linux directory of am355x sdk
  • Hello Manoj,

    You need to modify your PATH to include the ARM compiler and set up the kernel config before building the dts file. I have added instructions for those steps in section "Configure the Kernel" of Lab 4.

    Regards,

    Nick

  • As per lab instruction i added the path of sdk ,

    still facing the same problem 

    manojsai@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb
    ./scripts/gcc-version.sh: line 26: arm-linux-gnueabihf-gcc: command not found
    ./scripts/gcc-version.sh: line 27: arm-linux-gnueabihf-gcc: command not found
    make: arm-linux-gnueabihf-gcc: Command not found
    Makefile:953: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.


    manojsai@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e$ echo PATH :$PATH
    PATH :/home/manojsai/bin:/home/manojsai/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots//home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots/x86_64-arago-linux/usr/bin


    manojsai@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb
    ./scripts/gcc-version.sh: line 26: arm-linux-gnueabihf-gcc: command not found
    ./scripts/gcc-version.sh: line 27: arm-linux-gnueabihf-gcc: command not found
    make: arm-linux-gnueabihf-gcc: Command not found
    Makefile:953: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
    manojsai@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e$

  • Hello Ti ,

    able to solve gcc problem .

    How to solve this

    Makefile:953: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
  • From a suggestion from web , installed libelf-dev


    root@manojsai:~sudo apt install libelf-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
    libelf-dev
    0 upgraded, 1 newly installed, 0 to remove and 194 not upgraded.
    Need to get 54.3 kB of archives.
    After this operation, 358 kB of additional disk space will be used.
    Get:1 in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libelf-dev amd64 0.165-3ubuntu1.1 [54.3 kB]
    Fetched 54.3 kB in 0s (85.5 kB/s)
    Selecting previously unselected package libelf-dev:amd64.
    (Reading database ... 227428 files and directories currently installed.)
    Preparing to unpack .../libelf-dev_0.165-3ubuntu1.1_amd64.deb ...
    Unpacking libelf-dev:amd64 (0.165-3ubuntu1.1) ...
    Setting up libelf-dev:amd64 (0.165-3ubuntu1.1) ...

    errors are gone .

    able to compilie , but came 2 warnings .is compile is sucess ?

    root@manojsai:~/ti-processor-sdk-linux-am335x-evm-05.02.00.10/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb
    scripts/kconfig/conf --silentoldconfig Kconfig
    HOSTCC scripts/dtc/dtc.o
    HOSTCC scripts/dtc/flattree.o
    HOSTCC scripts/dtc/fstree.o
    HOSTCC scripts/dtc/data.o
    HOSTCC scripts/dtc/livetree.o
    HOSTCC scripts/dtc/treesource.o
    HOSTCC scripts/dtc/srcpos.o
    HOSTCC scripts/dtc/checks.o
    HOSTCC scripts/dtc/util.o
    HOSTCC scripts/dtc/dtc-lexer.lex.o
    HOSTCC scripts/dtc/dtc-parser.tab.o
    HOSTLD scripts/dtc/dtc
    HOSTCC scripts/dtc/fdtoverlay.o
    HOSTCC scripts/dtc/libfdt/fdt.o
    HOSTCC scripts/dtc/libfdt/fdt_rw.o
    HOSTCC scripts/dtc/libfdt/fdt_sw.o
    HOSTCC scripts/dtc/libfdt/fdt_empty_tree.o
    HOSTCC scripts/dtc/libfdt/fdt_overlay.o
    HOSTCC scripts/dtc/libfdt/fdt_wip.o
    HOSTCC scripts/dtc/libfdt/fdt_strerror.o
    HOSTCC scripts/dtc/libfdt/fdt_ro.o
    HOSTCC scripts/dtc/libfdt/fdt_addresses.o
    HOSTLD scripts/dtc/fdtoverlay
    HOSTCC scripts/genksyms/genksyms.o
    HOSTCC scripts/genksyms/parse.tab.o
    HOSTCC scripts/genksyms/lex.lex.o
    HOSTLD scripts/genksyms/genksyms
    CC scripts/mod/empty.o
    HOSTCC scripts/mod/mk_elfconfig
    MKELF scripts/mod/elfconfig.h
    HOSTCC scripts/mod/modpost.o
    CC scripts/mod/devicetable-offsets.s
    CHK scripts/mod/devicetable-offsets.h
    HOSTCC scripts/mod/file2alias.o
    HOSTCC scripts/mod/sumversion.o
    HOSTLD scripts/mod/modpost
    HOSTCC scripts/kallsyms
    HOSTCC scripts/conmakehash
    HOSTCC scripts/sortextable
    DTC arch/arm/boot/dts/am335x-boneblack.dtb
    arch/arm/boot/dts/am335x-boneblack.dtb: Warning (phys_property): Missing property '#phy-cells' in node /ocp/usb@47400000/usb-phy@47401300 or bad phandle (referred from /ocp/usb@47400000/usb@47401000:phys[0])
    arch/arm/boot/dts/am335x-boneblack.dtb: Warning (phys_property): Missing property '#phy-cells' in node /ocp/usb@47400000/usb-phy@47401b00 or bad phandle (referred from /ocp/usb@47400000/usb@47401800:phys[0])
  • Hello Manoj,

    1) I suspect the first PATH you posted did not work because you had "/" instead of ":" between

    /home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots
    and
    /home/manojsai/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots/x86_64-arago-linux/usr/bin

    2) I also see those two warnings when I build the dtb file on my system. I have not verified that USB is not affected, but I would be surprised if it caused issues.

    Regards,
    Nick