Post Created date
How big is the code?
C:\WinAVR-20070525\bin>avr-size -C idn2.elf AVR Memory Usage ---------------- Device: Unknown Program: 35720 bytes (.text + .data + .bootloader) Data: 37582 bytes (....
Thursday, 31 January 2008 - 15:07
Error Handling in Function that Returns Char & Uses All
It's possible to make things a little better reading too: Declaration of add... bool add(uint8_t a, uint8_t b, uint8_t* sum); Usage of add... union { uint8_t result...
Thursday, 31 January 2008 - 15:01
Error Handling in Function that Returns Char & Uses All
Yes, that suits his original spec better on the face of it, but I don't like how the code reads; using a pling to indicate a true condition. I read ! as "not". I try to keep as...
Thursday, 31 January 2008 - 14:19
Error Handling in Function that Returns Char & Uses All
I tend to do it the other way around, i.e. for your example: bool add(uint8_t a, uint8_t b, uint8_t* sum) which enables the easier to read form (IMO) of the error check...
Thursday, 31 January 2008 - 12:27
"device type not defined" when compiling in C++
I moved away from Makefiles and now use the code::blocks IDE. I find it 100% easier than farting about with makefiles. I would not go back now.
Thursday, 29 November 2007 - 19:04
brberie wrote:Lars, Optimization is not correct This is my first post: Quote://prototype bool button_pressed(void); Code: 102: if (!button_pressed()) return MENU_NO_BUTTON...
Wednesday, 21 November 2007 - 11:14
Tiny13 and PWM
ISR(SIG_OVERFLOW0) ... // timer 0 compare interrupt TIMSK0 = (1<<OCIE0A); Well, there's a problem for a start, you need to use ISR(SIG_OUTPUT_COMPARE0A) instead of...
Thursday, 11 October 2007 - 10:08
Static var reset in function: why?
WrightFlyer wrote:Is there REALLY an argument for using -O0? There is a separate thread about it, you participated in it! Yes, there is an argument for using -O0.
Wednesday, 3 October 2007 - 16:38
any makefile gurus?
Generally the reason a build fails like this is because gcc cannot create a path to the object file it creates. Thus, if your objdir is anything other than ./ it will fail. If...
Monday, 1 October 2007 - 17:05
Calling functions from an array?
davef wrote:Embedded Systems Programming, May 1999 provides good background material in the article called "Arrays of Pointers to Functions". Can anyone suggest other references?...
Monday, 1 October 2007 - 11:01
Disucussion: When is -O0 appropriate?
I got bit today. Debug by the usual -O0 method, and got caught out by the following test being virtually optimised away in the actual device firmware (at -Os): bool memtest(...
Friday, 28 September 2007 - 16:34
32k limit on const data array? (even on a 128k AVR)
BrianS wrote: size_t in our case is an unsigned int. Sorry, that should read: size_t in our case is a signed int.
Friday, 28 September 2007 - 09:56