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.

Compiler: PRU Compiler 2.2.1: Unable to fix entry-point warning.

Tool/software: TI C/C++ Compiler

Hi,

I am using the TI-CGT-PRU_2.2.1 compiler to build my PRU firmware. My firmware is building and working fine but I constantly get the following warnings:

warning: entry-point symbol "_c_int00" undefined
warning: no suitable entry-point found; setting to 0

I am unable to resolve this warning. I tried passing the --entry_point=main parameter during linking as specified in PRU Assembly Language Tools v2.2, but it is not recognizing the parameter. (I have defined main as a label in my .asm file and also specified it as global symbol using .global).

WARNING: invalid compiler option --entry_point=main (ignored)

Please provide suitable information on how to fix this warning regarding entry point.

Regards,
Anjandeep

  • Is your system all hand-coded assembly?  I suspect it is, and that has something to do with it.  Please show exactly how the linker is invoked, and all the resulting diagnostics.  

    Thanks and regards,

    -George

  • --entry_point is a linker option. From the looks of the warning, you are passing this option to the compiler, not to the linker that is expecting it.
  • Yes, my code is all assembly. I am using the below method in my Makefile.

    TOOLCHAIN_PATH_CLPRU ?= $(HOME)/ti-cgt-pru_2.2.1/
    ASFLAGS ?= --silicon_version=4 -al

    (TOOLCHAIN_PATH_CLPRU)/bin/clpru $(ASFLAGS) --display_error_number --code_address_listing_unit=word -I $(TOOLCHAIN_PATH_CLPRU)/include ../src/main_src.asm -fr obj/ -z ../pru_icss.cmd --disable_auto_rts -o obj/main_src.out -m obj/main_src.map

    Above generates the following warnings (as I mentioned earlier):

    warning: entry-point symbol "_c_int00" undefined
    warning: no suitable entry-point found; setting to 0

    Subsequently I am using the hexpru utility and xxd to generate a c based header file with static array containing entire PRU instructions.

    (TOOLCHAIN_PATH_CLPRU)/bin/hexpru ../pru_icss.hexcfg obj/main_src.out

    xxd -i main_src.b00 main_src_bin.h

    Above two statements work fine. I then tried to specify an entry point as below:

    (TOOLCHAIN_PATH_CLPRU)/bin/clpru $(ASFLAGS) --entry_point=main --display_error_number --code_address_listing_unit=word -I $(TOOLCHAIN_PATH_CLPRU)/include ../src/main_src.asm -fr obj/ -z ../pru_icss.cmd --disable_auto_rts -o obj/main_src.out -m obj/main_src.map

    "main" is a label in my assembly source. I see the following additional warning:

    WARNING: invalid compiler option --entry_point=main (ignored)

    Regards,
    Anjandeep

  • Move that option to the right of the option -z, which is where the linker options start
  • Thanks, this fixed the issue. But after this I see the following warning:

    warning: entry-point symbol other than "_c_int00" specified: "main"

    I suppose this is just for information. Do I need to suppress it or is there a fix for this also?

    Regards,
    Anjandeep
  • Lines from a Makefile can obscure important details.  It is best to see everything exactly as the tools see it.  Please conduct a problem build, then copy-n-paste from that exactly how clpru is invoked for the last command, where everything is linked together.  If your makefile does not echo the commands it executes, then use the option -n, or --dry-run, or something similar, to force the commands to be echoed.

    Thanks and regards,

    -George

  • Please show how clpru is invoked to link everything together, as detailed in the previous post.

    Thanks and regards,

    -George

  • Hi George,

    The issue is already resolved. As mentioned by Archaeologist, I was passing the entry-point parameter to the compiler instead of linker. Hence compiler was throwing a warning since it does not recognize that parameter.

    Regards,
    Anjandeep