Shop OBEX P1 Docs P2 Docs Learn Events
Should demos/toggle/lmm_toggle/toggle.c compile w/ -mcog option? — Parallax Forums

Should demos/toggle/lmm_toggle/toggle.c compile w/ -mcog option?

mindrobotsmindrobots Posts: 6,506
edited 2011-11-18 19:03 in Propeller 1
If any of the examples would, I thought the lmm_toggle version might. when I try, I get errors.
rick@linux-server:~/demos/toggle/lmm_toggle$ propeller-elf-gcc -o toggle-cog.elf -mcog toggle.c
/usr/local/propeller/lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: cannot find crt_cog.o: No such file or directory
/usr/local/propeller/lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: cannot find crtend_cog.o: No such file or directory
collect2: ld returned 1 exit status
rick@linux-server:~/demos/toggle/lmm_toggle$

does something need to be done in the c source to set up or indicate the cog memory model is going to be the target?

There's a crt0_cog.s in the libraries but no crt_cog.s - I'm not sure where to go from here.

If lmm_toggle won't go into a COG model, I'd like to come up with a toggle program that would.

Help!

Thanks!

Comments

  • ersmithersmith Posts: 6,100
    edited 2011-11-18 18:50
    The intention was that you could compile programs using just propeller-elf-gcc -mcog, but there are some bugs in the alpha release that prevent that (the library makefile, and also the driver program). It's possible to work around these bugs by using an explicit linker script -- see for example the fibo/cog demo. We should have these bugs fixed soon.

    Thanks,
    Eric
    mindrobots wrote: »
    If any of the examples would, I thought the lmm_toggle version might. when I try, I get errors.
    rick@linux-server:~/demos/toggle/lmm_toggle$ propeller-elf-gcc -o toggle-cog.elf -mcog toggle.c
    /usr/local/propeller/lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: cannot find crt_cog.o: No such file or directory
    /usr/local/propeller/lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: cannot find crtend_cog.o: No such file or directory
    collect2: ld returned 1 exit status
    rick@linux-server:~/demos/toggle/lmm_toggle$
    

    does something need to be done in the c source to set up or indicate the cog memory model is going to be the target?

    There's a crt0_cog.s in the libraries but no crt_cog.s - I'm not sure where to go from here.

    If lmm_toggle won't go into a COG model, I'd like to come up with a toggle program that would.

    Help!

    Thanks!
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-11-18 19:03
    Thanks, Eric!

    That'll work!
Sign In or Register to comment.