[En-Nut-Discussion] newbie question to simple demo
Olaf Schirm
oschirm at web.de
Tue Mar 21 09:35:10 CET 2006
Hi all,
I hope this is right place to solve my current situation with ethernut.
I use the V4.03 of nutos and V2006 of WinAVR, both on Win XP SP2.
The target platform is an Atmel Mega128.
Programmer is an old AVR SK200 and Ponyprog 2000.
No changes done to the official release files.
I have shrunken down the problem to the simple demo:
Adding 3 LEDs to the Mega128 and turn them on works fine without ethernut.
Doing it with ethernut compiles with no problem but the LEDs do not light up.
Actually it seems as if the void main routine does not work at all.
I guess I need to define a memory offset or something like this.
I do not understand the process how I can find out more about the cause of the problem.
Here is the program:
#include <compiler.h>
int main(void)
{
DDRE |= (1<<2)|(1<<3)|(1<<4);
PORTE |= (1<<2) | (1<<3)| (1<<4);
for (;;);
}
and the compiler output:
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall -Wstrict-prototypes -Wa,-ahlms=simple.lst -DETHERNUT2 -D__HARVARD_ARCH__ -IC:/ethernut/nutbuild/include -IC:/ethernut/nut/include simple.c -o simple.o
avr-gcc simple.o -mmcu=atmega128 -Wl,--defsym=main=0,-Map=simple.map,--cref -LC:/ethernut/nutlib C:/ethernut/nutlib/nutinit.o -lnutos -lnutarch -lnutdev -o simple.elf
avr-objcopy -R .eeprom -O ihex simple.elf simple.hex
rm simple.elf
I guess it is a small step for you but a giant leap for me
kind regards
Olaf
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
More information about the En-Nut-Discussion
mailing list