<div dir="ltr"><div>Hello all,<br><br>I am currently working on a FPGA Nexys3, I synthesized on it a processor Leon3, above which I put an OS RTEMS.<br><br>I faced a lot of difficulties developing RTEMS applications, so I decide to focus on<br>
interacting with the LEDs and switches of the Nexys3, but even this I can't seem to be able to implement. I think I understood the methods I had to use, and designed a little test of my own : <br><br>#include <rtems.h><br>
#include <gpiolib.h><br>#include <stdio.h><br>#include <stdlib.h><br><br>#define LED_ADR IO_L2P_CMPCLK<br><br>int main() {<br>    void * port;<br>    int val = 0;<br><br>    printf("Tentative d'ouverture du port\n");<br>
    gpiolib_initialize();<br>    port = gpiolib_open(LED_ADR);<br>    if (port == NULL) {<br>        printf("ok ça marche pas\n");<br>        exit(-1);<br>    }<br>    printf("Ouverture réussie\n");<br>
    printf("Tentative d'écriture dans le port\n");<br>    gpiolib_set(port,0,0);<br>    printf("Ecriture réussie\n");<br>    printf("Tentative de lecture du port\n");<br>    gpiolib_get(port, &val);<br>
    printf("Lecture réussie\n");<br>    printf("valeur du port %d\n", val);<br>    printf("Tentative d'écriture dans le port\n");<br>    gpiolib_set(port,1,0);<br>    printf("Ecriture réussie\n");<br>
    printf("Tentative de lecture du port\n");<br>    gpiolib_get(port, &val);<br>    printf("Lecture réussie\n");<br>    printf("valeur du port %d\n", val);<br>    printf("Tentative de fermeture du port\n");<br>
    gpiolib_close(port);<br>    printf("Fermeture réussie\n");<br><br>    return 0;<br>}<br><br>but I spent days trying to find out the adress of the ports I would like to open,<br>and searched all over the Internet (including all the available documentation),<br>
with no success.<br><br>I would really like it if someone were to help me.<br><br>Many thanks,<br> <br></div>Marjorie Dugrand<br></div>