AnsweredAssumed Answered

Compiling problems with bfin-uclinux-gcc

Question asked by Jorge68 on Sep 17, 2015
Latest reply on Sep 30, 2015 by Aaronwu

Hi everybody

 

I have some troubles with bfin-uclinux-gcc.

When I try to compile a program to configure GPIOs or another peripherals, I put:

 

bfin-uclinux-gcc -Wl,-elf2flt example.c -o example

 

I don't know if the GPIOs are not properly configured, but I'm still learning. However, it doesn't found the files.

 

#define CONFIG_BF537

 

#include <mach/cdefBF537.h>

 

#define SSYNC asm("ssync;")

 

int main()

{

    *pPORTH_FER = 0x0000; //El puerto H como GPIO

    SSYNC;

    *pPORTHIO_DIR = 0x8000; // El puerto H como Salida

    SSYNC;

    while (1)

    {

          *pPORTHIO = 0xFFFF; //Todo el puerto en Alto

          SSYNC;

          delayMS(500);

          *pPORTHIO = 0x0000;

          SSYNC;

          delayMS(500);

    }

}

Compiler's output:


example.c:3:28: error: mach/cdefBF537.h: No such file or directory

example.c: In function ‘main’:

example.c:10: error: ‘pPORTH_FER’ undeclared (first use in this function)

example.c:10: error: (Each undeclared identifier is reported only once

example.c:10: error: for each function it appears in.)

example.c:12: error: ‘pPORTHIO_DIR’ undeclared (first use in this function)

example.c:16: error: ‘pPORTHIO’ undeclared (first use in this function)

 

I'm new using microprocessors. I'm using uClinux-dist-2009R1.1-RC4 and a BF537.

 

I hope you can help me please.

 

Thank you.

 

Regards

Outcomes