Page 1 of 1

Trouble with Led program

Posted: Thu Jan 06, 2022 11:48 pm
by retro-guy
Hi I am a newbie in programing and redpitaya and am trying to get a test program to work my redpitaya but have problems with compiling ,program in in c.


root@rp-f074d8:~# gcc -o led_button led_button.c
/tmp/ccDGKETk.o: In function `main':
led_button.c:(.text+0x3e): undefined reference to `rp_Init'
led_button.c:(.text+0x72): undefined reference to `rp_DpinSetState'
led_button.c:(.text+0x84): undefined reference to `rp_DpinSetState'
led_button.c:(.text+0x9c): undefined reference to `rp_Release'
collect2: error: ld returned 1 exit status
root@rp-f074d8:~#

Anyone can help ?

Re: Trouble with Led program

Posted: Fri Jan 07, 2022 11:59 am
by lucien.miara
Hi,
I think you need to link the redpitaya api when you compile your program.
Here is the documentation page on how to make C applications : https://redpitaya.readthedocs.io/en/lat ... /comC.html
Regards,
Lucien