CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Problem with v5.056

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
SeeCwriter



Joined: 18 Nov 2013
Posts: 159

View user's profile Send private message

Problem with v5.056
PostPosted: Tue Mar 22, 2016 3:00 pm     Reply with quote

A program I have that compiled fine with v5.055 gets reams of errors with v5.056. Is there something I need to know?

Code:

#include <18F67K22.h>

#ifdef _DEBUG_
  #device *=16 ADC=12 ICD=TRUE WRITE_EEPROM=NOINT
  //#define USE_ANALOG_TEST
#else
  #device *=16 ADC=12 WRITE_EEPROM=NOINT
#endif
#nolist

#ZERO_RAM

#include "version.h"

#include <ctype.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#ifdef USE_BOOTLOADER
#include <bootloader.h>
#endif

/*
** These fuses must match the fuses in the bootloader application.
*/
#FUSES PUT
#FUSES HSM
#FUSES WDT_SW       // Software Watch Dog Timer.
#FUSES WDT512       // Watch Dog Timer uses 1:512 Postscale for 2-sec timeout.
#FUSES BORV30            // Brown-out Reset at 3.0V.

#use delay(clock=64000000,internal=16000000,restart_wdt)
#use FAST_IO( D )
#use FAST_IO( E )
#use FAST_IO( F )

#use rs232(baud=38400,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=COM1,restart_wdt)
#use timer(timer=0,tick=100us,bits=32,NOISR)


The first error is with the #use timer statement: "USE parameter value is out of range. Does not have Timer 0"

Next error: "A numeric expression must appear here"
Referring the function get_ticks().
Code:

CurrentTick = get_ticks();

Really?
SeeCwriter



Joined: 18 Nov 2013
Posts: 159

View user's profile Send private message

PostPosted: Tue Mar 22, 2016 3:23 pm     Reply with quote

FYI...going back to v5.055 works. I'll stay with that for now. v5.056 is not ready for prime time.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 22, 2016 10:02 pm     Reply with quote

In vs. 5.056, getenv() says Timer0 doesn't exist. It also gives a strange
result for Timer1. It should be 0 or 1.
Quote:

Timer0: 00
Timer1: 05
Timer2: 01

Test program:
Code:
#include <18F67K22.h>
#fuses INTRC_IO, NOWDT
#use delay(clock=4M)
#use rs232(baud=9600, UART1, ERRORS)

//=====================================
void main()
{

printf("Timer0: %x \r", getenv("TIMER0"));
printf("Timer1: %x \r", getenv("TIMER1"));
printf("Timer2: %x \r", getenv("TIMER2"));

while(TRUE);
}



I then ran the same test program for the 18F4620. It also says Timer0
doesn't exist (in compiler vs. 5.056):
Quote:
Timer0: 00
Timer1: 01
Timer2: 01

Code:

#include <18F4620.h>
#fuses INTRC_IO, NOWDT
#use delay(clock=4M)
#use rs232(baud=9600, UART1, ERRORS)

//=====================================
void main()
{

printf("Timer0: %x \r", getenv("TIMER0"));
printf("Timer1: %x \r", getenv("TIMER1"));
printf("Timer2: %x \r", getenv("TIMER2"));

while(TRUE);
}


Conclusion: Compiler vs. 5.056 is buggy.

I reported this bug to CCS support today, on Wednesday morning.

CCS reports they will fix it in vs. 5.057.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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