Liebe Kollegen! Ich versuche gerade eine Funktion auf meinem Microblaze Prozessor zu implememtieren. Leider scheitert es immer am Funktionsaufruf. Kann mir jemand weiterhelfen!? Fehler: /cygdrive/x/Microblaze_Test/ML605_MB_Test/Random_test/Random.c:103:2: warning: no newline at end of file /cygdrive/c/DOKUME~1/adi/LOKALE~1/Temp/cchnNATm.o: In function `main': /cygdrive/x/Microblaze_Test/ML605_MB_Test/Random_test/main.c:34: undefined reference to `gauss' collect2: ld returned 1 exit status make: *** [random_test/executable.elf] Error 1 ERROR:EDK - Error while running "make -f system.make init_bram". Return code = 2 main:
1 | #include <stdio.h> |
2 | #include <xgpio.h> |
3 | #include <xparameters.h> |
4 | //#include <xstatus.h>
|
5 | //#include <xgpio_l.h>
|
6 | |
7 | #define LED_ID XPAR_LEDS_8BIT_DEVICE_ID
|
8 | |
9 | #define LED_DELAY 5000
|
10 | |
11 | void gauss (); |
12 | |
13 | int idum; |
14 | int n; |
15 | |
16 | int main(void) |
17 | {
|
18 | print("*** Ready ***\r\n"); |
19 | XGpio led; |
20 | |
21 | |
22 | |
23 | double Delay; |
24 | int i = 0; |
25 | int j = 0x01; |
26 | |
27 | |
28 | XGpio_Initialize(&led, LED_ID); |
29 | XGpio_mSetDataDirection(XPAR_LEDS_8BIT_BASEADDR,1,0); //Set LEDS as output ports |
30 | |
31 | while(1) |
32 | {
|
33 | print("while(1) \r\n"); |
34 | XGpio_mSetDataReg(XPAR_LEDS_8BIT_BASEADDR,1,idum); |
35 | |
36 | idum = -XUartLite_RecvByte(XPAR_RS232_UART_1_BASEADDR); |
37 | gauss(); |
38 | n= n * 1000; |
39 | xil_printf (" calculated idum: %d \r\n", n); |
40 | //XGpio_DiscreteWrite(&led, 1, 0xAA);
|
41 | }
|
42 | return (0); |
43 | }
|
subroutine:
1 | void gauss() |
2 | |
3 | {
|
4 | extern n; |
5 | extern idum; |
6 | |
7 | // ... do something
|
8 | |
9 | return; |
10 | }
|
Bitte sagt mir was ich falsch mache!!!! LG Thomas