Searching \ for '[PIC] Check toolchain configuration' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Check toolchain configuration'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Check toolchain configuration'
2010\03\01@071914 by Paul Chany

picon face
Hi,

I'm trying to build a C program for PIC16F877A microcontroller.
I'm using Piklab.
When try to build, I get the following message:

ccsc +STDOUT +EA -P +DF +LSlst +O8hex +M -J -A +FM \
I+="/home/user/PIC/" main.c
Failed to execute command: check toolchain configuration.

The program in C is bellow:
------------------->
#include <16F877A.h>

#FUSES NOWDT, XT, NOPUT, NOPROTECT, BROWNOUT, NOLVP, NOCPD
#use delay(clock=4000000)

#byte PORTA = 0x05        //PORTA regiszterre mutato pointer
#byte PORTD = 0x08        //PORTD regiszterre mutato pointer

//========================================================
void main(){
//========================================================
int last_state,new_state;

set_tris_a(0b00011111);        //PORTA0:5 bemenet
set_tris_d(0b00000000);        //PORTD kimenet
output_d(0b00000001);                //elso led bekapcs

last_state = 0;

for(;;) {
       new_state = 0;
       if(!input(PIN_A0)) bit_set(new_state,0);
       if(!input(PIN_A1)) bit_set(new_state,1);
       if(new_state == 3 && last_state == 1) {
               rotate_left(&PORTD,1);
       } else if(new_state == 3 && last_state == 2) {
               rotate_right(&PORTD,1);
       }
       last_state = new_state;
}//for
}//main
-------------------<

In Piklab in the menu / Project Options and Toolchains tab I have
settings:
+STDOUT +EA -P +DF +LSlst +O8hex +M -J -A +F%FAMILY I+="$(SRCPATH)" %I

So what am I doing wrong here?
Any advices will be appreciated!

--
Regards, Paul Chany
You can freely correct me in my English.
http://csanyi-pal.info

2010\03\01@073304 by Lee Jones

flavicon
face
> I'm trying to build a C program for PIC16F877A microcontroller.
> I'm using Piklab.
> When try to build, I get the following message:
>
> ccsc +STDOUT +EA -P +DF +LSlst +O8hex +M -J -A +FM \
> I+="/home/user/PIC/" main.c
> Failed to execute command: check toolchain configuration.

I'm not a CCS C user, but my first guess would be that Piklab
can't find the ccsc compiler executable.  Is the directory
where the compiler lives in the path that Piklab searches?

Can you execute that same command if entered from a command
line environmen (aka terminal window)?

Second guess is that make engine in Piklab is objecting to
something about the options or utility programs but I have
no idea what.


One comment on your C code:

> //========================================================
> void main(){
> //========================================================
>
> for(;;)
> {
> }//for

I would never assume that the terminal condition test would
evaluate to true when the test statement is empty / null.  I
would write it as

#define TRUE 1  // always up in the top part of the souce

then

for ( ; TRUE ; )
{
} // for

or

while (TRUE)
{
} // while

to ensure that the compiler would always evaluates the loop
condition the way I wanted and to self-document it for other
programmers later [ "other" shall include myself a few years
after initially writting the code :-) ].

                                               Lee Jones

2010\03\01@074523 by Dave Tweed

face
flavicon
face
Lee Jones wrote:
> I would never assume that the terminal condition test would
> evaluate to true when the test statement is empty / null.

Why not? It's part of the standard. Always has been, even in K&R edition 1.

-- Dave Tweed

More... (looser matching)
- Last day of these posts
- In 2010 , 2011 only
- Today
- New search...