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.

PRU development with CCS getting errors

I'm trying to build a sample program using CCS 6 and the Biss C application in Tidc920. I created an assembly project for the PRU  and loaded the .p and include files into the project. When I go to build in CCS, I get

warning #10211-D: cannot resolve archive C:/TI/ccsv6/tools/compiler/ti-cgt-pru_2.1.1/lib/libc.a to a compatible library, as no input files have been encountered
fatal error #10009: no input files

>> Compilation failure
gmake: *** [PRU Test.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****


The file builds fine if I use pasm.exe from DOS.

What's wrong with my setup?

Thanks.

  • Bob D. said:
    I created an assembly project for the PRU  and loaded the .p and include files into the project.

    Is the project going to contain only assembly source files or a mix of assembly and C? If only assembly, then be sure to select "Empty Assembly-only Project" when creating the new project, else select "Empty Project". 

    If your assembly source file has .p extension, change it to .asm as CCS does not recognize .p by default.

    Let us know if this helps.

  • Hi Aarti, Yes for now the project has only assembly, and I did create it as an assembly only PRU project. It's the file from the referenced Ti app note. When I use .p I get the errors shown. If I change the name to .asm it totally blows up with errors on EVERY single line.
  • Bob,

    Can you copy the build log (full output in the build console) to a text file and attach it here?
  • Hi Aarti,

     The first file is using .p as the file name, the second is using .asm. I had to condense this one since there were so many errors it overflowed the build console buffer and cut off the 1st portion. I stopped the build so I could capture the first few lines.

    Thanks,

    Bob

    **** Build of configuration Debug for project PRU Test ****
    
    "C:\\TI\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../pru0_BiSS.asm'
    'Invoking: PRU Compiler'
    "C:/TI/ccsv6/tools/compiler/ti-cgt-pru_2.1.1/bin/clpru" -v3 --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-pru_2.1.1/include" -g --define=am3359 --define=pru0 --diag_warning=225 --display_error_number --diag_wrap=off --endian=little --hardware_mac=on --preproc_with_compile --preproc_dependency="pru0_BiSS.pp"  "../pru0_BiSS.asm"
    "../pru0_BiSS.asm", ERROR!   at line 1: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 1: [E0200] Bad term in expression
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 1: [E0000] Unexpected trailing token(s)
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 1: [E0003] Invalid instruction
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 2: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	//******************************************************************************
    
    "../pru0_BiSS.asm", ERROR!   at line 2: [E0200] Bad term in expression
    	//******************************************************************************
    
    "../pru0_BiSS.asm", ERROR!   at line 2: [E0000] Unexpected trailing token(s)
    	//******************************************************************************
    
    "../pru0_BiSS.asm", ERROR!   at line 2: [E0003] Invalid instruction
    	//******************************************************************************
    
    "../pru0_BiSS.asm", ERROR!   at line 3: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	//+--------------------------------------------------------------------------+**
    
    "../pru0_BiSS.asm", ERROR!   at line 3: [E0200] Bad term in expression
    	//+--------------------------------------------------------------------------+**
    
    "../pru0_BiSS.asm", ERROR!   at line 3: [E0000] Unexpected trailing token(s)
    	//+--------------------------------------------------------------------------+**
    
    "../pru0_BiSS.asm", ERROR!   at line 3: [E0003] Invalid instruction
    	//+--------------------------------------------------------------------------+**
    
    "../pru0_BiSS.asm", ERROR!   at line 4: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	// Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
    
    "../pru0_BiSS.asm", ERROR!   at line 4: [E0200] Bad term in expression
    	// Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
    
    "../pru0_BiSS.asm", ERROR!   at line 4: [E0000] Unexpected trailing token(s)
    	// Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
    
    "../pru0_BiSS.asm", ERROR!   at line 4: [E0003] Invalid instruction
    	// Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
    
    "../pru0_BiSS.asm", ERROR!   at line 5: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 5: [E0200] Bad term in expression
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 5: [E0000] Unexpected trailing token(s)
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 5: [E0003] Invalid instruction
    	//
    
    "../pru0_BiSS.asm", ERROR!   at line 6: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	// Redistribution and use in source and binary forms, with or without
    
    "../pru0_BiSS.asm", ERROR!   at line 6: [E0200] Bad term in expression
    	// Redistribution and use in source and binary forms, with or without
    
    "../pru0_BiSS.asm", ERROR!   at line 6: [E0000] Unexpected trailing token(s)
    	// Redistribution and use in source and binary forms, with or without
    
    "../pru0_BiSS.asm", ERROR!   at line 6: [E0003] Invalid instruction
    	// Redistribution and use in source and binary forms, with or without
    
    "../pru0_BiSS.asm", ERROR!   at line 7: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	// modification, are permitted provided that the following conditions
    
    "../pru0_BiSS.asm", ERROR!   at line 7: [E0200] Bad term in expression
    	// modification, are permitted provided that the following conditions
    
    "../pru0_BiSS.asm", ERROR!   at line 7: [E0000] Unexpected trailing token(s)
    	// modification, are permitted provided that the following conditions
    
    "../pru0_BiSS.asm", ERROR!   at line 7: [E0003] Invalid instruction
    	// modification, are permitted provided that the following conditions
    
    "../pru0_BiSS.asm", ERROR!   at line 8: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	// are met:
    
    "../pru0_BiSS.asm", ERROR!   at line 8: [E0200] Bad term in expression
    	// are met:
    
    "../pru0_BiSS.asm", ERROR!   at line 8: [E0000] Unexpected trailing token(s)
    	// are met:
    
    "../pru0_BiSS.asm", ERROR!   at line 8: [E0003] Invalid instruction
    	// are met:
    
    "../pru0_BiSS.asm", ERROR!   at line 9: [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword.
    	//
    
    "..
    
    "../pru0_BiSS.asm", ERROR!   at line 908: [E0000] Unexpected trailing token(s)
    		MOV		JUMP_TO_FREQ, CLK10_OSR80							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 908: [E0003] Invalid instruction
    		MOV		JUMP_TO_FREQ, CLK10_OSR80							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 911: [E0003] Invalid instruction
    		QBNE	CHECK_2MHZ, FREQ_SELECT, 5
    
    "../pru0_BiSS.asm", ERROR!   at line 912: [E0200] Binary operator can't be applied
    		MOV		JUMP_TO_FREQ, CLK5_OSR40							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 912: [E0200] Bad term in expression
    		MOV		JUMP_TO_FREQ, CLK5_OSR40							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 912: [E0000] Unexpected trailing token(s)
    		MOV		JUMP_TO_FREQ, CLK5_OSR40							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 912: [E0003] Invalid instruction
    		MOV		JUMP_TO_FREQ, CLK5_OSR40							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 915: [E0003] Invalid instruction
    		QBNE	CHECK_1MHZ, FREQ_SELECT, 2
    
    "../pru0_BiSS.asm", ERROR!   at line 916: [E0200] Binary operator can't be applied
    		MOV		JUMP_TO_FREQ, CLK2_OSR16							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 916: [E0200] Bad term in expression
    		MOV		JUMP_TO_FREQ, CLK2_OSR16							//Copy the branching address of the selected frequency
    
    "../pru0_BiSS.asm", ERROR!   at line 916: [E0000] Unexpected trailing token(s)
    
    **** Build of configuration Debug for project PRU Test ****
    
    "C:\\TI\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building target: PRU Test.out'
    'Invoking: PRU Linker'
    "C:/TI/ccsv6/tools/compiler/ti-cgt-pru_2.1.1/bin/clpru" -v3 -g --define=am3359 --define=pru0 --diag_warning=225 --display_error_number --diag_wrap=off --endian=little --hardware_mac=on -z -m"PRU Test.map" --heap_size=0 --stack_size=0 -i"C:/TI/ccsv6/tools/compiler/ti-cgt-pru_2.1.1/lib" -i"C:/TI/ccsv6/tools/compiler/ti-cgt-pru_2.1.1/include" --reread_libs --define=PRU_CORE=1 --warn_sections --display_error_number --diag_wrap=off --xml_link_info="PRU Test_linkInfo.xml" -o "PRU Test.out" "../AM335x.cmd"  -l"libc.a" 
    <Linking>
    warning #10211-D: cannot resolve archive C:/TI/ccsv6/tools/compiler/ti-cgt-pru_2.1.1/lib/libc.a to a compatible library, as no input files have been encountered
    
    >> Compilation failure
    fatal error #10009: no input files
    gmake: *** [PRU Test.out] Error 1
    gmake: Target `all' not remade because of errors.
    
    **** Build Finished ****
    

  • Bob,

    The source file you are using appears to be designed to work with the older PRU assembler tool, called PASM. Please see these wiki pages for more information.

    http://processors.wiki.ti.com/index.php/Programmable_Realtime_Unit_Software_Development

    http://processors.wiki.ti.com/index.php/PASM_Tool

    This older development model is now replaced by the PRU Compiler/Assembler in CCS. However, the source code format for pasm is not compatible with the CCS Compiler, which is the reason for the error messages you are getting in CCS.

    In the near term to get things going, you can build the .p file on command line using pasm (outside of CCS). Note though that since this is an older tool and not actively supported anymore, the long term solution would be to migrate the source code to work with the TI assembler. The references to TI Compiler and Assembler for PRU can be found as links in this page:
    http://processors.wiki.ti.com/index.php/PRU-ICSS

  • Hi Aarti,
    Thank you. I thought since the app note came out in February 2015 (and is still marked "preliminary") it would have worked with the latest tools.
    Thanks.