hi; I'm working with GCC but i tried using CodeVision also. but as you may know, there is a problem in design of AVR microcontrollers, they could not return from interrupts when stack lies in external sram. because of this some compilers like CodeVision (or maybe BasCom) use a hardware stack, and another data stack. but as I tested, these kind of dividing stack into two separated regions means the compiler prepared for the begineers or middle level programmers, not good ones. just for testing an algorithm. for example, in CodeVision AVR if you use a large table placed in flash, for example a font with a size of about 4KB in size, CodeVision never could generate a good code. ofcouse target code will not be run. maybe your problem solved using a powerfull compiler which I prefered as GCC (or WinAVR). some compilers seems to be a student work which released to be used by the others. if you checked the code the GCC I hope it works properly. as a suggestion I prefered following tools which I used frequently in different projects specially for automation control in a wide varity of projects. event with floating point operations and large amount of data: - CodeVision AVR (only for generating template program and configuring hardware). - WinAVR (from sourceforge or avrfreaks) for compiling the program. - Atmel AVRStudio 4.12 (or later) with Service Pack 2 installed for debugging and using as an IDE. - Ponyprog2000 for programming and setting fuse bits. - or AvReal 1.25 serial downloader for serial programming when download speed is important, or using a command line program is a need. you should note if you are using floating point package, you must preserve at least 4KB of code in flash area, and somehow an amount of 128 or 256 bytes of SRAM storage for runtime support. in some cases you may have a bad result because of low speed in floating point calculations, which depend on the algorithm you may use, you may need a faster micro, using an external math co-processor (like the one in opencores.org) or simply convert your logic to use long integers (fixed point arithmetic) beside of using floating point (see PC Underground Book which uses a fixed point arithmetic for 3D matrix calculations). __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Message
RE: [AVR-Chat] Lack of enough stacks? (was: AVR Power Supply Noise)
2006-07-14 by Reza
Attachments
- No local attachments were found for this message.