Page 1 of 1

PWM Error

Posted: Fri Apr 11, 2014 2:18 pm
by alaahima
Hello , I have a problem with using pwm on flowcode v5 ... When I try to compile the attached flowchart to hex ,This message appears:
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Launching the compiler...
C:\Program Files\Flowcode(AVR)\v5\Tools\MX_bats\avra.bat atmega32 "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.elf" "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c" "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.lst"

C:\Documents and Settings\GFG\Desktop>"C:\PROGRA~1\FLOWCO~1\v5\Tools\MX_bats\..\bin\avr-gcc.exe" -mmcu=atmega32 -Os -funsigned-char -o "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.elf" "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c" -lm
In file included from C:\Program Files\Flowcode(AVR)\v5\CAL\includes.c:227,
from C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c:316:
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:101:5: warning: #warning "PWM Channel Uses Resource Timer 0"
In file included from C:\Program Files\Flowcode(AVR)\v5\CAL\includes.c:227,
from C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c:316:
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Enable_Channel_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:671: error: 'COM0A0' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:671: error: (Each undeclared identifier is reported only once
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:671: error: for each function it appears in.)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:676: error: 'COM0A1' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Disable_Channel_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:702: error: 'COM0A1' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Set_Duty_8Bit_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:845: error: 'OCR0A' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Set_Duty_10Bit_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:1121: error: 'OCR0A' undeclared (first use in this function)

Error returned from [avr-gcc.exe]
Return code = 1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks in advance for anyone willing to help ... cheers

Re: PWM Error

Posted: Fri Apr 11, 2014 2:51 pm
by Benj
Hello,

Here is an updated FCD that should resolve the issue for you. Pop the file into your "C:\Program Files (x86)\Flowcode(AVR)\v5\FCD" folder and restart Flowcode and the problem should go away.
ATMEGA32.fcd
(9.97 KiB) Downloaded 410 times

Re: PWM Error

Posted: Fri Apr 11, 2014 2:58 pm
by alaahima
Thank you so much , I really appreciate your fast reply ... Have a great day!