Hi All,
I have been having problems lately where a simulation will work perfectly but error appear while compiling.I am not the best at programming software so it may be a fault on my side.In my latest project i wanted to use a pic16f726 the simulation worked ,but it would compile citing many errors.I tried copying the program into a atmega16
and it compiled with one error "unsigned integer"(not sure what that means.Is there some chip setting that need to be changed for the pic? is there a list available of chip settings,
compiling errors on specific ic's
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: compiling errors on specific ic's
Hi ctesla75,
It's nothing you have done wrong!
Error is down to a bug in the PIC_CAL_ADC.c file.
Devices affected will be:
16F722, 16F723, 16F724, 16F726 & 16F727
The same bug also affects Flowcode V5
I have created an unofficial temporary fix for Flowcode V6.
Can you make a backup copy and replace:
PIC_CAL_ADC.c that's in:
C:\Program Files (x86)\Flowcode 6\CAL\PIC (If 64 bit windows)
or
C:\Program Files\Flowcode 6\CAL\PIC(If 32 bit windows.)
With the attached file.
Hope it works for you.
Lastly you have left configuration settings at their default value.
So unless you change settings for your hardware setup and Disable watchdog timer, hardware will not work anyway.
Martin
It's nothing you have done wrong!
Error is down to a bug in the PIC_CAL_ADC.c file.
Devices affected will be:
16F722, 16F723, 16F724, 16F726 & 16F727
The same bug also affects Flowcode V5
I have created an unofficial temporary fix for Flowcode V6.
Can you make a backup copy and replace:
PIC_CAL_ADC.c that's in:
C:\Program Files (x86)\Flowcode 6\CAL\PIC (If 64 bit windows)
or
C:\Program Files\Flowcode 6\CAL\PIC(If 32 bit windows.)
With the attached file.
Hope it works for you.
Lastly you have left configuration settings at their default value.
So unless you change settings for your hardware setup and Disable watchdog timer, hardware will not work anyway.
Martin
- Attachments
-
- PIC_CAL_ADC.c
- (97.81 KiB) Downloaded 228 times
Martin
-
- Posts: 25
- Joined: Sat May 03, 2014 7:27 am
- Has thanked: 5 times
- Been thanked: 4 times
- Contact:
Re: compiling errors on specific ic's
Hi Martin,
Thanks for the help, i just compiled it and it compiled although it took over ten minutes to compile, (it took this long even before the new c file,avr however compiles quickly)
it also had these errors
Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units
Warning unreferenced functions removed:
is this due to configuartion settings i played around with them really only turning off watchdog and changing frequency and oscillator type. I will research configuration settings furtherm
Thanks for the help, i just compiled it and it compiled although it took over ten minutes to compile, (it took this long even before the new c file,avr however compiles quickly)
it also had these errors
Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units
Warning unreferenced functions removed:
is this due to configuartion settings i played around with them really only turning off watchdog and changing frequency and oscillator type. I will research configuration settings furtherm
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: compiling errors on specific ic's
Hi ctesla75,
Your welcome.
For example:
'Warning unreferenced functions removed' is just showing that the component function is not being reference in the code, because its not being used.
So if you're using ADC component and only using ReadAsByte then ReadAsInt is not being used, hence is an unreferenced function and has been removed from the compile code.
The delay just means it not totally spot-on and there will be a slight inaccuracy which is should not affect your hardware.
Your welcome.
No not at all, those warnings can be totally ignored.ctesla75 wrote:Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units
Warning unreferenced functions removed:
is this due to configuartion settings
For example:
'Warning unreferenced functions removed' is just showing that the component function is not being reference in the code, because its not being used.
So if you're using ADC component and only using ReadAsByte then ReadAsInt is not being used, hence is an unreferenced function and has been removed from the compile code.
The delay just means it not totally spot-on and there will be a slight inaccuracy which is should not affect your hardware.
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: compiling errors on specific ic's
Hello,
Woops, see Martin's already beat me to the punch , anyway here is what I put.
The warnings are connected to the clock speed in the project options.
As Martin says, both warnings can probably just be ignored.
Woops, see Martin's already beat me to the punch , anyway here is what I put.
The warnings are connected to the clock speed in the project options.
This is saying at your current clock speed we cannot work out the timings for exactly 1 micro second, instead delays will be a minimum of 10us but then additional delays i.e. 12us will be accurate.Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units
This is saying you might be passing the value 0 to the delay function. Instead of giving you no delay this will likely wrap and give you 256us of Delay. To get around this if your using a variable to set the delay then you can have a decision to see if the variable is greater than 0, if it is then call the delay icon.Caution: argument of 'delay_us' calls must have a value of 1 or more
As Martin says, both warnings can probably just be ignored.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 25
- Joined: Sat May 03, 2014 7:27 am
- Has thanked: 5 times
- Been thanked: 4 times
- Contact:
Re: compiling errors on specific ic's
Thanks for the replies, I will build up the hardware knowing that it is okay.Why then does it take so long to compile 5 - 10 mins is this normal
i have tried many avr's they all compile quickly. but have only tried pic16f726 on the pic side
ctesla75
i have tried many avr's they all compile quickly. but have only tried pic16f726 on the pic side
ctesla75
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: compiling errors on specific ic's
Hi ctesla75,
On my pc that would not be a normal time.
I have just compiled the flowchart you posted and it took 32 seconds.
This is not my area of expertise so only guessing
Could be several factors that can be delaying.
Could the virus checker or firewall be delaying compiling time?
Is the hard drive light on solid during compiling time?
What are specs to your pc?
Could the physical memory or CPU useage be high slowing things down?
No not for me.ctesla75 wrote:Why then does it take so long to compile 5 - 10 mins is this normal
On my pc that would not be a normal time.
I have just compiled the flowchart you posted and it took 32 seconds.
This is not my area of expertise so only guessing
Could be several factors that can be delaying.
Could the virus checker or firewall be delaying compiling time?
Is the hard drive light on solid during compiling time?
What are specs to your pc?
Could the physical memory or CPU useage be high slowing things down?
Martin
-
- Posts: 25
- Joined: Sat May 03, 2014 7:27 am
- Has thanked: 5 times
- Been thanked: 4 times
- Contact:
Re: compiling errors on specific ic's
Hi Martin,
the long compiling time seemed to be caused by the firewall ,strange as the firewall has been set up to allow it to run.But after turning it off it compiled in under a minute, when turning it back on and restarting flowcode it took 9 minutes.thanks for the idea i would never have thought of the firewall being the problem and a 10 minute recompile isn't very useful to a someone learning how to program and requiring several recompiles.
ctesla75
the long compiling time seemed to be caused by the firewall ,strange as the firewall has been set up to allow it to run.But after turning it off it compiled in under a minute, when turning it back on and restarting flowcode it took 9 minutes.thanks for the idea i would never have thought of the firewall being the problem and a 10 minute recompile isn't very useful to a someone learning how to program and requiring several recompiles.
ctesla75