



tarun
by tarunbunkar on Jan 7, 2015 |
tarunbunkar
Posts: 6 Joined: May 14, 2014 Last seen: Jul 18, 2015 |
||
hi all,
i am trying to implement embescom application note 6 but during the initial setup iam getting this error. or32-linux-gcc -mhard-div -O2 -c -o support.o support.c In file included from support.c:8:0: support.h:45:20: error: macro "putc" requires 2 arguments, but only 1 given support.h:45:6: error: �putc� redeclared as different kind of symbol make[2]: *** [support.o] Error 1 can anyone help me.... |
RE: tarun
by jeremybennett on Jan 7, 2015 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
hi all,
i am trying to implement embescom application note 6 but during the initial setup iam getting this error. or32-linux-gcc -mhard-div -O2 -c -o support.o support.c In file included from support.c:8:0: support.h:45:20: error: macro "putc" requires 2 arguments, but only 1 given support.h:45:6: error: ������¢���¯���¿���½���¯���¿���½putc������¢���¯���¿���½���¯���¿���½ redeclared as different kind of symbol make[2]: *** [support.o] Error 1 can anyone help me.... Hi Tarun Yuk. This shouldn't happen. This is a bare metal application, so must define all its own functions. This should be fine, but somehow it is picking up the system definition of putc (which is a macro). I suspect the problem is in the conditional code for the OpenRISC. You'll see that support.c has the code: #if OR1K /* Register access macros */ #define REG8(add) *((volatile unsigned char *)(add)) #define REG16(add) *((volatile unsigned short *)(add)) #define REG32(add) *((volatile unsigned long *)(add)) void printf(const char *fmt, ...); /* For writing into SPR. */ void mtspr(unsigned long spr, unsigned long value); /* For reading SPR. */ unsigned long mfspr(unsigned long spr); #else /* OR1K */ #include #endif /* OR1K */ I can only think that OR1K is not getting defined by the compiler, so stdio.h is being included. Try explicitly definining this: or32-linux-gcc -DOR1K -mhard-div -O2 -c -o support.o support.c This is quite an old application note, using an obsolete version of SystemC, so you may need to fix some of the SystemC code if interfaces have changed. HTH Jeremy |
RE: tarun
by tarunbunkar on Jan 9, 2015 |
tarunbunkar
Posts: 6 Joined: May 14, 2014 Last seen: Jul 18, 2015 |
||
hi jeremy
thanks for ur reply.. i have included -DOR1K in the make file of both support and dhry folder, make file of support folder is bulding properly but i am getting this error while runnig the make file of dhry folder. make[2]: Leaving directory `/home/openrisc/embecosm-esp5-or1k-verilator-1.0/local/sw/support' cd dhry && make make[2]: Entering directory `/home/openrisc/embecosm-esp5-or1k-verilator-1.0/local/sw/dhry' or32-linux-ld -T ../support/orp.ld dhry-O0.o ../support/reset-nocache.o ../support/libsupport.a -o dhry-nocache-O0.or32 ../support/reset-nocache.o: In function `_start': (.text+0xe8): undefined reference to `_reset' ../support/reset-nocache.o: In function `_start': (.text+0xec): undefined reference to `_reset' make[2]: *** [dhry-nocache-O0] Error 1 make[2]: Leaving directory `/home/openrisc/embecosm-esp5-or1k-verilator-1.0/local/sw/dhry' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/openrisc/embecosm-esp5-or1k-verilator-1.0/local/sw' make: *** [software] Error 2 |
RE: tarun
by tarunbunkar on Jan 9, 2015 |
tarunbunkar
Posts: 6 Joined: May 14, 2014 Last seen: Jul 18, 2015 |
||
hi jeremy
i have configuered the earlier problem i sent but now i am facing this problem.... make[1]: Leaving directory `/home/openrisc/embecosm-esp5-or1k-verilator-1.0/local/sw' cd sim/src && rm -f flash.in cd sim/src && ln -s ../../local/sw/dhry/dhry-icdc-O2.hex flash.in cd verilator-model && time -p make make[1]: Entering directory `/home/openrisc/embecosm-esp5-or1k-verilator-1.0/verilator-model' Makefile:121: OrpsocAccess.d: No such file or directory Makefile:121: TraceSC.d: No such file or directory Makefile:122: Vorpsoc_fpga_top__ALLcls.d: No such file or directory Makefile:122: Vorpsoc_fpga_top__ALLsup.d: No such file or directory make[1]: *** No rule to make target `verilator_bin', needed by `Vorpsoc_fpga_top__ver.d'. Stop. make[1]: Leaving directory `/home/openrisc/embecosm-esp5-or1k-verilator-1.0/verilator-model' Command exited with non-zero status 2 real 0.04 user 0.00 sys 0.00 make: *** [model] Error |
RE: tarun
by jeremybennett on Jan 12, 2015 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
Hi Tarun,
There is a problem with building the verilator model. I'd look at the detailed error message inside the verilator-model directory. HTH, Jeremy |



