Post Created date
GCC vs ASM code size - Help me close the gap
Have you tried using any optimization level besides -O0? With this test program:   extern int8_t x; extern uint8_t y; int8_t mul(void) { return (x * y) >> 8; } and...
Thursday, 16 April 2015 - 04:18
Xmega 128A3U - Uart ISR Buffer receive string
What is sending data to the AVR? Is it actually sending a null character to terminate the string?
Wednesday, 15 April 2015 - 15:30
Compiler bug!
david.prentice wrote: What value do you get on a STM32?   3447.0 % 256 = 119   However,   the conversion function from float to integer might have a slight...
Tuesday, 14 April 2015 - 18:58
Multi threading and timers in ATmega128
gcc 4.7.4 gives me a warning: $ cat undefined-behavior.c extern int s; void foo() { s = s++; } $ gcc -c -Wall undefined-behavior.c undefined-behavior.c: In function ‘foo’:...
Tuesday, 14 April 2015 - 18:55
Cannot compile a plain simple union under AS6.2.1153
What does it matter that a non-standard header like avr/io.h includes a standard header like stdint.h? As far as I know, it's not disallowed by any relevant standard. Including...
Tuesday, 14 April 2015 - 16:54
Compiler bug!
Nobody said you are stupid.   Again, what value does k have on the STM32, and what value do you expect k to have?
Tuesday, 14 April 2015 - 16:43
Multi threading and timers in ATmega128
No, it's undefined behavior because you are modifying the same object twice in the same statement. You cannot do that.   Here's one valid interpretation of that statement (...
Tuesday, 14 April 2015 - 16:25
Multi threading and timers in ATmega128
This statement has undefined behavior: s=s++;   "Undefined behavior" means that the implementation (the compiler et al) is free to do anything as a result. It might "work"...
Tuesday, 14 April 2015 - 16:06
Compiler bug!
What value did you expect k to have? What value does k have on the STM32? I would expect k to be 119 after that assignment.
Tuesday, 14 April 2015 - 15:49
Multi threading and timers in ATmega128
Your main function has an automatic variable named "thread". That's a different variable than any global variable that you named "thread".
Tuesday, 14 April 2015 - 15:47
Merging Bootloader HEX-File and Application HEX-File to one
Note that those are word addresses in the datasheet, not byte addresses. I believe the Intel hex format uses byte addresses. There are two bytes per word, so multiply the word...
Tuesday, 7 April 2015 - 20:25
Correct spelling? Diode ORed or OR'd or what?
I would argue that OR, as a function/operator, can be used a verb. In human language terms (or at least English terms), an operator (like OR, AND, ADD, MULTIPLY, etc) is the verb...
Tuesday, 7 April 2015 - 15:50

Pages