[En-Nut-Discussion] ethernut on display3000 board

Philipp Brüll phil at outofsync.de
Tue May 15 12:43:59 CEST 2007


Philipp Brüll schrieb:
> Hello,
> 
> currently I'm trying to run the latest (4.2.1) nut/os version on a 
> display3000 board (www.display3000.com). The display board is just a 
> simple board with a display and an atmega128 chip. It isn't a problem to 
> compile and upload a simple application that turn a led on and of. 
> Without ethernut it's working fine, but if I just link the ethernut 
> libs, nothing is happened any more. Compile, upload (via avrdude) is ok, 
> but no blinking led :-(
> I turned off any optimisation. I think it's a problem either with the 
> nutinit or the linking of the main() method. Does someone know under 
> which circumstances the ethernut initialisation is not running through?
> 
> Maybe someone who has experience with running ethernut on 
> not-original-ethernut-hardware can help me?
> 
> Regards
> Philipp
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Ah - I forgot to attach some code:

my program:
-----------------------
#include <util/delay.h>
#include <avr/io.h>

int NutAppMain(void) {
	int i;

	DDRA |= 0xff;
	while (1) {
		PORTA |= 0xff;
		for (i = 0; i < 1000; i++) _delay_ms(1);
		PORTA &= 0x00;
		for (i = 0; i < 1000; i++) _delay_ms(1);
	}
	
	return 0;
}

int main(void) {
	return NutAppMain();
}
-----------------------

make output
-------- begin --------
avr-gcc (GCC) 4.1.1 (WinAVR 20070122) Copyright (C) 2006 Free Software 
Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling C: test.c
avr-gcc -c -mmcu=atmega128 -I. -g -DF_CPU=16000000UL -Os -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -Wall 
-Wstrict-prototypes -Wa,-adhlns=obj/test.lst 
-IC:/Project/ethernut/nutbld/include -IC:/Project/ethernut/nut/include 
-std=gnu99 -Wundef -MMD -MP -MF .dep/test.o.d test.c -o obj/test.o

Linking: test.elf
avr-gcc -mmcu=atmega128 -I. -g -DF_CPU=16000000UL -Os -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -Wall 
-Wstrict-prototypes -Wa,-adhlns=obj/test.o 
-IC:/Project/ethernut/nutbld/include -IC:/Project/ethernut/nut/include 
-std=gnu99 -Wundef -MMD -MP -MF .dep/test.elf.d obj/test.o --output 
test.elf -Wl,-Map=test.map,--cref -Wl,--start-group 
C:/Project/ethernut/nutbld/lib/nutinit.o -lnutcrt -lnutarch -lnutdev 
-lnutos -lnutdev -lnutarch -Wl,--end-group 
-LC:/Project/ethernut/nutbld/lib   -lm

Creating load file for Flash: test.hex
avr-objcopy -O ihex -R .eeprom test.elf test.hex

Creating load file for EEPROM: test.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 --no-change-warnings -O ihex test.elf 
test.eep ||
  exit 0
c:\Programme\Code\WinAVR\bin\avr-objcopy.exe: there are no sections to 
be copied
!

Creating Extended Listing: test.lss
avr-objdump -h -S test.elf > test.lss

Creating Symbol Table: test.sym
avr-nm -n test.elf > test.sym

Size after:
AVR Memory Usage
----------------
Device: Unknown

Program:   10128 bytes
(.text + .data + .bootloader)

Data:        136 bytes
(.data + .bss + .noinit)

-------- end --------




More information about the En-Nut-Discussion mailing list