This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Help!
- To: ecos-discuss at sources dot redhat dot com <ecos-discuss at sources dot redhat dot com>
- Subject: [ECOS] Help!
- From: windy <windy_yuan at 263 dot net>
- Date: Fri, 6 Apr 2001 14:42:22 +0800
We have ported ecos to our arm7 system.It seems work well,But division fail always confuses us.
the function which list below is my thread entry,I will create and execute it in cyg_user_start
void our_app1(int argc,char* argv[])
{
float numerator,denominator;
numerator = 4000;
denominator = 100;
numerator /= denominator; ==>every time step over here,gdb will report "bus error",Why?
}
Who can tell me why the gdb alway report bus error,and what should I do?
the function _simple_mkdate in wallclock.inl maybe miss a parentheses,doesn't it?
static void
_simple_mkdate(time_t time,
cyg_uint32* year, cyg_uint32* mon,
cyg_uint32* day, cyg_uint32* hour,
cyg_uint32* min, cyg_uint32* sec)
{
cyg_int32 days, hms, y, m, *dpm;
days = (cyg_int32) (time / (24*60*60));
hms = (cyg_int32) (time % (24*60*60));
// Nothing fancy about the time - no leap year magic involved
*sec = hms % 60;
*min = (hms % (60*60)) / 60;
*hour = hms / 60*60; ==============> *hour = hms/(60*60);
.....
}
Best regards
Windy