Hi, The problem I am having is similar to other forum threads such as "Floating point with sprintf / vsprintf" I'm attempting to use floating point printf but I get non-number ASCII characters in the output which turn up in the same spots for certain numbers. (ie. 1.1111@. Actually the @ is really ASCII character 001 but since I can't show ASCII character 001 here I'll use '@' to represent it). I am using WinARM version 20060606 which I believe is compiled for 'hard-float'. And as I've learned on this forum (thank you) that even though the library is compiled with floating point coprocessor opcodes, the floating point opcodes are handled by an exception handler. I'm got two 'sections' of compiled code, the OS code which is compiled using IAR and the other 'dll' which is compiled using GCC. So I assume the problem might be the fact that the floating point exception handler is compiled using IAR and the calling code is in GCC. However, I can't seem to find the exception handler in order to debug it. I've tried switching to the "arm-2008q1-126-arm-none-eabi" toolchain, which I believe is compiled with "soft-float", but it causes a data abort exception when it prints the float. Is there an incomaptibility between arm-none-eabi code and the IAR code? The only thing I haven't tried is recompiling the arm-elf toolchain with 'soft-float' but that is a last resort since it is very cclose to working except for the odd odd character in the output. Thx, Dave
Dave, I am just facing the same issue since a long time. I have tried several Gcc tool chaine for my STR912 ev board, all failed with floating point except Idealist tool chain that is the only tool chain that process and format floating point in the right way for my project/MCU. I will follow up your post like every post related to this topic. Good luck, Joel Dave Schmeltzer wrote: > Hi, > > The problem I am having is similar to other forum threads such as > "Floating point with sprintf / vsprintf" > > I'm attempting to use floating point printf but I get non-number ASCII > characters in the output which turn up in the same spots for certain > numbers. (ie. 1.1111@. Actually the @ is really ASCII character 001 but > since I can't show ASCII character 001 here I'll use '@' to represent > it). > I am using WinARM version 20060606 which I believe is compiled for > 'hard-float'. And as I've learned on this forum (thank you) that even > though the library is compiled with floating point coprocessor opcodes, > the floating point opcodes are handled by an exception handler. > I'm got two 'sections' of compiled code, the OS code which is compiled > using IAR and the other 'dll' which is compiled using GCC. So I assume > the problem might be the fact that the floating point exception handler > is compiled using IAR and the calling code is in GCC. However, I can't > seem to find the exception handler in order to debug it. > > I've tried switching to the "arm-2008q1-126-arm-none-eabi" toolchain, > which I believe is compiled with "soft-float", but it causes a data > abort exception when it prints the float. > > Is there an incomaptibility between arm-none-eabi code and the IAR code? > The only thing I haven't tried is recompiling the arm-elf toolchain with > 'soft-float' but that is a last resort since it is very cclose to > working except for the odd odd character in the output. > > Thx, Dave
Joel, I found the problem with my printf displaying odd characters. It turns out it was an errata with the STR9 part not able to address single bytes properly on the EMI bus. Hope this helps. Dave Joel Jomed wrote: > Dave, > I am just facing the same issue since a long time. > I have tried several Gcc tool chaine for my STR912 ev board, all failed > with floating point except Idealist tool chain that is the only tool > chain that process and format floating point in the right way for my > project/MCU. > I will follow up your post like every post related to this topic. > Good luck, > Joel > > > Dave Schmeltzer wrote: >> Hi, >> >> The problem I am having is similar to other forum threads such as >> "Floating point with sprintf / vsprintf" >> >> I'm attempting to use floating point printf but I get non-number ASCII >> characters in the output which turn up in the same spots for certain >> numbers. (ie. 1.1111@. Actually the @ is really ASCII character 001 but >> since I can't show ASCII character 001 here I'll use '@' to represent >> it). >> I am using WinARM version 20060606 which I believe is compiled for >> 'hard-float'. And as I've learned on this forum (thank you) that even >> though the library is compiled with floating point coprocessor opcodes, >> the floating point opcodes are handled by an exception handler. >> I'm got two 'sections' of compiled code, the OS code which is compiled >> using IAR and the other 'dll' which is compiled using GCC. So I assume >> the problem might be the fact that the floating point exception handler >> is compiled using IAR and the calling code is in GCC. However, I can't >> seem to find the exception handler in order to debug it. >> >> I've tried switching to the "arm-2008q1-126-arm-none-eabi" toolchain, >> which I believe is compiled with "soft-float", but it causes a data >> abort exception when it prints the float. >> >> Is there an incomaptibility between arm-none-eabi code and the IAR code? >> The only thing I haven't tried is recompiling the arm-elf toolchain with >> 'soft-float' but that is a last resort since it is very cclose to >> working except for the odd odd character in the output. >> >> Thx, Dave
Dave, If you have a simple project that just format a float in a string, could you pass it to me (with the makefile)? Thanks in advance and many thanks for your feed back. Joel Dave Schmeltzer wrote: > Joel, > > I found the problem with my printf displaying odd characters. It turns > out it was an errata with the STR9 part not able to address single bytes > properly on the EMI bus. > > Hope this helps. > > Dave >
Joel, I should have mentioned that I fixed the problem by using the internal RAM whereas before I was using external memory in an FPGA on the EMI bus. Therefore it has nothing to do with the makefile and more to do with the linker file. -Dave Joel Jomed wrote: > Dave, > If you have a simple project that just format a float in a string, could > you pass it to me (with the makefile)? > Thanks in advance and many thanks for your feed back. > Joel > > Dave Schmeltzer wrote: >> Joel, >> >> I found the problem with my printf displaying odd characters. It turns >> out it was an errata with the STR9 part not able to address single bytes >> properly on the EMI bus. >> >> Hope this helps. >> >> Dave >>
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.