From jpdi at free.fr Fri Jan 11 00:42:53 2008 From: jpdi at free.fr (jpdi) Date: Fri Jan 11 00:57:23 2008 Subject: [Icc-mot] Icc12-V7, XDP512, Xgate... In-Reply-To: <46B64EB0.1010807@rjlsystems.com> Message-ID: <20080111084256.67BC31AB2E0@smtp1-g19.free.fr> Hello ! Here are some questions about ICC12 V7, XDP512, and NoIce debugger 1?) strange page numbers ------------------------ I used paged functions with ICC12 V6 (pro version), and Richard helped me very well some time ago about that. Under DP256, it was OK (pages where 0x30 ) Now, with ICC12V7 and XDP512, in a very little program, compiler reports me some paged functions for example in 20:8000, that pages are inexistent in XDP512, where pages begin at 0xE0, if I'm correct about XDP512. 2?) problem in XDP512 config ? ------------------------------ An other question : Select of XDP512 processor reports - Program memory 0x4000.0x7fff:... the rest not visible but I suppose OK (0x4000.0x7fff:0xC000.0xFFFF) - Data memory 0x0800 seems to be incorrect, because RAM for XDP512 begins at 0x1000, which is paged RAM, RAM non paged beginning at 0x2000 - Stack pointer 0x4000 (correct) Do anybody knows how to change the value of data memory in the XDP512 config ? (of course, I can use "custom" device too, but using different devices, it seems to better to modify XDP512 config...) 3?) trying an other config -------------------------- Edward Karpicz sends me (thanks to him !) by the net XGate prog to evaluate system... Configuration is Device : custom Program Memory : 0x4000.0x7fff:0xc000.0xfeff Data memory : 0x2000 Stack pointer : 0x4000 Expanded Memory Enable, expanded mem checked, make paged function default too, Addr : 0x790000.0x7fffff Other options : -bXFLASH:0x780800.0x787fff I suppose these address are in global address format ? When I use configuration above, the compiler/linker reports me (in the map file) a function for example in E4:8000, which seems to be correct for XDP512, but NoIce debugger doesn?t flash anything in that location, so program crashes, because there is no code... Do anybody can help me about all these things ? Still working for XGate developpement... It seems there are no many samples about it (under ICC12 V7), except those from Edward Karpicz ? I try to develop that kind of samples too... With all my thanks. Best regards Joel Petrique From ekarpicz at freemail.lt Fri Jan 11 02:41:57 2008 From: ekarpicz at freemail.lt (Edward Karpicz) Date: Fri Jan 11 03:30:41 2008 Subject: [Icc-mot] Icc12-V7, XDP512, Xgate... References: <20080111084256.67BC31AB2E0@smtp1-g19.free.fr> Message-ID: <002901c8543e$972b4500$0400a8c0@edvardo> Hi Joel, 1) Regarding strange page numbers. It may be related to *global* addresses I used to specify xgate and expanded memory areas. Maybe linker overflows somewhere. I'm not sure about it, but I remember I saw something like this somewhere in the past. See below about this. I'm sorry for not working example I sent you. Finally, after a year long timeout, I tried to rebuild it :-) and I start to remember that I did it because Richard asked for simple one. You probably don't know that before Imagecraft released beta of XGATE asm, I did some xgateasm.inc file, that consisted of assembler macros emulating XGATE instructions. For example .macro _CSEM .if (@0 & 0x8000) .word 0x00F1+((@0 & 7)<<8) ; CSEM RS .else .word 0x00F0+((@0 & 7)<<8) ; CSEM #IMM .endif .endmacro was used to be able to compile XGATE CSEM instruction in old ias6812. Code in my example is 100%. Unfortunately there's not only a lack of ICC linker support for XGATE, but also XGATE asm is still buggy. I converted my example back to use macros but that didn't fix the things. xgate.o file looked bit strange for me. Definitely it should contain more code than I see in the asm output: XH H 2 areas 0 global symbols M xgate.s A text size 0 flags 0 A XFLASH size 1F4 flags 80 T 01 09 00 F2 00 FA E0 6B E3 7B F4 80 54 02 R 00 00 00 I removed .cpu xgate directive and it compiled to proper o file XH H 2 areas 0 global symbols M xgate.s A text size 0 flags 0 A XFLASH size 1F4 flags 80 T 01 E0 09 E4 00 37 F2 00 FA E0 6B 40 E3 01 7B 40 R 00 00 00 01 T 01 EE F4 80 54 20 02 00 R 00 00 00 01 I'll try to send you xgateasm.inc and macroed version of XGATE code. 2) regarding IDE buildin settings template. It would be nice if it would be user-editable. I nearly always use custom settings because standard settings never suit my needs. It is always useful to specify the upper end of RAM area, leaving some space for stack. It's nice when linker errors you in case your app asks for more then available. It's also useful to specify upper border of text area below the vectors => it's also nice when linker erros you when your code starts overwriting vectors etc etc. 3) regarding addresses. You are right, 0x780000 is a global address. if you divide it by 0x4000 to get PPAGE (and the most of debuggers and bootloaders should do so), you will get 0x1E0. Writing this 0x1E0 to PPAGE is the same as writing 0xE0 , because PPAGE is 8-bits wide register. But maybe NoICE will fail setting breakpoints on global addresses? I don't know, but it should be able to flash the target. Didn't you mix DP512 with XDP512 in NoICE? You can try using linear addresses, linear = global - 0x400000. For example 0x780000->0x380000. Edward ----- Original Message ----- From: "jpdi" To: "'Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you are a member of this.'" Sent: Friday, January 11, 2008 10:42 AM Subject: [Icc-mot] Icc12-V7, XDP512, Xgate... Hello ! Here are some questions about ICC12 V7, XDP512, and NoIce debugger 1?) strange page numbers ------------------------ I used paged functions with ICC12 V6 (pro version), and Richard helped me very well some time ago about that. Under DP256, it was OK (pages where 0x30.) Now, with ICC12V7 and XDP512, in a very little program, compiler reports me some paged functions for example in 20:8000, that pages are inexistent in XDP512, where pages begin at 0xE0, if I'm correct about XDP512. 2?) problem in XDP512 config ? ------------------------------ An other question : Select of XDP512 processor reports - Program memory 0x4000.0x7fff:... the rest not visible but I suppose OK (0x4000.0x7fff:0xC000.0xFFFF) - Data memory 0x0800 seems to be incorrect, because RAM for XDP512 begins at 0x1000, which is paged RAM, RAM non paged beginning at 0x2000 - Stack pointer 0x4000 (correct) Do anybody knows how to change the value of data memory in the XDP512 config ? (of course, I can use "custom" device too, but using different devices, it seems to better to modify XDP512 config...) 3?) trying an other config -------------------------- Edward Karpicz sends me (thanks to him !) by the net XGate prog to evaluate system... Configuration is Device : custom Program Memory : 0x4000.0x7fff:0xc000.0xfeff Data memory : 0x2000 Stack pointer : 0x4000 Expanded Memory Enable, expanded mem checked, make paged function default too, Addr : 0x790000.0x7fffff Other options : -bXFLASH:0x780800.0x787fff I suppose these address are in global address format ? When I use configuration above, the compiler/linker reports me (in the map file) a function for example in E4:8000, which seems to be correct for XDP512, but NoIce debugger doesn't flash anything in that location, so program crashes, because there is no code... Do anybody can help me about all these things ? Still working for XGate developpement... It seems there are no many samples about it (under ICC12 V7), except those from Edward Karpicz ? I try to develop that kind of samples too... With all my thanks. Best regards Joel Petrique _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot >> From dieseinfo at free.fr Fri Jan 11 04:31:08 2008 From: dieseinfo at free.fr (dieseinfo) Date: Fri Jan 11 04:45:38 2008 Subject: [Icc-mot] Icc12-V7, XDP512, Xgate... In-Reply-To: <002901c8543e$972b4500$0400a8c0@edvardo> Message-ID: <20080111123112.68B0F1AB2AC@smtp1-g19.free.fr> Thanks, Edward. I'll try again. Sure, after the start difficulties, it will be ok ! It seems you don't use NoIce ? I had no problem with Icc12V6 and NoIce, for dp256 processor. For the moment, with Xdp512... I'm locked. After your help; I think I understand XGate now. Not so difficult, at all ! About linker, which doesn't accept global variable for XGate... it's not a problem to modify XGate source in order to put addresses of global variables used. The sample you send me seems very simple to modify vectors tables (I plan to put there address of global variable used by the thread) For the moment, in fact, I've no problem about XGate, but with the team ICC12-Xdp512-NoIce... I asked John Hartman (NoIce) about that. Sure, when I'll be able to burn flash (and paged flash), I'll can go on. Best regard, Have a nice week-end. Joel > -----Message d'origine----- > De?: icc-mot-bounces@imagecraft.com [mailto:icc-mot- > bounces@imagecraft.com] De la part de Edward Karpicz > Envoy??: vendredi 11 janvier 2008 11:42 > ??: Discussion List for ICC08/11/12/16 users. You do NOT need > tosubscribetoicc-announce if you are a member of this. > Objet?: Re: [Icc-mot] Icc12-V7, XDP512, Xgate... > > Hi Joel, > > > 1) Regarding strange page numbers. It may be related to *global* addresses > I > used to specify xgate and expanded memory areas. Maybe linker overflows > somewhere. I'm not sure about it, but I remember I saw something like this > somewhere in the past. See below about this. > > I'm sorry for not working example I sent you. Finally, after a year long > timeout, I tried to rebuild it :-) and I start to remember that I did it > because Richard asked for simple one. You probably don't know that before > Imagecraft released beta of XGATE asm, I did some xgateasm.inc file, that > consisted of assembler macros emulating XGATE instructions. For example > > .macro _CSEM > .if (@0 & 0x8000) > .word 0x00F1+((@0 & 7)<<8) ; CSEM RS > .else > .word 0x00F0+((@0 & 7)<<8) ; CSEM #IMM > .endif > .endmacro > > was used to be able to compile XGATE CSEM instruction in old ias6812. Code > in my example is 100%. Unfortunately there's not only a lack of ICC linker > support for XGATE, but also XGATE asm is still buggy. > > I converted my example back to use macros but that didn't fix the things. > xgate.o file looked bit strange for me. Definitely it should contain more > code than I see in the asm output: > > XH > H 2 areas 0 global symbols > M xgate.s > A text size 0 flags 0 > A XFLASH size 1F4 flags 80 > T 01 09 00 F2 00 FA E0 6B E3 7B F4 80 54 02 > R 00 00 00 > > I removed .cpu xgate directive and it compiled to proper o file > > XH > H 2 areas 0 global symbols > M xgate.s > A text size 0 flags 0 > A XFLASH size 1F4 flags 80 > T 01 E0 09 E4 00 37 F2 00 FA E0 6B 40 E3 01 7B 40 > R 00 00 00 01 > T 01 EE F4 80 54 20 02 00 > R 00 00 00 01 > > > > I'll try to send you xgateasm.inc and macroed version of XGATE code. > > > > > 2) regarding IDE buildin settings template. It would be nice if it would > be > user-editable. I nearly always use custom settings because standard > settings > never suit my needs. It is always useful to specify the upper end of RAM > area, leaving some space for stack. It's nice when linker errors you in > case > your app asks for more then available. It's also useful to specify upper > border of text area below the vectors => it's also nice when linker erros > you when your code starts overwriting vectors etc etc. > > > > 3) regarding addresses. You are right, 0x780000 is a global address. > > if you divide it by 0x4000 to get PPAGE (and the most of debuggers and > bootloaders should do so), you will get 0x1E0. Writing this 0x1E0 to PPAGE > is the same as writing 0xE0 , because PPAGE is 8-bits wide register. But > maybe NoICE will fail setting breakpoints on global addresses? I don't > know, > but it should be able to flash the target. Didn't you mix DP512 with > XDP512 > in NoICE? You can try using linear addresses, linear = global - 0x400000. > For example 0x780000->0x380000. > > > Edward > > > > > ----- Original Message ----- > From: "jpdi" > To: "'Discussion List for ICC08/11/12/16 users. You do NOT need > tosubscribetoicc-announce if you are a member of this.'" > > Sent: Friday, January 11, 2008 10:42 AM > Subject: [Icc-mot] Icc12-V7, XDP512, Xgate... > > > Hello ! > > Here are some questions about ICC12 V7, XDP512, and NoIce debugger > > 1?) strange page numbers > ------------------------ > > I used paged functions with ICC12 V6 (pro version), and Richard helped me > very well some time ago about that. Under DP256, it was OK (pages where > 0x30.) > > Now, with ICC12V7 and XDP512, in a very little program, compiler reports > me > some paged functions for example in 20:8000, that pages are inexistent in > XDP512, where pages begin at 0xE0, if I'm correct about XDP512. > > > 2?) problem in XDP512 config ? > ------------------------------ > An other question : > > Select of XDP512 processor reports > - Program memory 0x4000.0x7fff:... the rest not visible but I suppose OK > (0x4000.0x7fff:0xC000.0xFFFF) > - Data memory 0x0800 seems to be incorrect, because RAM for XDP512 begins > at > 0x1000, which is paged RAM, RAM non paged beginning at 0x2000 > - Stack pointer 0x4000 (correct) > > Do anybody knows how to change the value of data memory in the XDP512 > config > ? (of course, I can use "custom" device too, but using different devices, > it > seems to better to modify XDP512 config...) > > 3?) trying an other config > -------------------------- > Edward Karpicz sends me (thanks to him !) by the net XGate prog to > evaluate > system... > > Configuration is > Device : custom > Program Memory : 0x4000.0x7fff:0xc000.0xfeff > Data memory : 0x2000 > Stack pointer : 0x4000 > Expanded Memory Enable, expanded mem checked, make paged function default > too, Addr : 0x790000.0x7fffff > Other options : -bXFLASH:0x780800.0x787fff > > I suppose these address are in global address format ? > > When I use configuration above, the compiler/linker reports me (in the map > file) a function for example in E4:8000, which seems to be correct for > XDP512, but NoIce debugger doesn't flash anything in that location, so > program crashes, because there is no code... > > > Do anybody can help me about all these things ? > Still working for XGate developpement... It seems there are no many > samples > about it (under ICC12 V7), except those from Edward Karpicz ? I try to > develop that kind of samples too... > > With all my thanks. > Best regards > > Joel Petrique > > > > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > >> > > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot From richard at imagecraft.com Tue Jan 15 18:59:02 2008 From: richard at imagecraft.com (Richard Man) Date: Tue Jan 15 19:14:00 2008 Subject: [Icc-mot] ICC12 7.03B BETA0 Message-ID: <200801160313.m0G3DxVQ055832@dragonsgate2.imagecraft.com> Just a minor update to fix missing unsigned to FP conversion code: http://www.imagecraft.com/pub/iccv712_v703b_beta0.exe V7.03B - Jan 20th, 2008 Compiler - 7.03A did not generate calls to "uint2fp" for unsigned to FP conversion Header Files - the DP512 header file was incorrect. // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] From r.streubel at emtec-papertest.de Mon Jan 21 05:52:13 2008 From: r.streubel at emtec-papertest.de (Rene Streubel) Date: Mon Jan 21 06:07:49 2008 Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 2 In-Reply-To: <44A528985CB14FD78280C87196E79D37@emtecpapertest.de> References: <44A528985CB14FD78280C87196E79D37@emtecpapertest.de> Message-ID: <5E16A8B8AB324E459B5E98E98C6659B915D741@server.emtec-papertest.de> Problem with fround and/or fp conversion in ICC12 V7.03B Hello! I converted a project from ICC V6 to V7 and have now the following problems. I use a HCS12DP512. In V6 all works well. Now the programm crashes (hang up) during the use of the "fround" function. for example: #define p_runden 16 #define psi_to_mbar 68.948 #define ad_lsb 4.8828125 signed int get_pressure(unsigned char p_ch) { unsigned int i,i_temp; i_temp=0; for (i=0 ;i0) { data_out=(signed long)(data_in+0.5); } return data_out; } Without the "if" statement it works well and does not crash! signed long fround(float data_in) { signed long data_out; { data_out=(signed long)(data_in+0.5); } return data_out; } Please help, Otherwise I cant use the new ICC12V7. Regards Rene -------------------------------------------------- Ren? Streubel Research & Development Emtec Electronic GmbH / Germany E-mail: r.streubel@emtec-papertest.de -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of icc-mot-request@imagecraft.com Sent: Wednesday, January 16, 2008 10:01 PM To: icc-mot@imagecraft.com Subject: Icc-mot Digest, Vol 41, Issue 2 Send Icc-mot mailing list submissions to icc-mot@imagecraft.com To subscribe or unsubscribe via the World Wide Web, visit http://dragonsgate.net/mailman/listinfo/icc-mot or, via email, send a message with subject or body 'help' to icc-mot-request@imagecraft.com You can reach the person managing the list at icc-mot-owner@imagecraft.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Icc-mot digest..." Today's Topics: 1. ICC12 7.03B BETA0 (Richard Man) ---------------------------------------------------------------------- Message: 1 Date: Tue, 15 Jan 2008 18:59:02 -0800 From: Richard Man Subject: [Icc-mot] ICC12 7.03B BETA0 To: icc-mot@imagecraft.com Message-ID: <200801160313.m0G3DxVQ055832@dragonsgate2.imagecraft.com> Content-Type: text/plain; charset="us-ascii"; format=flowed Just a minor update to fix missing unsigned to FP conversion code: http://www.imagecraft.com/pub/iccv712_v703b_beta0.exe V7.03B - Jan 20th, 2008 Compiler - 7.03A did not generate calls to "uint2fp" for unsigned to FP conversion Header Files - the DP512 header file was incorrect. // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] ------------------------------ _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot End of Icc-mot Digest, Vol 41, Issue 2 ************************************** From ekarpicz at freemail.lt Tue Jan 22 00:53:17 2008 From: ekarpicz at freemail.lt (Edward Karpicz) Date: Tue Jan 22 01:08:01 2008 Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 2 References: <44A528985CB14FD78280C87196E79D37@emtecpapertest.de> <5E16A8B8AB324E459B5E98E98C6659B915D741@server.emtec-papertest.de> Message-ID: <000601c85cd4$3b6c6200$0400a8c0@edvardo> Rene, I tried both, your get_pressure function (except aduconv is undefined) and your own fround. And these seem being working. Did you try to reproduce this problem in some simpler program? Maybe fround chokes on some special values? What arguments you are passing to fround? You say it was OK using V6 to call fround from interrupt. Using FP from both, interrupts and main thread, or using preemptive RTOS and FP in different tasks, you had to save/restore FP context. Using V7 you don't have to save/restore FP context since V7 FP emulation doesn't use static variables and is reentrant. I don't know if it matters but I see a type in your settings: Program Memory: 0x4000.0x7FFF:**0xC00**.0xEFFF Edward ----- Original Message ----- From: "Rene Streubel" To: Sent: Monday, January 21, 2008 3:52 PM Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 2 Problem with fround and/or fp conversion in ICC12 V7.03B Hello! I converted a project from ICC V6 to V7 and have now the following problems. I use a HCS12DP512. In V6 all works well. Now the programm crashes (hang up) during the use of the "fround" function. for example: #define p_runden 16 #define psi_to_mbar 68.948 #define ad_lsb 4.8828125 signed int get_pressure(unsigned char p_ch) { unsigned int i,i_temp; i_temp=0; for (i=0 ;i0) { data_out=(signed long)(data_in+0.5); } return data_out; } Without the "if" statement it works well and does not crash! signed long fround(float data_in) { signed long data_out; { data_out=(signed long)(data_in+0.5); } return data_out; } Please help, Otherwise I cant use the new ICC12V7. Regards Rene -------------------------------------------------- Ren? Streubel Research & Development Emtec Electronic GmbH / Germany E-mail: r.streubel@emtec-papertest.de -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of icc-mot-request@imagecraft.com Sent: Wednesday, January 16, 2008 10:01 PM To: icc-mot@imagecraft.com Subject: Icc-mot Digest, Vol 41, Issue 2 Send Icc-mot mailing list submissions to icc-mot@imagecraft.com To subscribe or unsubscribe via the World Wide Web, visit http://dragonsgate.net/mailman/listinfo/icc-mot or, via email, send a message with subject or body 'help' to icc-mot-request@imagecraft.com You can reach the person managing the list at icc-mot-owner@imagecraft.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Icc-mot digest..." Today's Topics: 1. ICC12 7.03B BETA0 (Richard Man) ---------------------------------------------------------------------- Message: 1 Date: Tue, 15 Jan 2008 18:59:02 -0800 From: Richard Man Subject: [Icc-mot] ICC12 7.03B BETA0 To: icc-mot@imagecraft.com Message-ID: <200801160313.m0G3DxVQ055832@dragonsgate2.imagecraft.com> Content-Type: text/plain; charset="us-ascii"; format=flowed Just a minor update to fix missing unsigned to FP conversion code: http://www.imagecraft.com/pub/iccv712_v703b_beta0.exe V7.03B - Jan 20th, 2008 Compiler - 7.03A did not generate calls to "uint2fp" for unsigned to FP conversion Header Files - the DP512 header file was incorrect. // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] ------------------------------ _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot End of Icc-mot Digest, Vol 41, Issue 2 ************************************** _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From r.streubel at emtec-papertest.de Wed Jan 23 02:19:03 2008 From: r.streubel at emtec-papertest.de (Rene Streubel) Date: Wed Jan 23 02:34:48 2008 Subject: [Icc-mot] fround problem / fp conversion In-Reply-To: <1AEB201DCEC7418EBB8FE00F981E2EF1@emtecpapertest.de> References: <1AEB201DCEC7418EBB8FE00F981E2EF1@emtecpapertest.de> Message-ID: <5E16A8B8AB324E459B5E98E98C6659B915D798@server.emtec-papertest.de> I tried to reduce the function: If the function have to round an unsigned value, so it is OK: signed int get_pressure2(unsigned char p_ch) { return froundf(abs(-101.85)); } But, if the function have to round a signed value, it crashes: signed int get_pressure2(unsigned char p_ch) { return froundf(-101.85); } I checked my Program Memory. I had a mistake in my email. The correct settings in my project are: Program Memory: 0x4000.0x7FFF:0xC000.0xEFFF My complete program needs pages 20..23 Is there a problem with the memory mapping? I wrote about my own fround function and that it crahes with the if statement inside. There is the same thing. If it is signed in the if statement it crashes. Without the if statement it not crashes. I think there is a problem with the signed fp conversion / emulation. Richard wrotes about the 7.03 Beta0 and that the compiler did not generate calls to "uint2fp" for unsigned to FP conversion. Maybe there is now a new bug with any conversion? What should I do? Rene -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of icc-mot-request@imagecraft.com Sent: Tuesday, January 22, 2008 9:01 PM To: icc-mot@imagecraft.com Subject: Icc-mot Digest, Vol 41, Issue 4 Send Icc-mot mailing list submissions to icc-mot@imagecraft.com To subscribe or unsubscribe via the World Wide Web, visit http://dragonsgate.net/mailman/listinfo/icc-mot or, via email, send a message with subject or body 'help' to icc-mot-request@imagecraft.com You can reach the person managing the list at icc-mot-owner@imagecraft.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Icc-mot digest..." Today's Topics: 1. Re: RE: Icc-mot Digest, Vol 41, Issue 2 (Edward Karpicz) ---------------------------------------------------------------------- Message: 1 Date: Tue, 22 Jan 2008 10:53:17 +0200 From: "Edward Karpicz" Subject: Re: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 2 To: "Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribe toicc-announce if you are a member of this." Message-ID: <000601c85cd4$3b6c6200$0400a8c0@edvardo> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Rene, I tried both, your get_pressure function (except aduconv is undefined) and your own fround. And these seem being working. Did you try to reproduce this problem in some simpler program? Maybe fround chokes on some special values? What arguments you are passing to fround? You say it was OK using V6 to call fround from interrupt. Using FP from both, interrupts and main thread, or using preemptive RTOS and FP in different tasks, you had to save/restore FP context. Using V7 you don't have to save/restore FP context since V7 FP emulation doesn't use static variables and is reentrant. I don't know if it matters but I see a type in your settings: Program Memory: 0x4000.0x7FFF:**0xC00**.0xEFFF Edward ----- Original Message ----- From: "Rene Streubel" To: Sent: Monday, January 21, 2008 3:52 PM Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 2 Problem with fround and/or fp conversion in ICC12 V7.03B Hello! I converted a project from ICC V6 to V7 and have now the following problems. I use a HCS12DP512. In V6 all works well. Now the programm crashes (hang up) during the use of the "fround" function. for example: #define p_runden 16 #define psi_to_mbar 68.948 #define ad_lsb 4.8828125 signed int get_pressure(unsigned char p_ch) { unsigned int i,i_temp; i_temp=0; for (i=0 ;i0) { data_out=(signed long)(data_in+0.5); } return data_out; } Without the "if" statement it works well and does not crash! signed long fround(float data_in) { signed long data_out; { data_out=(signed long)(data_in+0.5); } return data_out; } Please help, Otherwise I cant use the new ICC12V7. Regards Rene -------------------------------------------------- Ren? Streubel Research & Development Emtec Electronic GmbH / Germany E-mail: r.streubel@emtec-papertest.de -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of icc-mot-request@imagecraft.com Sent: Wednesday, January 16, 2008 10:01 PM To: icc-mot@imagecraft.com Subject: Icc-mot Digest, Vol 41, Issue 2 Send Icc-mot mailing list submissions to icc-mot@imagecraft.com To subscribe or unsubscribe via the World Wide Web, visit http://dragonsgate.net/mailman/listinfo/icc-mot or, via email, send a message with subject or body 'help' to icc-mot-request@imagecraft.com You can reach the person managing the list at icc-mot-owner@imagecraft.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Icc-mot digest..." Today's Topics: 1. ICC12 7.03B BETA0 (Richard Man) ---------------------------------------------------------------------- Message: 1 Date: Tue, 15 Jan 2008 18:59:02 -0800 From: Richard Man Subject: [Icc-mot] ICC12 7.03B BETA0 To: icc-mot@imagecraft.com Message-ID: <200801160313.m0G3DxVQ055832@dragonsgate2.imagecraft.com> Content-Type: text/plain; charset="us-ascii"; format=flowed Just a minor update to fix missing unsigned to FP conversion code: http://www.imagecraft.com/pub/iccv712_v703b_beta0.exe V7.03B - Jan 20th, 2008 Compiler - 7.03A did not generate calls to "uint2fp" for unsigned to FP conversion Header Files - the DP512 header file was incorrect. // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] ------------------------------ _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot End of Icc-mot Digest, Vol 41, Issue 2 ************************************** _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot ------------------------------ _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot End of Icc-mot Digest, Vol 41, Issue 4 ************************************** From ekarpicz at freemail.lt Wed Jan 23 03:20:48 2008 From: ekarpicz at freemail.lt (Edward Karpicz) Date: Wed Jan 23 03:35:33 2008 Subject: [Icc-mot] fround problem / fp conversion References: <1AEB201DCEC7418EBB8FE00F981E2EF1@emtecpapertest.de> <5E16A8B8AB324E459B5E98E98C6659B915D798@server.emtec-papertest.de> Message-ID: <001001c85db2$01764870$0400a8c0@edvardo> Both get_pressure2() variants seem to work me :-(. Do you have #include in your code? Regarding your own fround: signed long fround(float data_in) { signed long data_out; if (data_in>0) { data_out=(signed long)(data_in+0.5); } return data_out; } 1) when data_in is negative or zero, data_out is undefined 2) if you included math.h, then it should complain about redefining fround. fround should return float, not signed long. BTW is fround a standard C function? 3) without valid fround prototype you not only should get a warning about missing prototype, but also it's expected to hang. Functions returning longs and floats, such functions are pushing return value to the stack. Callee has to pull return value from stack. Without valid prototype, any function is assumed to be defined as int foo(int). It wouldn't hang if fround was returning int/short/char/void and signed variants of <=16bits wide return types. Also, is include path pointing to V7 include folder? Edward ----- Original Message ----- From: "Rene Streubel" To: Sent: Wednesday, January 23, 2008 12:19 PM Subject: [Icc-mot] fround problem / fp conversion I tried to reduce the function: If the function have to round an unsigned value, so it is OK: signed int get_pressure2(unsigned char p_ch) { return froundf(abs(-101.85)); } But, if the function have to round a signed value, it crashes: signed int get_pressure2(unsigned char p_ch) { return froundf(-101.85); } I checked my Program Memory. I had a mistake in my email. The correct settings in my project are: Program Memory: 0x4000.0x7FFF:0xC000.0xEFFF My complete program needs pages 20..23 Is there a problem with the memory mapping? I wrote about my own fround function and that it crahes with the if statement inside. There is the same thing. If it is signed in the if statement it crashes. Without the if statement it not crashes. I think there is a problem with the signed fp conversion / emulation. Richard wrotes about the 7.03 Beta0 and that the compiler did not generate calls to "uint2fp" for unsigned to FP conversion. Maybe there is now a new bug with any conversion? What should I do? Rene -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of icc-mot-request@imagecraft.com Sent: Tuesday, January 22, 2008 9:01 PM To: icc-mot@imagecraft.com Subject: Icc-mot Digest, Vol 41, Issue 4 Send Icc-mot mailing list submissions to icc-mot@imagecraft.com To subscribe or unsubscribe via the World Wide Web, visit http://dragonsgate.net/mailman/listinfo/icc-mot or, via email, send a message with subject or body 'help' to icc-mot-request@imagecraft.com You can reach the person managing the list at icc-mot-owner@imagecraft.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Icc-mot digest..." Today's Topics: 1. Re: RE: Icc-mot Digest, Vol 41, Issue 2 (Edward Karpicz) ---------------------------------------------------------------------- Message: 1 Date: Tue, 22 Jan 2008 10:53:17 +0200 From: "Edward Karpicz" Subject: Re: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 2 To: "Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribe toicc-announce if you are a member of this." Message-ID: <000601c85cd4$3b6c6200$0400a8c0@edvardo> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Rene, I tried both, your get_pressure function (except aduconv is undefined) and your own fround. And these seem being working. Did you try to reproduce this problem in some simpler program? Maybe fround chokes on some special values? What arguments you are passing to fround? You say it was OK using V6 to call fround from interrupt. Using FP from both, interrupts and main thread, or using preemptive RTOS and FP in different tasks, you had to save/restore FP context. Using V7 you don't have to save/restore FP context since V7 FP emulation doesn't use static variables and is reentrant. I don't know if it matters but I see a type in your settings: Program Memory: 0x4000.0x7FFF:**0xC00**.0xEFFF Edward ----- Original Message ----- From: "Rene Streubel" To: Sent: Monday, January 21, 2008 3:52 PM Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 2 Problem with fround and/or fp conversion in ICC12 V7.03B Hello! I converted a project from ICC V6 to V7 and have now the following problems. I use a HCS12DP512. In V6 all works well. Now the programm crashes (hang up) during the use of the "fround" function. for example: #define p_runden 16 #define psi_to_mbar 68.948 #define ad_lsb 4.8828125 signed int get_pressure(unsigned char p_ch) { unsigned int i,i_temp; i_temp=0; for (i=0 ;i0) { data_out=(signed long)(data_in+0.5); } return data_out; } Without the "if" statement it works well and does not crash! signed long fround(float data_in) { signed long data_out; { data_out=(signed long)(data_in+0.5); } return data_out; } Please help, Otherwise I cant use the new ICC12V7. Regards Rene -------------------------------------------------- Ren? Streubel Research & Development Emtec Electronic GmbH / Germany E-mail: r.streubel@emtec-papertest.de -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of icc-mot-request@imagecraft.com Sent: Wednesday, January 16, 2008 10:01 PM To: icc-mot@imagecraft.com Subject: Icc-mot Digest, Vol 41, Issue 2 Send Icc-mot mailing list submissions to icc-mot@imagecraft.com To subscribe or unsubscribe via the World Wide Web, visit http://dragonsgate.net/mailman/listinfo/icc-mot or, via email, send a message with subject or body 'help' to icc-mot-request@imagecraft.com You can reach the person managing the list at icc-mot-owner@imagecraft.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Icc-mot digest..." Today's Topics: 1. ICC12 7.03B BETA0 (Richard Man) ---------------------------------------------------------------------- Message: 1 Date: Tue, 15 Jan 2008 18:59:02 -0800 From: Richard Man Subject: [Icc-mot] ICC12 7.03B BETA0 To: icc-mot@imagecraft.com Message-ID: <200801160313.m0G3DxVQ055832@dragonsgate2.imagecraft.com> Content-Type: text/plain; charset="us-ascii"; format=flowed Just a minor update to fix missing unsigned to FP conversion code: http://www.imagecraft.com/pub/iccv712_v703b_beta0.exe V7.03B - Jan 20th, 2008 Compiler - 7.03A did not generate calls to "uint2fp" for unsigned to FP conversion Header Files - the DP512 header file was incorrect. // richard On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ] ------------------------------ _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot End of Icc-mot Digest, Vol 41, Issue 2 ************************************** _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot ------------------------------ _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot End of Icc-mot Digest, Vol 41, Issue 4 ************************************** _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From richard-lists at imagecraft.com Wed Jan 30 01:23:47 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Wed Jan 30 01:39:38 2008 Subject: [Icc-mot] fround problem / fp conversion In-Reply-To: <001001c85db2$01764870$0400a8c0@edvardo> References: <1AEB201DCEC7418EBB8FE00F981E2EF1@emtecpapertest.de> <5E16A8B8AB324E459B5E98E98C6659B915D798@server.emtec-papertest.de> <001001c85db2$01764870$0400a8c0@edvardo> Message-ID: <200801300939.m0U9daGj060899@dragonsgate2.imagecraft.com> As with Edward, I can't reproduce this problem. Whatever it is, I don't think it's related to uint2fp or signed int to FP conversion..? At 03:20 AM 1/23/2008, Edward Karpicz wrote: >Both get_pressure2() variants seem to work me :-(. Do you have > >#include > >in your code? > > >Regarding your own fround: > >signed long fround(float data_in) >{ >signed long data_out; >if (data_in>0) >{ > data_out=(signed long)(data_in+0.5); >} >return data_out; >} > >1) when data_in is negative or zero, data_out is undefined >2) if you included math.h, then it should complain about redefining >fround. fround should return float, not signed long. BTW is fround a >standard C function? >3) without valid fround prototype you not only should get a warning >about missing prototype, but also it's expected to hang. Functions >returning longs and floats, such functions are pushing return value >to the stack. Callee has to pull return value from stack. Without >valid prototype, any function is assumed to be defined as int >foo(int). It wouldn't hang if fround was returning >int/short/char/void and signed variants of <=16bits wide return types. > >Also, is include path pointing to V7 include folder? > >Edward > > > >----- Original Message ----- From: "Rene Streubel" > >To: >Sent: Wednesday, January 23, 2008 12:19 PM >Subject: [Icc-mot] fround problem / fp conversion > > >I tried to reduce the function: >If the function have to round an unsigned value, so it is OK: > >signed int get_pressure2(unsigned char p_ch) >{ >return froundf(abs(-101.85)); >} > >But, if the function have to round a signed value, it crashes: > >signed int get_pressure2(unsigned char p_ch) >{ >return froundf(-101.85); >} > >I checked my Program Memory. I had a mistake in my email. The >correct settings in my project are: >Program Memory: 0x4000.0x7FFF:0xC000.0xEFFF >My complete program needs pages 20..23 Is there a problem with the >memory mapping? > >I wrote about my own fround function and that it crahes with the if >statement inside. >There is the same thing. If it is signed in the if statement it >crashes. Without the if statement it not crashes. I think there is a >problem with the signed fp conversion / emulation. > >Richard wrotes about the 7.03 Beta0 and that the compiler did not >generate calls to "uint2fp" for unsigned to FP conversion. Maybe >there is now a new bug with any conversion? > >What should I do? > >Rene > > > >- // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) From r.streubel at emtec-papertest.de Wed Jan 30 23:56:51 2008 From: r.streubel at emtec-papertest.de (Rene Streubel) Date: Thu Jan 31 00:12:53 2008 Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 6 In-Reply-To: <5B97281FB2D64A128FEE76C2E39922FE@emtecpapertest.de> References: <5B97281FB2D64A128FEE76C2E39922FE@emtecpapertest.de> Message-ID: <5E16A8B8AB324E459B5E98E98C6659B915D884@server.emtec-papertest.de> Of course I include math.h I deactivate the fround function in math.h with comment "//". //#define fround froundf And the complete fround is: signed long fround(float data_in) { signed long data_out; if (data_in>0) { data_out=(signed long)(data_in+0.5); } else { data_out=(signed long)(data_in-0.5); } return data_out; } The important thing is that it crashes, if data_in is a signed value. But please look at my other tests: They are simpler... (With froundf I use the predefined froundf function from the include path [math.h] and not my own function) signed int foo(void) {return froundf(abs(-101.85));} In this function I use "abs()" to get an unsigned value. This works. But, if the function has to round a signed value, it crashes: signed int foo(void) {return froundf(-101.85);} This is reproducible on my system. I look to the include paths, but they are correct! (Also the library path) I think it only crashes, if the complete project is large and use expanded memory pages. Do you use expanded memory pages in your tests? Best regards Rene -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of icc-mot-request@imagecraft.com Sent: Wednesday, January 30, 2008 9:00 PM To: icc-mot@imagecraft.com Subject: Icc-mot Digest, Vol 41, Issue 6 Send Icc-mot mailing list submissions to icc-mot@imagecraft.com To subscribe or unsubscribe via the World Wide Web, visit http://dragonsgate.net/mailman/listinfo/icc-mot or, via email, send a message with subject or body 'help' to icc-mot-request@imagecraft.com You can reach the person managing the list at icc-mot-owner@imagecraft.com When replying, please edit your Subject line so it is more specific than "Re: Contents of Icc-mot digest..." Today's Topics: 1. Re: fround problem / fp conversion (Richard Man) ---------------------------------------------------------------------- Message: 1 Date: Wed, 30 Jan 2008 01:23:47 -0800 From: Richard Man Subject: Re: [Icc-mot] fround problem / fp conversion To: "Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe to icc-announce if you are a member of this." , "Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribe toicc-announce if you are a member of this." Message-ID: <200801300939.m0U9daGj060899@dragonsgate2.imagecraft.com> Content-Type: text/plain; charset="us-ascii"; format=flowed As with Edward, I can't reproduce this problem. Whatever it is, I don't think it's related to uint2fp or signed int to FP conversion..? At 03:20 AM 1/23/2008, Edward Karpicz wrote: >Both get_pressure2() variants seem to work me :-(. Do you have > >#include > >in your code? > > >Regarding your own fround: > >signed long fround(float data_in) >{ >signed long data_out; >if (data_in>0) >{ > data_out=(signed long)(data_in+0.5); >} >return data_out; >} > >1) when data_in is negative or zero, data_out is undefined >2) if you included math.h, then it should complain about redefining >fround. fround should return float, not signed long. BTW is fround a >standard C function? >3) without valid fround prototype you not only should get a warning >about missing prototype, but also it's expected to hang. Functions >returning longs and floats, such functions are pushing return value >to the stack. Callee has to pull return value from stack. Without >valid prototype, any function is assumed to be defined as int >foo(int). It wouldn't hang if fround was returning >int/short/char/void and signed variants of <=16bits wide return types. > >Also, is include path pointing to V7 include folder? > >Edward > > > >----- Original Message ----- From: "Rene Streubel" > >To: >Sent: Wednesday, January 23, 2008 12:19 PM >Subject: [Icc-mot] fround problem / fp conversion > > >I tried to reduce the function: >If the function have to round an unsigned value, so it is OK: > >signed int get_pressure2(unsigned char p_ch) >{ >return froundf(abs(-101.85)); >} > >But, if the function have to round a signed value, it crashes: > >signed int get_pressure2(unsigned char p_ch) >{ >return froundf(-101.85); >} > >I checked my Program Memory. I had a mistake in my email. The >correct settings in my project are: >Program Memory: 0x4000.0x7FFF:0xC000.0xEFFF >My complete program needs pages 20..23 Is there a problem with the >memory mapping? > >I wrote about my own fround function and that it crahes with the if >statement inside. >There is the same thing. If it is signed in the if statement it >crashes. Without the if statement it not crashes. I think there is a >problem with the signed fp conversion / emulation. > >Richard wrotes about the 7.03 Beta0 and that the compiler did not >generate calls to "uint2fp" for unsigned to FP conversion. Maybe >there is now a new bug with any conversion? > >What should I do? > >Rene > > > >- // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) ------------------------------ _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot End of Icc-mot Digest, Vol 41, Issue 6 ************************************** From richard-lists at imagecraft.com Thu Jan 31 00:12:06 2008 From: richard-lists at imagecraft.com (Richard Man) Date: Thu Jan 31 00:27:59 2008 Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 6 In-Reply-To: <5E16A8B8AB324E459B5E98E98C6659B915D884@server.emtec-papert est.de> References: <5B97281FB2D64A128FEE76C2E39922FE@emtecpapertest.de> <5E16A8B8AB324E459B5E98E98C6659B915D884@server.emtec-papertest.de> Message-ID: <200801310827.m0V8Rvo5076920@dragonsgate2.imagecraft.com> Rene, please trim your post. Please send me OFF-LIST a ZIP file of a project demonstrating the problem. Make it as small as possible but be sure to use all the memory options etc. that cause the problem. Send it directly to me and not to the list, and I will take a look at it. Thanks. At 11:56 PM 1/30/2008, Rene Streubel wrote: >Of course I include math.h >I deactivate the fround function in math.h with comment "//". >//#define fround froundf >And the complete fround is: >signed long fround(float data_in) >{ > signed long data_out; > > if (data_in>0) > { > data_out=(signed long)(data_in+0.5); > } > else > { > data_out=(signed long)(data_in-0.5); > } > > return data_out; >} >The important thing is that it crashes, if data_in is a signed value. > >But please look at my other tests: They are simpler... >(With froundf I use the predefined froundf function from the include >path [math.h] and not my own function) > >signed int foo(void) >{return froundf(abs(-101.85));} > >In this function I use "abs()" to get an unsigned value. This works. >But, if the function has to round a signed value, it crashes: > >signed int foo(void) >{return froundf(-101.85);} > >This is reproducible on my system. I look to the include paths, but they >are correct! (Also the library path) >I think it only crashes, if the complete project is large and use >expanded memory pages. Do you use expanded memory pages in your tests? > >Best regards >Rene > // richard (This email is for mailing lists. To reach me directly, please use richard at imagecraft.com) From ekarpicz at freemail.lt Thu Jan 31 01:09:24 2008 From: ekarpicz at freemail.lt (Edward Karpicz) Date: Thu Jan 31 01:24:53 2008 Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 6 References: <5B97281FB2D64A128FEE76C2E39922FE@emtecpapertest.de> <5E16A8B8AB324E459B5E98E98C6659B915D884@server.emtec-papertest.de> Message-ID: <003701c863e8$fd02a2b0$0400a8c0@edvardo> Still the same. It works, both foo() variants and long fround(-xxx). Does fround caller see proper fround prototype? Aren't there warnings about calling functions without prototype? Wrong prototype in the header file? Else it must be something not really fround and integer<->FP conversion related. Stack overflow for example. Edward ----- Original Message ----- From: "Rene Streubel" To: Sent: Thursday, January 31, 2008 9:56 AM Subject: [Icc-mot] RE: Icc-mot Digest, Vol 41, Issue 6 > > Of course I include math.h > I deactivate the fround function in math.h with comment "//". > //#define fround froundf > And the complete fround is: > signed long fround(float data_in) > { > signed long data_out; > > if (data_in>0) > { > data_out=(signed long)(data_in+0.5); > } > else > { > data_out=(signed long)(data_in-0.5); > } > > return data_out; > } > The important thing is that it crashes, if data_in is a signed value. > > But please look at my other tests: They are simpler... > (With froundf I use the predefined froundf function from the include > path [math.h] and not my own function) > > signed int foo(void) > {return froundf(abs(-101.85));} > > In this function I use "abs()" to get an unsigned value. This works. > But, if the function has to round a signed value, it crashes: > > signed int foo(void) > {return froundf(-101.85);} > > This is reproducible on my system. I look to the include paths, but they > are correct! (Also the library path) > I think it only crashes, if the complete project is large and use > expanded memory pages. Do you use expanded memory pages in your tests? > > Best regards > Rene > > > > > -----Original Message----- > From: icc-mot-bounces@imagecraft.com > [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of > icc-mot-request@imagecraft.com > Sent: Wednesday, January 30, 2008 9:00 PM > To: icc-mot@imagecraft.com > Subject: Icc-mot Digest, Vol 41, Issue 6 > > Send Icc-mot mailing list submissions to > icc-mot@imagecraft.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://dragonsgate.net/mailman/listinfo/icc-mot > or, via email, send a message with subject or body 'help' to > icc-mot-request@imagecraft.com > > You can reach the person managing the list at > icc-mot-owner@imagecraft.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Icc-mot digest..." > > > Today's Topics: > > 1. Re: fround problem / fp conversion (Richard Man) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 30 Jan 2008 01:23:47 -0800 > From: Richard Man > Subject: Re: [Icc-mot] fround problem / fp conversion > To: "Discussion List for ICC08/11/12/16 users. You do NOT need to > subscribe to icc-announce if you are a member of this." > , "Discussion List for > ICC08/11/12/16 users. > You do NOT need tosubscribe toicc-announce if you are a > member of > this." > Message-ID: <200801300939.m0U9daGj060899@dragonsgate2.imagecraft.com> > Content-Type: text/plain; charset="us-ascii"; format=flowed > > As with Edward, I can't reproduce this problem. Whatever it is, I > don't think it's related to uint2fp or signed int to FP conversion..? > > At 03:20 AM 1/23/2008, Edward Karpicz wrote: >>Both get_pressure2() variants seem to work me :-(. Do you have >> >>#include >> >>in your code? >> >> >>Regarding your own fround: >> >>signed long fround(float data_in) >>{ >>signed long data_out; >>if (data_in>0) >>{ >> data_out=(signed long)(data_in+0.5); >>} >>return data_out; >>} >> >>1) when data_in is negative or zero, data_out is undefined >>2) if you included math.h, then it should complain about redefining >>fround. fround should return float, not signed long. BTW is fround a >>standard C function? >>3) without valid fround prototype you not only should get a warning >>about missing prototype, but also it's expected to hang. Functions >>returning longs and floats, such functions are pushing return value >>to the stack. Callee has to pull return value from stack. Without >>valid prototype, any function is assumed to be defined as int >>foo(int). It wouldn't hang if fround was returning >>int/short/char/void and signed variants of <=16bits wide return types. >> >>Also, is include path pointing to V7 include folder? >> >>Edward >> >> >> >>----- Original Message ----- From: "Rene Streubel" >> >>To: >>Sent: Wednesday, January 23, 2008 12:19 PM >>Subject: [Icc-mot] fround problem / fp conversion >> >> >>I tried to reduce the function: >>If the function have to round an unsigned value, so it is OK: >> >>signed int get_pressure2(unsigned char p_ch) >>{ >>return froundf(abs(-101.85)); >>} >> >>But, if the function have to round a signed value, it crashes: >> >>signed int get_pressure2(unsigned char p_ch) >>{ >>return froundf(-101.85); >>} >> >>I checked my Program Memory. I had a mistake in my email. The >>correct settings in my project are: >>Program Memory: 0x4000.0x7FFF:0xC000.0xEFFF >>My complete program needs pages 20..23 Is there a problem with the >>memory mapping? >> >>I wrote about my own fround function and that it crahes with the if >>statement inside. >>There is the same thing. If it is signed in the if statement it >>crashes. Without the if statement it not crashes. I think there is a >>problem with the signed fp conversion / emulation. >> >>Richard wrotes about the 7.03 Beta0 and that the compiler did not >>generate calls to "uint2fp" for unsigned to FP conversion. Maybe >>there is now a new bug with any conversion? >> >>What should I do? >> >>Rene >> >> >> >>- > > // richard (This email is for mailing lists. To reach me directly, > please use richard at imagecraft.com) > > > > ------------------------------ > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > > End of Icc-mot Digest, Vol 41, Issue 6 > ************************************** > > > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot >