How to force gcc to use only one copy of string? Ok, I can use a class with predefined strings. But it doesn’t solve the problem with unnecessary strings. As I said it is a library, the end-user program sometimes doesn’t use...
Sunday, 11 April 2010 - 21:58
atmel libraries for glcd Of course there are a lot of them. The magical phrase ‘ks0108 avr’ and google will help you:
http://en.radzio.dxp.pl/ks0108/
Sunday, 11 April 2010 - 11:04
KamAVR - free IDE for WinAVR tools Why? This program is relatively old, now we have some nice IDEs – eclipse, code blocks and so on. Especially code blocks have everything I need.
Sunday, 11 April 2010 - 10:59
How to force gcc to use only one copy of string? Maybe it’s a matter of interpretation… assume… ok., so in what situations this option works? Hard to imagine. So at least it is misoptimization? Or something which should be...
Saturday, 10 April 2010 - 18:46
How to force gcc to use only one copy of string? I’ve declared them as constants because I used PSTR macro from avr/pgmspace.h, which is defined as follows:
# define PSTR(s) ((const PROGMEM char *)(s))
Saturday, 10 April 2010 - 18:01
How to force gcc to use only one copy of string? I’ve tried to compile my C++ program with –fmerge-all-constants, but my constants are still kept separately. So this option is broken in AVR port, or at least avr-g++ port.
Saturday, 10 April 2010 - 14:43
How to force gcc to use only one copy of string? Thanks for your responses. I though gcc can manage this situation, it is quite simple. So I disagree with Bingo600. We are talking about constants in FLASH memory, which...
Porting code from a PIC to AVR - bitfields According to my knowledge the compiler is not allowed to put struct members in arbitrary order. Struct members order is defined by user, only big/little endian problem can affect...
Sorry, can you give me an example how to do it? I don’t understand what do you mean.
Yes Johan, I started with duplicated strings, and have ended with possibly unnecessary strings as a result of proposed workaround. Nice.
Ok, I can use a class with predefined strings. But it doesn’t solve the problem with unnecessary strings. As I said it is a library, the end-user program sometimes doesn’t use...
Of course there are a lot of them. The magical phrase ‘ks0108 avr’ and google will help you: http://en.radzio.dxp.pl/ks0108/
Why? This program is relatively old, now we have some nice IDEs – eclipse, code blocks and so on. Especially code blocks have everything I need.
Maybe it’s a matter of interpretation… assume… ok., so in what situations this option works? Hard to imagine. So at least it is misoptimization? Or something which should be...
I’ve declared them as constants because I used PSTR macro from avr/pgmspace.h, which is defined as follows: # define PSTR(s) ((const PROGMEM char *)(s))
I’ve tried to compile my C++ program with –fmerge-all-constants, but my constants are still kept separately. So this option is broken in AVR port, or at least avr-g++ port.
Thanks for your responses. I though gcc can manage this situation, it is quite simple. So I disagree with Bingo600. We are talking about constants in FLASH memory, which...
Revelant information about bitfields: http://publib.boulder.ibm.com/in...
According to my knowledge the compiler is not allowed to put struct members in arbitrary order. Struct members order is defined by user, only big/little endian problem can affect...
If AVR Studio creates makefile automatically you can use it. But remeber that everytime you change your project you have to recreate makefile.
Pages