This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems with port to Hitex HiCO.SH-4 board.


Hello,

I am busy with an eCos port of the Hitex HiCO.SH-4 board (Hitachi SH7750 
processor).  My problem is that Redboot freezes during startup, as seen by 
the captured output below.

---------8<---------------------------------8<--------------
+
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v2_0 - built 12:12:54, Jul 21 2003

Platform: HiCO.SH-4 (SH7750)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x
---------8<---------------------------------8<--------------

I traced to freese to the diag.cxx file. Now the strange part is the program 
hangs in either of the following two pieces of code: 

In function: diag_write_long_num(..)
...
/* construct digits into buffer in reverse order */
if( n == 0 ) buf[bpos++] = '0';
else while ( n != 0 )
{
	cyg_ucount8 d = n % base;
	buf[bpos++] = digits[d];
	n /= base;
}
...  <<---- never gets here


In function: _cvt(..)
...
if (val == 0) {
	/* Special case */
	*cp++ = ' 0';
} else {
	while (val) {
		*cp++ = digits[val % radix];
		val /= radix;
	}
}
...  <<---- never gets here

Does anybody have any hints about what is going on here?  

It looks to me that the division operation is not working propperly and that 
the variable never reaches zero.  The SH7750 chip has a floating point unit.  
Can it be that the gcc compiler is using floating point division?  The value 
would get smaller, but never reaches zero.   How do I fix this?

Cheers
	Francois
-- 
Francois Retief
Tel. (021) 808-4472
http://www.esl.ee.sun.ac.za
ESL, Dept. E&E Engineering
Stellenbosch University


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]