[SOLVED] 'Symbol could not be resolved' in Eclipse

Applications, development tools, FPGA, C, WEB
amin
Posts: 54
Joined: Mon Feb 06, 2017 12:31 pm

Re: [SOLVED] 'Symbol could not be resolved' in Eclipse

Post by amin » Fri Mar 10, 2017 5:04 pm

i will arrange step by step again
i already make

Code: Select all

LIBS=-L/root/RedPitaya/api/lib/ -lm -lpthread -lrp
in makefile and save it

Code: Select all

cd /root/RedPitaya
make api
cd RedPitaya/Test/bode
rw
make bode
LD_LIBRARY_PATH=/opt/redpitaya/lib ./bode
scp bode root@192.168.11.5:/opt/redpitaya/bin/
ro
systemctl stop redpitaya_nginx.service
systemctl start redpitaya_nginxservice
when i want to start RP nginxservice appear this one

Code: Select all

Failed to start redpitaya_nginxservice.service: Unit redpitaya_nginxservice.service not found.

after that when i run using shell of eclipse using this code

Code: Select all

bode 1 0.5 0 1 1 100000 100000 1
appears this one

Code: Select all

bode: error while loading shared libraries: librp.so: cannot open shared object file: No such file or directory
of course when i generate using matlab also can not run.

that error appears when i put rp init and rp_Release() in inside of int main

Code: Select all

int main(int argc, char *argv[]) {     // Initialization of API
   if (rp_Init() != RP_OK) {
       fprintf(stderr, "Red Pitaya API init failed!\n");
      return EXIT_FAILURE;
   }
    rp_Release();
    return 1;
}
}

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: [SOLVED] 'Symbol could not be resolved' in Eclipse

Post by Nils Roos » Fri Mar 10, 2017 5:32 pm

The correct systemctl commands are

Code: Select all

systemctl stop redpitaya_nginx
systemctl start redpitaya_nginx
You have to use the prefix "LD_LIBRARY_PATH=/opt/redpitaya/lib " everytime you call the bode program.

amin
Posts: 54
Joined: Mon Feb 06, 2017 12:31 pm

Re: [SOLVED] 'Symbol could not be resolved' in Eclipse

Post by amin » Sat Mar 11, 2017 2:52 am

Thanks alot for your help.
this is new arrrangement

Edit bode .c
Save it

cd RedPitaya/Test/bode
rw
make bode
LD_LIBRARY_PATH=/opt/redpitaya/lib bode 1 0.5 0 1 1 100000 100000 1
and giving respon freq impedance and phase

scp bode root@192.168.11.5:/opt/redpitaya/bin/
need password "root"

ro
systemctl stop redpitaya_nginx
systemctl start redpitaya_nginx

as far as now is OK no problem.
i can generate bode.c using sweep and i can get impedance and phase correctly.

but LED bar cannot respon new code.
it is still indicating old LED bar blink.
i doing like your instruction i call 4 main part that are rp.h, initialization of API rp_Init, port or pin code, and rp_Release().

Code: Select all

#include "redpitaya/rp.h"
int main(int argc, char *argv[]) {
   // Initialization of API
      if (rp_Init() != RP_OK) {
          fprintf(stderr, "Red Pitaya API init failed!\n");
          return EXIT_FAILURE;
      }
 rp_DpinSetState(RP_LED0, RP_HIGH);
    rp_DpinSetState(RP_LED1, RP_HIGH);
    rp_DpinSetState(RP_LED2, RP_HIGH);
    rp_DpinSetState(RP_LED3, RP_HIGH);
    rp_DpinSetState(RP_LED4, RP_HIGH);
    rp_DpinSetState(RP_LED5, RP_HIGH);
    rp_DpinSetState(RP_LED6, RP_HIGH);
    rp_DpinSetState(RP_LED7, RP_HIGH);
    rp_Release();
    return 1;
}
should i change "return1" to " return EXIT_SUCCESS;"

amin
Posts: 54
Joined: Mon Feb 06, 2017 12:31 pm

Re: [SOLVED] 'Symbol could not be resolved' in Eclipse

Post by amin » Sat Mar 11, 2017 2:57 am

sorry i mean i add port code in "int main(int argc, char *argv[])" of bode.c like this:

Code: Select all

#include "redpitaya/rp.h"
............................
...................
int main(int argc, char *argv[]) {
............
.......
   // Initialization of API
      if (rp_Init() != RP_OK) {
          fprintf(stderr, "Red Pitaya API init failed!\n");
          return EXIT_FAILURE;
      }
...............
...........
 rp_DpinSetState(RP_LED0, RP_HIGH);
    rp_DpinSetState(RP_LED1, RP_HIGH);
    rp_DpinSetState(RP_LED2, RP_HIGH);
    rp_DpinSetState(RP_LED3, RP_HIGH);
    rp_DpinSetState(RP_LED4, RP_HIGH);
    rp_DpinSetState(RP_LED5, RP_HIGH);
    rp_DpinSetState(RP_LED6, RP_HIGH);
    rp_DpinSetState(RP_LED7, RP_HIGH);
    rp_Release();
    return 1;
}

amin
Posts: 54
Joined: Mon Feb 06, 2017 12:31 pm

Re: [SOLVED] 'Symbol could not be resolved' in Eclipse

Post by amin » Sat Mar 11, 2017 3:18 am

also i tried to control RP_DIO7_N in "int main(int argc, char *argv[])" is no respon or indicating high voltage (3V) in RP_DIO7_N.

Code: Select all

#include "redpitaya/rp.h"
............................
...................
int main(int argc, char *argv[]) {
............
.......
   // Initialization of API
      if (rp_Init() != RP_OK) {
          fprintf(stderr, "Red Pitaya API init failed!\n");
          return EXIT_FAILURE;
      }
...............
...........
          rp_DpinSetDirection (RP_DIO7_N, RP_OUT);
			rp_DpinSetState(RP_DIO7_N, RP_HIGH);
    rp_Release();
    return 1;
}
[/quote]

amin
Posts: 54
Joined: Mon Feb 06, 2017 12:31 pm

Re: [SOLVED] 'Symbol could not be resolved' in Eclipse

Post by amin » Sat Mar 11, 2017 4:37 am

when i run in eclipse 's shell , i can run correctly.
The port DIO7_N can delay corectly.

but when i run in matlab , it is still using old code. The port DIO7_N can not delay.
here is my code in matlab

Code: Select all

clear all;
close all;
clc

chanel = '1';
apmlitude = '0.5';
DC_bias = '0';
......................................
.........................

user = 'root';

ip = '192.168.11.5'; %change to your ip
command=['"C:\Program Files (x86)\PuTTY\plink" -l root -pw root ',ip,' "LD_LIBRARY_PATH=/opt/redpitaya/lib /opt/redpitaya/lib/bode ',chanel,' ',apmlitude,' ',DC_bias,' ',averaging,' ',steps,' ',start_freq,' ',stop_freq,' ',scale_type,'"'];
[c,data] = dos(command); 

amin
Posts: 54
Joined: Mon Feb 06, 2017 12:31 pm

Re: [SOLVED] 'Symbol could not be resolved' in Eclipse

Post by amin » Sat Mar 11, 2017 4:49 am

the problem is solved!!!
i change /opt...lib/bode to /opt...bin/bode

command=['"C:\Program Files (x86)\PuTTY\plink" -l root -pw root ',ip,' "LD_LIBRARY_PATH=/opt/redpitaya/lib /opt/redpitaya/bin/bode ',chanel,' ',apmlitude,' ',DC_bias,' ',averaging,' ',steps,' ',start_freq,' ',stop_freq,' ',scale_type,'"'];

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 72 guests