From: Michael S. <msc...@ba...> - 2001-04-19 13:51:23
|
Hi sdcc fellows, after a being busy with my broken thumb for a couple of weeks i am back on the list again. i was lucky able to compile sdcc again with the sources from april 16th. my last build was Jan. 29 1. good thing. the lastest build is very fast in execution. dramatically faster !!! yes ... 2. bad news it seems that there are a couple of strange problems with the resulting code. compiling it with version jan29 the code works fine. but with the current it does not. the projekt is too big to post it here and too much hw dependend, lots of ints ... statemachines ... i would like to help to find out what the problem with the current cvs version is. but i think i need a bit of advice what information i can give to you all. i compile the whole projekt with --stack-after-data --model-small --iram-size 256 --xram-loc 0xF400 --int-long-reent --compile-only also tried out the large model but no difference. strange behavior in both versions is, that it is getting more worse if i put the variables used in interrupts in idata except xdata. second, the following code does not wotk properly when using signed und unsigned xdata unsigned char ReceiveDataChar[8]; #define KonfigurationMinTemperatur -10 #define KonfigurationMaxTemperatur +60 if( ((signed char)ReceiveDataChar[0] < (signed char)ReceiveDataChar[1]) // This line does not work if negative values are used && ((signed char)ReceiveDataChar[0] >= (signed char)KonfigurationMinTemperatur) // This line works && ((signed char)ReceiveDataChar[1] <= (signed char)KonfigurationMaxTemperatur) // This line works too ) the problem here is that ReceiveDataChar[0] can be negative (-5) and ReceiveDataChar[1] positive (+50) and in this case the first line ((signed char)ReceiveDataChar[0] < (signed char)ReceiveDataChar[1]) guesse 0xFB(=-5) < 0x32(=+50) is false. even when using typecasting. this is the fact for all sdcc builds i have here. -- Dipl.-Ing. (FH) Michael Schmitt Baumer Ident GmbH Entwicklung / Development Department Hertzstr. 10 D-69469 Weinheim Deutschland / Germany Tel. +49 (0) 6201 9957 - 30 Fax. +49 (0) 6201 9957 - 99 E-Mail : msc...@ba... Web: http://www.baumerident.com |