pinMode PWM: Unable to do this when using /dev/gpiomem. Try sudo? [message #1852166] |
Tue, 03 May 2022 06:15  |
Eclipse User |
|
|
|
Hello,
since several weeks I try to find any solution for my problem.
I created an application using eclipse 2022-03 CDT. It works perfect!
a big compliment to the designers of eclipse.
After some time I got eclips running on a Windows machine using a toolchain for a raspberry pi.
Debugging for remote application works perfect.
But when I try to run an application where I use wiringpi then I get a problem where I havn't find any solution at all.
I use this code :
pinMode(motor_l_u, OUTPUT);
pinMode(motor_l_v, OUTPUT);
pinMode(motor_r_u, OUTPUT);
pinMode(motor_r_v, OUTPUT);
.....
pinMode(motor_l_u, PWM_OUTPUT);
pinMode(motor_l_v, PWM_OUTPUT);
pinMode(motor_r_u, PWM_OUTPUT);
pinMode(motor_r_v, PWM_OUTPUT);
Executing the first lines makes no problem.
But when I to try execute the lines
pinMode(motor_l_u, PWM_OUTPUT);
pinMode(motor_l_v, PWM_OUTPUT);
pinMode(motor_r_u, PWM_OUTPUT);
pinMode(motor_r_v, PWM_OUTPUT);
I get this error:
pinMode PWM: Unable to do this when using /dev/gpiomem. Try sudo?
Child exited with status 1
logout
Sometimes I think there is no way to debug such a programm when it needs wiringPi.
When I run the application on a console as normal user I get the same error.
When I run this application on a console typing
then it works.
Is there really no solution available?
I'm almost very frustrated because eclipse is a wonderfull IDE but without debugging such an appliation it's not usefull.
Kurt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04004 seconds