User Activity

  • Posted a comment on ticket #325 on OpenOCD - Open On-Chip Debugger

    Thank you, Antonio! I'll be looking forward to a minor bux fix release then. ;-)

  • Created ticket #325 on OpenOCD - Open On-Chip Debugger

    ST-LINK V3 fails to connect to an STM8 target

  • Posted a comment on ticket #3264 on Small Device C Compiler (SDCC)

    Thanks, Erik!

  • Created ticket #3264 on Small Device C Compiler (SDCC)

    Constant parameter leads to bogus compilation error

  • Posted a comment on ticket #3221 on Small Device C Compiler (SDCC)

    I believe __sfr and __at are not available for STM8.

  • Posted a comment on ticket #3221 on Small Device C Compiler (SDCC)

    The peephole optimizer is an interesting beast. The workaround to the case above is this: #include <stdint.h> #define ADDR (*(volatile uint8_t *)(0x5555)) static void wfi() { __asm__("wfi"); } void main(void) { ADDR |= 0x01; ADDR |= 0x02; ADDR |= 0x04; for (;;) wfi(); } If wfi() is inlined, no optimization for the third line. So it looks like the peephole optmizer sees the code after compiler optimizations (inlining, returns, etc.) and is akin of a "last wipe of dust". I guess I wish the compiler...

  • Modified a comment on ticket #3221 on Small Device C Compiler (SDCC)

    Well, the following code shows that the optimizer is somewhat "picky" about such optimizations: #include <stdint.h> #define ADDR (*(volatile uint8_t *)(0x5555)) void main(void) { ADDR |= 0x01; ADDR |= 0x02; ADDR |= 0x04; __asm__("wfi"); } 000000 89 _main: 90 ; main.c: 6: ADDR |= 0x01; 000000 72 10 55 55 [ 1] 91 bset 21845, #0 92 ; main.c: 7: ADDR |= 0x02; 000004 72 12 55 55 [ 1] 93 bset 21845, #1 94 ; main.c: 8: ADDR |= 0x04; 000008 C6 55 55 [ 1] 95 ld a, 0x5555 00000B AA 04 [ 1] 96 or a, #0x04 00000D...

  • Posted a comment on ticket #3221 on Small Device C Compiler (SDCC)

    Well, the following code shows that the optimizer is somewhat "picky" about such optimizations: #include <stdint.h> #define ADDR (*(volatile uint8_t *)(0x5555)) void main(void) { ADDR |= 0x01; ADDR |= 0x02; ADDR |= 0x04; __asm__("wfi"); } 000000 89 _main: 90 ; main.c: 6: ADDR |= 0x01; 000000 72 10 55 55 [ 1] 91 bset 21845, #0 92 ; main.c: 7: ADDR |= 0x02; 000004 72 12 55 55 [ 1] 93 bset 21845, #1 94 ; main.c: 8: ADDR |= 0x04; 000008 C6 55 55 [ 1] 95 ld a, 0x5555 00000B AA 04 [ 1] 96 or a, #0x04 00000D...

View All

Personal Data

Username:
seny
Joined:
2010-04-14 19:26:53
Location:
Vancouver / Canada / PDT
Gender:
Male

Projects

  • No projects to display.

Personal Tools

MongoDB Logo MongoDB