Author Topic: PWM_Examples.c problems  (Read 1493 times)

0 Members and 1 Guest are viewing this topic.

Offline scottad73Topic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
PWM_Examples.c problems
« on: July 29, 2010, 10:46:43 PM »
I also downloaded and tried to build the PWM_Examples project from the Demo Code for the AxonII.  I got the following errors:

Build started 29.7.2010 at 22:33:48
elds -fpack-struct -fshort-enums -MD -MP -MT PWM_Examples.o -MF dep/PWM_Examples.o.d  -c  ../PWM_Examples.c

../PWM_Examples.c: In function 'pwmInitHertz':
../PWM_Examples.c:47: error: expected declaration specifiers or '...' before '&' token
../PWM_Examples.c:47: error: expected declaration specifiers or '...' before numeric constant
../PWM_Examples.c:47: error: expected declaration specifiers or '...' before numeric constant
../PWM_Examples.c:47: error: expected declaration specifiers or '...' before '(' token
../PWM_Examples.c:48: error: expected declaration specifiers or '...' before '&' token
../PWM_Examples.c:48: error: expected declaration specifiers or '...' before numeric constant
../PWM_Examples.c:48: error: expected declaration specifiers or '...' before numeric constant
../PWM_Examples.c:48: error: expected declaration specifiers or '...' before '(' token
../PWM_Examples.c:48: error: redefinition of parameter 'pwmInitHertz'
../PWM_Examples.c:47: error: previous definition of 'pwmInitHertz' was here
../PWM_Examples.c:52: error: expected declaration specifiers before 'pwmSetDutyCycle'
../PWM_Examples.c:53: error: expected declaration specifiers before 'pwmSetDutyCycle'
../PWM_Examples.c:57: error: expected declaration specifiers before 'pwmInitDeciHertz'
../PWM_Examples.c:58: error: expected declaration specifiers before 'pwmInitDeciHertz'
../PWM_Examples.c:59: error: expected declaration specifiers before '}' token
../PWM_Examples.c:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../PWM_Examples.c:83: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../PWM_Examples.c:88: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../PWM_Examples.c:103: error: old-style parameter declarations in prototyped function definition
../PWM_Examples.c:101: error: expected '{' at end of input
../PWM_Examples.c:101: warning: no return statement in function returning non-void
../PWM_Examples.c: In function 'regular_PWM':
../PWM_Examples.c:101: error: expected declaration or statement at end of input
make: *** [PWM_Examples.o] Error 1
Build failed with 21 errors and 1 warnings...

I'm wondering if there is an error on my side some how, I made no modifications to the code or with the code.  I did replace the SoR_Utils.h file with the one you had linked to see if that would fix the problem but it did not.
Thank you for your help.

Offline scottad73Topic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: PWM_Examples.c problems
« Reply #1 on: July 29, 2010, 11:04:31 PM »
I forgot to mention that I am using the Webbotlib version 1.22

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: PWM_Examples.c problems
« Reply #2 on: July 30, 2010, 09:11:05 AM »
I just verified it still works fine under WebbotLib v1.22. There's something you aren't doing right . . .

Quote
I did replace the SoR_Utils.h file with the one you had linked to see if that would fix the problem but it did not.
PWM_Examples has no other file, its just a single .c . . . ;D

 


Get Your Ad Here

data_list