Problem with random function in CM530

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
2 postsPage 1 of 1
2 postsPage 1 of 1

Problem with random function in CM530

Post by zboroujeni » Wed Sep 23, 2015 2:03 pm

Post by zboroujeni
Wed Sep 23, 2015 2:03 pm

Hello,

I am trying to run random function with CM530. I configured my work space as link below. I work with eclipse -OS: windows 7.
http://support.robotis.com/en/software/embeded_c/cm530.htm
I can compile me program successfully. But when I run the program at CM530, it hangs on line :
Code: Select all
int a=rand();

Do you have any idea how can I solve the problem?
I change also my makefile and add -mfpu=vfp -msoft-float in COMPILE_OPTS.
I tried also to compile the program with arm-non-eabi as line below suggested:
http://forums.trossenrobotics.com/showthread.php?6039-Math-h-lib-with-Bioloid-CM-530-and-C
But the same problem occurred. It hangs on line rand() function.

Thank you in advance for your help and considerations.
Best,
Zargol
Hello,

I am trying to run random function with CM530. I configured my work space as link below. I work with eclipse -OS: windows 7.
http://support.robotis.com/en/software/embeded_c/cm530.htm
I can compile me program successfully. But when I run the program at CM530, it hangs on line :
Code: Select all
int a=rand();

Do you have any idea how can I solve the problem?
I change also my makefile and add -mfpu=vfp -msoft-float in COMPILE_OPTS.
I tried also to compile the program with arm-non-eabi as line below suggested:
http://forums.trossenrobotics.com/showthread.php?6039-Math-h-lib-with-Bioloid-CM-530-and-C
But the same problem occurred. It hangs on line rand() function.

Thank you in advance for your help and considerations.
Best,
Zargol
zboroujeni
Newbie
Newbie
Posts: 1
Joined: Mon Aug 16, 2010 7:56 am

Re: Problem with random function in CM530

Post by andrefleitao » Mon Oct 05, 2015 9:27 am

Post by andrefleitao
Mon Oct 05, 2015 9:27 am

Hi

Have you tried using srand instead of rand?

http://infocenter.arm.com/help/index.js ... _srand.htm

andrefleitao
Hi

Have you tried using srand instead of rand?

http://infocenter.arm.com/help/index.js ... _srand.htm

andrefleitao
andrefleitao
Newbie
Newbie
Posts: 4
Joined: Wed Jul 01, 2015 9:55 am


2 postsPage 1 of 1
2 postsPage 1 of 1
cron