Call signature does not match the function definition
Call signature does not match the function definition
Hello!
I add in old working project library code -- SOUND -- and received error :
Call signature does not match the function definition signature 'Delay_Cyc'
itself can not solve the problem. Added simple code:
Sound_Init(&PORTC,0);
Sound_Play(1000,100);
Help me please!
I add in old working project library code -- SOUND -- and received error :
Call signature does not match the function definition signature 'Delay_Cyc'
itself can not solve the problem. Added simple code:
Sound_Init(&PORTC,0);
Sound_Play(1000,100);
Help me please!
- ranko.rankovic
- Posts: 433
- Joined: 11 Jun 2010 09:22
Re: Call signature does not match the function definition
Hello granel,
Please, zip your whole project folder and attach it here so we can examine it. Also, try our example that is located in Help file, it is tested and working on ATMega16 @ 10MHz.
Here is example from help file:
Best regards
Please, zip your whole project folder and attach it here so we can examine it. Also, try our example that is located in Help file, it is tested and working on ATMega16 @ 10MHz.
Here is example from help file:
Code: Select all
void Tone1() {
Sound_Play(659, 250); // Frequency = 659Hz, duration = 250ms
}
void Tone2() {
Sound_Play(698, 250); // Frequency = 698Hz, duration = 250ms
}
void Tone3() {
Sound_Play(784, 250); // Frequency = 784Hz, duration = 250ms
}
void Melody() { // Plays the melody "Yellow house"
Tone1(); Tone2(); Tone3(); Tone3();
Tone1(); Tone2(); Tone3(); Tone3();
Tone1(); Tone2(); Tone3();
Tone1(); Tone2(); Tone3(); Tone3();
Tone1(); Tone2(); Tone3();
Tone3(); Tone3(); Tone2(); Tone2(); Tone1();
}
void ToneA() {
Sound_Play( 880, 50);
}
void ToneC() {
Sound_Play(1046, 50);
}
void ToneE() {
Sound_Play(1318, 50);
}
void Melody2() { // Plays Melody2
unsigned short i;
for (i = 9; i > 0; i--) {
ToneA();
ToneC();
ToneE();
}
}
void main() {
DDRB = 0x00; // Configure PORTB as input
Sound_Init(&PORTC,3); // Initialize sound pin
Sound_Play(880, 1000); // Play sound at 880Hz for 1 second
while (1) { // endless loop
if (PINB7_bit) // If PORTB.7 is pressed play Tone1
Tone1(); //
while (PINB7_bit) ; // Wait for button to be released
if (PINB6_bit) // If PORTB.6 is pressed play Tone2
Tone2(); //
while (PINB6_bit) ; // Wait for button to be released
if (PINB5_bit) // If PORTB.5 is pressed play Tone3
Tone3(); //
while (PINB5_bit) ; // Wait for button to be released
if (PINB4_bit) // If PORTB.4 is pressed play Melody2
Melody2(); //
while (PINB4_bit) ; // Wait for button to be released
if (PINB3_bit) // If PORTB.3 is pressed play Melody
Melody(); //
while (PINB3_bit) ; // Wait for button to be released
}
}
Ranko Rankovic
mikroElektronika [Support Department]
mikroElektronika [Support Department]
Re: Call signature does not match the function definition
my project with SOUNN LIB. code
- Attachments
-
- GE-300-1.zip
- (1.63 KiB) Downloaded 126 times
Re: Call signature does not match the function definition
i received same error if compile your test sound code (((???
microc pro for avr 3,50
microc pro for avr 3,50
- ranko.rankovic
- Posts: 433
- Joined: 11 Jun 2010 09:22
Re: Call signature does not match the function definition
Hello granel,
I've tested your source code and it's working, but unfortunately I couldn't see your settings. Please attach your whole project, with settings etc. Best is to zip whole folder in which your source code is located.
Best regards
I've tested your source code and it's working, but unfortunately I couldn't see your settings. Please attach your whole project, with settings etc. Best is to zip whole folder in which your source code is located.
Best regards
Ranko Rankovic
mikroElektronika [Support Department]
mikroElektronika [Support Department]
Re: Call signature does not match the function definition
my project
- Attachments
-
- GE-300-test.ZIP
- (49.86 KiB) Downloaded 122 times
- ranko.rankovic
- Posts: 433
- Joined: 11 Jun 2010 09:22
Re: Call signature does not match the function definition
Hello granel,
It seems that you didn't enable SSA Optimization.
All function prototypes and function pointers have to be built using the same optimizer because of different calling conventions in different optimizers. In SSA, function parameters are passed via working registers, and without SSA they end up on the function frame.
So to enable SSA optimization, go to Tools -> Options (or F12) then Output -> Output Settings, check Enable SSA optimization. After this is done, go to Build -> Rebuild All Sources (or Ctrl + F9).
Best regards
It seems that you didn't enable SSA Optimization.
All function prototypes and function pointers have to be built using the same optimizer because of different calling conventions in different optimizers. In SSA, function parameters are passed via working registers, and without SSA they end up on the function frame.
So to enable SSA optimization, go to Tools -> Options (or F12) then Output -> Output Settings, check Enable SSA optimization. After this is done, go to Build -> Rebuild All Sources (or Ctrl + F9).
Best regards
Ranko Rankovic
mikroElektronika [Support Department]
mikroElektronika [Support Department]
Re: Call signature does not match the function definition
but SSA optimisation switch on.
Re: Call signature does not match the function definition
it seems the problem is not optimizing.
making the project settings in the compiler ran into another problem - the program the programmer receives other options and it is also hampered work in peace, all the time to change and monitor the project settings (AVR FLASH 2.13)
making the project settings in the compiler ran into another problem - the program the programmer receives other options and it is also hampered work in peace, all the time to change and monitor the project settings (AVR FLASH 2.13)
- Attachments
-
- __ssp_enable.jpg (129.83 KiB) Viewed 4876 times
-
- __ssp_enable.jpg (129.83 KiB) Viewed 4876 times
Re: Call signature does not match the function definition
i reinstal soft and all ok )))???
Re: Call signature does not match the function definition
after reinstalling the program's all worked.
but then changed the project to install an internal oscillator frequency from 4 to 8 MHz - there was an old bug. changed the frequency to 4 MHz --- error remained.
again to reinstall the program and not to touch anything in the settings? ((((((((((((((((
but then changed the project to install an internal oscillator frequency from 4 to 8 MHz - there was an old bug. changed the frequency to 4 MHz --- error remained.
again to reinstall the program and not to touch anything in the settings? ((((((((((((((((
- Attachments
-
- old_error.jpg (186.93 KiB) Viewed 4871 times
Re: Call signature does not match the function definition
I did a fresh install of the program without removing the previous installation - again, everything is OK, but now I'm afraid to change the setup of the project - error will appear again and bring a lot of problems over time or loss of the project??
Re: Call signature does not match the function definition
Now the algorithm works like this: reinstalled software worked fine --- --- change the settings (the algorithm of the error is not clear) --- get this error --- reinstalled software - everything is working again ---- in this mode is now reinstalled the software 5 time --- I do not know for how long my nerves enough )))))
Re: Call signature does not match the function definition
You might want try to increase optimization level to "One".
I had similar issues with __Lib_SoftUART.c:
It seems that optimization level of zero eliminates SSA optimization too.
here is my post... http://www.mikroe.com/forum/viewtopic.php?f=72&t=28182
I had similar issues with __Lib_SoftUART.c:
Code: Select all
Call signature does not match the function definition signature 'Delay_Cyc' __Lib_SoftUART.c
here is my post... http://www.mikroe.com/forum/viewtopic.php?f=72&t=28182
Re: Call signature does not match the function definition
today made a few changes in the project settings, get the old error, the compilation is not.
reinstall the program already installed on top, as before, does not help.
tried other projects - all in order.
why the compiler does not like my software, although an hour ago everything was ok??
reinstall the program already installed on top, as before, does not help.
tried other projects - all in order.
why the compiler does not like my software, although an hour ago everything was ok??