Round missing from math.h?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Am I doing something wrong, it appears that math.h is missing round. Are these higher level math functions hidden in some other library?

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum!

   

You need to set in

   

Creator -> Project -> Build Settings -> Linker  the "Additional Libraries" to "m" (Yes, just the letter 'm')

   

 

   

Happy coding

   

Bob

View solution in original post

0 Likes
9 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum!

   

You need to set in

   

Creator -> Project -> Build Settings -> Linker  the "Additional Libraries" to "m" (Yes, just the letter 'm')

   

 

   

Happy coding

   

Bob

0 Likes
Anonymous
Not applicable

That doesn't appear to be an option. I hadn't realised that PSoC creator doesn't directly imply a compiler. I'm guessing Keil 9.51 isn't C99 capable.

0 Likes
Anonymous
Not applicable

I really tried to attach this image:

   

   

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

No, I guess I'll just resolve to live in the 90s

0 Likes

In the 90ths??? The 8051 design was made in 1980!!! So it is a little bit oldish, see here

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Keil have had 17 years to update their compiler. It appears that it's still a supported toolchain.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Consider switching to a more modern PSoC family as PSoC5 which has got an ARM M3 core and uses gcc. Fewer problems (apart from some new ones), faster, cleaner. Same components, only trouble is from different endianess between 8051 and M3.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Brand new design, but the board designer laughed at the idea of using a PSoC5. The amount of time we'd have saved if we'd insisted.

0 Likes