![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Dreyliciouss
Joined: 17 Jan 2011 Posts: 1
|
Internal Error |
Posted: Mon Jan 17, 2011 1:44 am |
|
|
Hi everyone,
I have a problem when I try to compile any code with MPLAB and I have this error :
"Executing: "C:\Program Files (x86)\PICC\Ccsc.exe" "main.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
>>> Warning 203 "C:\Users\hureauau\Desktop\Logiciel\main.c" Line 69(1,1): Condition always TRUE
--- Info 300 "C:\Users\hureauau\Desktop\Logiciel\main.c" Line 72(1,2): More info: * Unable to write to main.PJT
*** Error 44 "C:\Users\hureauau\Desktop\Logiciel\main.c" Line 72(1,2): Internal Error - Contact CCS OUTPUT FILE P
1 Errors, 1 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Mon Jan 17 08:34:34 2011"
I tried to compile a simple code which is this one:
Code: | #include <18F452.h>
#fuses XT,NOWDT,PUT,BROWNOUT,NOLVP
#use delay(clock=4000000)
//==============================
void main(void)
{
while(1);
} |
I have the same error.
Here is my code :
Code: | /**
* @file main.c
*
* Fichier principal de gestion de la ceinture de réveil
*
* @version 1.0
* @date 04/01/2011
* @author Audrey HUREAU
*
* Modifié le 14/01/2011
*/
#include <12f683.h>
#include <stdlib.h>
#include <stdio.h>
#fuses INTRC_IO,NOBROWNOUT,NOMCLR,NOWDT,PROTECT,PUT,NOCPD,NOIESO,NOFCMEN,HS
#use delay(clock=8000000) //8MHz
/* Variables */
unsigned int arret=0;
float adc_value[6];
int i=0;
/* Fonction d'initialisation */
void init(void)
{
setup_oscillator(OSC_8MHZ); // select 8MHz internal clock
set_tris_a(0b00011011); // GP0,1,2 et 3 sont des entrées
setup_comparator(NC_NC);// On utilise pas de comparateur
setup_vref(FALSE);//On a pas besion de préciser la tension de ref utile au comparateur
setup_adc(ADC_CLOCK_INTERNAL);//Select ADC conversion clock
setup_adc_ports( AN3_ANALOG );//Seul GP4(AN3) est un port analogue
set_adc_channel(3);//sélection du channel AN3
delay_us(10);// Petit temps de délai après
output_low(PIN_A5);// Diode éteinte à la base
output_a(0b0000000);// 0 en sortie si pas d'arret respiratoire
}
/* Le module Detect() permet de scruter la sortie
de la jauge pendant un intervalle de temps */
void Detect(void)
{
//SLEEP();
do{
read_adc(ADC_START_ONLY);// Lecture de la valeur
adc_value[i] =read_adc(ADC_READ_ONLY);
if((adc_value[i]==adc_value[i-1]) && (adc_value[i]==adc_value[i-2]) && (adc_value[i]==adc_value[i-3])){
//on test si la valeur lue est égaleaux précédentes
arret=1;
}
else
//sinon on incrémente le i pour scruter plus lgt
i=i+1;
delay_ms(1000); /* On relève les valeurs toutes les secondes */
}while(arret==0); // On scrute tant qu'on a pas détecté d'arrêt
}
/* Fonction principale*/
void main(void)
{
init();
do{
Detect(); // appel à la fonction de détection pour commencer à scruter
setup_adc(ADC_OFF);
output_a(0b0000001); //Envoyer signal d'alarme à l'émetteur à la sortie du micro
output_high(PIN_A5); //Allumer la diode
}while(1);
} |
Can anyone help me with the compiler? Do you think it can be a problem in my code?
Thank you. |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
Internal Error |
Posted: Mon Jan 17, 2011 4:51 pm |
|
|
Hi,
Have you set the build options correctly?
I tried your simple "while (1) ;" code and got the Internal Error message and the others.
I then went into build options and set the MPASM option in place of the default CCS one.
Code then compiled without errors.
Mike |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Jan 17, 2011 5:19 pm |
|
|
But what compiler version ? For you or him ? |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9174 Location: Greensville,Ontario
|
|
Posted: Mon Jan 17, 2011 9:37 pm |
|
|
Also what version of MPLAB !! v8.63 (latest) has an 'interesting' bug. |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|