2007-02-16 01:06 AM
Porting function HIWARE to Cosmic: help!
2007-02-14 02:31 AM
Hi,
I have old project in Hiware C. I want traslate it in Cosmic C. I have same problem with this function defined in Hiware: void Rampa (volatile unsigned int *PWM); and used in main: Rampa(&DCR0); The problem is that in Hiware DCR0 is: #define DCR0 (*(volatile unsigned int *)(0x17)) and in Cosmic is: volatile int DCR0 @0x17; Cosmic show this error in Rampa(&DCR0): #error cpst7 interrupt_vector.c:227(12+4) incompatible argument type Thanks for your help!2007-02-14 09:24 PM
change
void Rampa (volatile unsigned int *PWM); to void Rampa (volatile int *PWM); and it should work fine. Of course you can also do it the other way around (add unsigned into DCR0 definition) Regards, Luca (Cosmic) PS: in case you have not seen it yet, might be useful for you.[ This message was edited by: _luca on 15-02-2007 10:57 ]2007-02-15 02:01 AM
Thanks for your help!
Now the compiler show: #error clnk Debug\new3.lkf:1 symbol c_xlcmp not defined (Debug\interrupt_vector.o ) I can post my interrupt code if it's necessary! Thanks2007-02-15 07:46 PM
2007-02-16 01:06 AM
Thanks for your help! :)
I use small memory model, my micro is ST7LITE19 In Project-->Setting-->Linker--> I have try to insert: \COSMIC\CXST7_16K\Lib\libm.st7 and default crtsx.st7 but I have alwais the same error: Running ST7 linker clnk -lD:\Programmi\COSMIC\CXST7_16K\Lib -o Debug\new3.st7 -mDebug\new3.map Debug\new3.lkf #error clnk Debug\new3.lkf:1 symbol c_xlcmp not defined (Debug\interrupt_vector.o ) #error clnk Debug\new3.lkf:1 symbol c_lreg not defined (Debug\interrupt_vector.o ) #error clnk Debug\new3.lkf:1 symbol c_uitol not defined (Debug\interrupt_vector.o ) The command: ''clnk -lD:\Programmi\COSMIC\CXST7_16K\Lib -o Debug\new3.st7 -mDebug\new3.map Debug\new3.lkf '' has failed, the returned value is: 1 exit code=1. :o :| Thanks [ This message was edited by: marcomarco on 20-02-2007 10:15 ]