[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Strange issues with 16-bit values
From: |
Brian Neltner |
Subject: |
[avr-gcc-list] Strange issues with 16-bit values |
Date: |
Fri, 07 Nov 2008 00:05:21 -0500 |
Apologies if this has been mentioned before.
I have some software that previously compiled perfectly on my computer,
but which now fails silently when uploaded (no compile-time errors or
warnings). I am hoping someone can help me!
This works:
int main(void) {
uint8_t i;
for(i=1;i<0xFF;i++) asm volatile("nop/n/t");
PORTA=0x01;
while(1);
}
and PORTA is correctly set.
However, this doesn't work:
int main(void) {
uint16_t i;
for(i=1;i<0xFF;i++) asm volatile("nop/n/t");
PORTA=0x01;
while(1);
}
and the code never reaches the PORTA setting command.
I have included the following libraries:
#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
and this all worked previously, so I'm not sure what to do.
This is using avr-gcc 4.3.0
Hopefully I am just missing a library which didn't used to be necessary
but now is? It's very strange to me that my code is compiling without
errors or warnings... but not running.
Thanks,
Brian
- [avr-gcc-list] Strange issues with 16-bit values,
Brian Neltner <=
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, David Brown, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, Josef Eisl, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, Bernard Fouché, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, David Kelly, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, Bob Paddock, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/11