Help - Search - Members - Calendar
Full Version: Error of helloworld !!! help me!!!
Impulse Support Forums > Impulse Forums > Xilinx Platform Support
gc19861210
Trying to work through the helloworld tutorial and hit a snag while trying to "Build All User Applications" in EDK:

blink.gif
At Local date and time: Fri Jul 11 00:14:35 2008
xbash -q -c "cd /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/; /usr/bin/make -f system.make TestApp_Peripheral_program; exit;" started...
mb-gcc -O2 /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c -o TestApp_Peripheral/executable.elf \
-mno-xl-soft-mul -mxl-pattern-compare -mcpu=v7.00.b -Wl,-T -Wl,/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/TestApp_Peripheral/src/TestApp_Peripheral_LinkScr.ld -g -I./microblaze_0/include/ -ITestApp_Peripheral/src/ -L./microblaze_0/lib/ \

/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c:8:16: error: co.h: No such file or directory
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c:9:23: error: cosim_log.h: No such file or directory
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c:16: error: expected ')' before 'hello_in'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:18:16: error: co.h: No such file or directory
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:34: warning: parameter names (without types) in function declaration
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:35: warning: parameter names (without types) in function declaration
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'co_initialize'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:8:16: error: co.h: No such file or directory
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'co_initialize'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c: In function 'main':
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:17: error: 'co_architecture' undeclared (first use in this function)
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:17: error: (Each undeclared identifier is reported only once
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:17: error: for each function it appears in.)
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:17: error: expected ';' before 'arch'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:18: error: 'arch' undeclared (first use in this function)
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:21: error: expected ')' before ';' token
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:25: error: expected ';' before 'return'
make: *** [TestApp_Peripheral/executable.elf] Error 1
Done!

I guess I should include co.h so I include F:\CoDeveloper3\Include in the complier option ,but the new error show up :

At Local date and time: Fri Jul 11 00:16:16 2008
xbash -q -c "cd /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/; /usr/bin/make -f system.make TestApp_Peripheral_program; exit;" started...
mb-gcc -O2 /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c -o TestApp_Peripheral/executable.elf \
-mno-xl-soft-mul -mxl-pattern-compare -mcpu=v7.00.b -Wl,-T -Wl,/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/TestApp_Peripheral/src/TestApp_Peripheral_LinkScr.ld -g -I./microblaze_0/include/ -ITestApp_Peripheral/src/ -IF:/CoDeveloper3/Include -L./microblaze_0/lib/ \

In file included from F:/CoDeveloper3/Include/co.h:28,
from /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c:8:
F:/CoDeveloper3/Include/co_types.h:101: error: expected specifier-qualifier-list before 'pthread_t'
In file included from F:/CoDeveloper3/Include/co.h:28,
from /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:18:
F:/CoDeveloper3/Include/co_types.h:101: error: expected specifier-qualifier-list before 'pthread_t'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c: In function 'co_initialize':
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:48: error: 'HW_OUTPUT' undeclared (first use in this function)
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:48: error: (Each undeclared identifier is reported only once
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:48: error: for each function it appears in.)
In file included from F:/CoDeveloper3/Include/co.h:28,
from /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:8:
F:/CoDeveloper3/Include/co_types.h:101: error: expected specifier-qualifier-list before 'pthread_t'
make: *** [TestApp_Peripheral/executable.elf] Error 1
Done!

Thank you for your help!

Running:
Impulse 3.20
EDK 9.2
RalphBodenner
Hi,

The header files in C:\Impulse\CoDeveloper3\Include are meant for desktop simulation only. The second error you see is likely related to lack of a pthreads library for the MicroBlaze (threads are used in desktop simulation).

The header files (co.h, etc.) that should be used by the MicroBlaze software compile are exported to the "drivers\*\src" directory under your EDK project. Please take a look at the "Importing the Application Software" step of Tutorial 2: Complex FIR on EDK 9.2i. The HelloWorld tutorial is written for EDK 8.2i and is a little out of date with respect to this step of the process.

Regards,
Ralph
gc19861210
QUOTE (RalphBodenner @ Jul 10 2008, 10:50 AM) *
Hi,

The header files in C:\Impulse\CoDeveloper3\Include are meant for desktop simulation only. The second error you see is likely related to lack of a pthreads library for the MicroBlaze (threads are used in desktop simulation).

The header files (co.h, etc.) that should be used by the MicroBlaze software compile are exported to the "drivers\*\src" directory under your EDK project. Please take a look at the "Importing the Application Software" step of Tutorial 2: Complex FIR on EDK 9.2i. The HelloWorld tutorial is written for EDK 8.2i and is a little out of date with respect to this step of the process.

Regards,
Ralph





thanks,but after I have done as Tutorial 2 :include F:/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/drivers/fsl_hello_v1_00_a/src

the errors show as blow:
At Local date and time: Fri Jul 11 03:41:56 2008
xbash -q -c "cd /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/; /usr/bin/make -f system.make TestApp_Peripheral_program; exit;" started...
mb-gcc -O2 /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c /cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c -o TestApp_Peripheral/executable.elf \
-mno-xl-soft-mul -mxl-pattern-compare -mcpu=v7.00.b -Wl,-T -Wl,/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/TestApp_Peripheral/src/TestApp_Peripheral_LinkScr.ld -g -I./microblaze_0/include/ -ITestApp_Peripheral/src/ -IF:/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/drivers/fsl_hello_v1_00_a/src -L./microblaze_0/lib/ \
-DMICROBLAZE
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/cc2dluES.o: In function `hear_hello':
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c:27: undefined reference to `co_stream_read'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld_sw.c:28: undefined reference to `co_stream_close'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccoFpKAg.o: In function `co_initialize':
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:42: undefined reference to `co_type_create'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:42: undefined reference to `co_stream_create'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:43: undefined reference to `co_process_create'
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/co_init.c:43: undefined reference to `co_stream_attach'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccv4elQm.o: In function `main':
/cygdrive/f/CoDeveloper3/Examples/Embedded/HelloWorld_MicroBlaze/EDK/code/HelloWorld.c:17: undefined reference to `co_execute'
collect2: ld returned 1 exit status
make: *** [TestApp_Peripheral/executable.elf] Error 1
Done!

it just can't find the library of impulseC ,
but it dose not work after i include F:\CoDeveloper3\Libraries (contains impulsec.dll and impulsc.lib),can you tell me where can I find the lib?

thanks a lot .


Regards,
gc19861210
meix
Hi,

I built a HelloWorld MicroBlaze EDK project, and got the same errors as yours.

For the errors of not finding "co_stream_read" and "co_stream_close", there is some mismatch between the source code and the co.h file. Please add the following line to your co.h file:
#define co_stream_close(stream)

In your HelloWorld_sw.c file, please add the following line:
int32 err;

And also replace the "co_stream_read(hello_in, $hi, sizeof(int));" with the following line:
HW_STREAM_READ(hear_hello, hello_in, hi, err);

I tried to add the required Impulse C driver source code to the project sources:
EDK/drivers/fsl_hello_v1_00/src/co_stream.c
EDK/drivers/fsl_hello_v1_00/src/co_process.c
EDK/drivers/fsl_hello_v1_00/src/co_type.c

The above temporary steps will make the software make errors gone. We'll try to eliminate these bugs in the future release.

Regards,

Mei
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.