I located the source of the problem in timetable.h.
* int i;*
int t1, t2;
t1 = t2 = t->size;
for(i = *t->ptr - 1; i >= 0; --i) {
* if(t->timestamps[i].id == id1) {*
t1 = i;
break;
}
}
I see that the array dereference would use multiplication with the int
i. I don't understand why this cause an assertion failure.
Any thoughts?
Anthony Asterisk wrote:
Hello sdcc-users,
I recently started using sdcc. I'm working on porting contiki-OS to an
8051 based system. I downloaded the latest source code (10-28-09)
compiled and installed, but when I compile contiki I get an assertion
failure in convilong.
The assertion message and compilation flags are:
sdcc -DCONTIKI_TARGET_WGN_BRIONE -DBRIONE_VER=4 -DBRIONE_DEV_VER=3
-DBRIONE_EXP_ENABLE -DBRIONE_LED_DISABLE -DBRIONE_LIGHT_SENSOR_DISABLE
-DBRIONE_BUTTONS_DISABLE --std-c99 --model-large --stack-auto
-DSDCC_CC2430 -DRIME_CONF_NO_POLITE_ANNOUCEMENTS -I.
-I../../platform/wgn-brione/. -I../../platform/wgn-brione/dev
-I../../cpu/cc2430/. -I../../cpu/cc2430/dev -I../../core/dev
-I../../core/lib -I../../core/net -I../../core/net/mac
-I../../core/net/rime -I../../core/net/routing -I../../core/sys
-I../../core/cfs -I../../core/ctk -I../../core/lib/ctk
-I../../core/loader -I../../core/. -c ../../core/sys/timetable.c -o
obj_wgn-brione/timetable.o
sdcc: SDCCopt.c:707: convilong: Assertion `0' failed. Caught signal 6:
SIGABRT
make: *** [obj_wgn-brione/timetable.o] Error 1
sdcc -v shows:
u...@instant-contiki:~/contiki-2.x/examples/accel_demo$ sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.9.4 #5556 (Oct 29 2009) (UNIX)
I'm attaching timetable.c and various header files as a zip, I don't
see any mult, div, or mod functions. I see only pointer dereferences (*).
Any advice you can give for a workaround would be greatly appreciated.
Anthony*
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user