Shop OBEX P1 Docs P2 Docs Learn Events
Dhrystone demo: sys/times.h? — Parallax Forums

Dhrystone demo: sys/times.h?

RaymanRayman Posts: 14,665
edited 2013-03-23 12:53 in Propeller 1
I'm trying to build the dhrystone demo from the command line, but get this:
E:\Propeller2\VisualStudio\Demos_P1\Dhrystone>propeller-elf-gcc.exe -o a.out -Os
 -mcmm -I . -fno-exceptions *.c
dry.c:415:23: fatal error: sys/times.h: No such file or directory
compilation terminated.

Any ideas?

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-23 10:53
    Rayman wrote: »
    I'm trying to build the dhrystone demo from the command line, but get this:
    E:\Propeller2\VisualStudio\Demos_P1\Dhrystone>propeller-elf-gcc.exe -o a.out -Os
     -mcmm -I . -fno-exceptions *.c
    dry.c:415:23: fatal error: sys/times.h: No such file or directory
    compilation terminated.
    

    Any ideas?
    The Makefile in propgcc/demos/dhrystone also includes the following on the command line:
    -Dprintf=__simple_printf -DMSC_CLOCK -DINTEGER_ONLY -DFIXED_NUMBER_OF_PASSES=3000
    
    Maybe those are required to get it to compile on the Propeller?
  • RaymanRayman Posts: 14,665
    edited 2013-03-23 11:00
    Ok, that helped, I should have looked closer at the makefile...

    but now, I get this:

    D:\Propeller2\VisualStudio\Demos_P1\Dhrystone>propeller-elf-gcc.exe -o a.out -Os
    -mcmm -I . -Dprintf=__simple_printf -DMSC_CLOCK -DINTEGER_ONLY -DFIXED_NUMBER_
    OF_PASSES=3000 -fno-exceptions *.c
    dry.c:514:18: warning: conflicting types for built-in function 'malloc' [enabled
    by default]
    dry.c: In function 'main':
    dry.c:589:3: warning: incompatible implicit declaration of built-in function 'st
    rcpy' [enabled by default]
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `_Proc_3':
    (.text+0x36): undefined reference to `_Proc_7'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `_Proc_1':
    (.text+0x77): undefined reference to `_Proc_6'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `_Proc_1':
    (.text+0x86): undefined reference to `_Proc_7'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x1aa): undefined reference to `_Func_2'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x1c9): undefined reference to `_Proc_7'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x1e8): undefined reference to `_Proc_8'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x201): undefined reference to `_Func_1'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x211): undefined reference to `_Proc_6'
    collect2: ld returned 1 exit status
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-23 11:06
    Rayman wrote: »
    Ok, that helped, I should have looked closer at the makefile...

    but now, I get this:

    D:\Propeller2\VisualStudio\Demos_P1\Dhrystone>propeller-elf-gcc.exe -o a.out -Os
    -mcmm -I . -Dprintf=__simple_printf -DMSC_CLOCK -DINTEGER_ONLY -DFIXED_NUMBER_
    OF_PASSES=3000 -fno-exceptions *.c
    dry.c:514:18: warning: conflicting types for built-in function 'malloc' [enabled
    by default]
    dry.c: In function 'main':
    dry.c:589:3: warning: incompatible implicit declaration of built-in function 'st
    rcpy' [enabled by default]
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `_Proc_3':
    (.text+0x36): undefined reference to `_Proc_7'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `_Proc_1':
    (.text+0x77): undefined reference to `_Proc_6'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `_Proc_1':
    (.text+0x86): undefined reference to `_Proc_7'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x1aa): undefined reference to `_Func_2'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x1c9): undefined reference to `_Proc_7'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x1e8): undefined reference to `_Proc_8'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x201): undefined reference to `_Func_1'
    C:\Users\Ray\AppData\Local\Temp\ccUDeEbg.o: In function `.L21':
    (.text+0x211): undefined reference to `_Proc_6'
    collect2: ld returned 1 exit status
    Where did you get this copy of dry.c? Is it from propgcc/demos/dhrystone?
  • RaymanRayman Posts: 14,665
    edited 2013-03-23 11:09
    yes, that's where I got it from...
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-23 11:11
    Rayman wrote: »
    yes, that's where I got it from...
    Actually, I think Steve had the right advice. Look at the Makefile. It turns out that it also uses "-DPASS2" during the build of dry1.c and dry2.c. That may be a factor. In any case, the Makefile works so you need to do whatever it does.
  • RaymanRayman Posts: 14,665
    edited 2013-03-23 11:25
    figured it out looking at the makefile... There is only dry.c, but it builds it 2 different ways:
    [FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]del a.out
    propeller-elf-gcc.exe -c dry.c -o dry1.o -O0 -mlmm -mfcache -I . -Dprintf=__simple_printf  -DMSC_CLOCK -DINTEGER_ONLY -DFIXED_NUMBER_OF_PASSES=3000 -fno-exceptions 
    propeller-elf-gcc.exe -c dry.c -o dry2.o -O0 -mlmm -mfcache -I . -DPASS2 -Dprintf=__simple_printf  -DMSC_CLOCK -DINTEGER_ONLY -DFIXED_NUMBER_OF_PASSES=3000 -fno-exceptions 
    propeller-elf-gcc.exe -o a.out dry1.o dry2.o
    propeller-elf-size[/SIZE][/FONT][/SIZE][/FONT]
    
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-23 11:28
    Rayman wrote: »
    figured it out looking at the makefile... There is only dry.c, but it builds it 2 different ways:
    [FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]del a.out
    propeller-elf-gcc.exe -c dry.c -o dry1.o -O0 -mlmm -mfcache -I . -Dprintf=__simple_printf  -DMSC_CLOCK -DINTEGER_ONLY -DFIXED_NUMBER_OF_PASSES=3000 -fno-exceptions 
    propeller-elf-gcc.exe -c dry.c -o dry2.o -O0 -mlmm -mfcache -I . -DPASS2 -Dprintf=__simple_printf  -DMSC_CLOCK -DINTEGER_ONLY -DFIXED_NUMBER_OF_PASSES=3000 -fno-exceptions 
    propeller-elf-gcc.exe -o a.out dry1.o dry2.o
    propeller-elf-size[/SIZE][/FONT][/SIZE][/FONT]
    
    Steve was right, the makefile *did* reveal all!
  • RaymanRayman Posts: 14,665
    edited 2013-03-23 11:32
    Ok, done with that one, but now I have trouble with fft demo... hate to start a new thread, so maybe I'll ask here...
    Here's the output:

    D:\Propeller2\VisualStudio\Demos_P1\fft>propeller-elf-gcc.exe -o a.out -Os -mfca
    che -mlmm -I . -fno-exceptions *.c
    C:\Users\Ray\AppData\Local\Temp\ccSnIsUu.o: In function `_time_ms':
    (.text+0xc): undefined reference to `_getcnt'
    collect2: ld returned 1 exit status

    don't see anything in the makefile that might help me here...
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-23 12:44
    Rayman wrote: »
    Ok, done with that one, but now I have trouble with fft demo... hate to start a new thread, so maybe I'll ask here...
    Here's the output:

    D:\Propeller2\VisualStudio\Demos_P1\fft>propeller-elf-gcc.exe -o a.out -Os -mfca
    che -mlmm -I . -fno-exceptions *.c
    C:\Users\Ray\AppData\Local\Temp\ccSnIsUu.o: In function `_time_ms':
    (.text+0xc): undefined reference to `_getcnt'
    collect2: ld returned 1 exit status

    don't see anything in the makefile that might help me here...
    This may be caused by a mismatch between the demo sources you're using and the version of GCC that came with SimpleIDE. The getcnt inline function was added recently to smooth over the differences between P1 and P2.
  • RaymanRayman Posts: 14,665
    edited 2013-03-23 12:53
    You're right... I thought this computer had the new propgcc, but it didn't...
Sign In or Register to comment.