[En-Nut-Discussion] PLEASE HELP - NEED WORKING THREAD SAMPLE FOR OWN ATMEGA128 PROJECT

staste at alpikom.it staste at alpikom.it
Tue Jan 25 12:40:28 CET 2005


hi

i use a own atmega128 project with fixed freq (16MHz), no 32kHz crystal and no
external ram and no lan interface

so i only need the nut/os

i use nut392 and the latest winavr...

i have compiled successfully the basemon.c and this example is working, if i set
the baudrate fix to 9600..

then i have tested to make 2 threads (as in example threads.c, the first writes
H, the second writes L to the serial board).i excluded the basemon() function.
on the serial port i get only the character from the first thread (H) and the
nutSleep in the threadfunction seems to not working (NutSleep(125) and
NutSleep(5000) has the same effect - always as fastet it can)...

so my question: maybe i use some wrong software environment ???
has anyone a thread sample for an atmega128 with no ext ram, fixed freq and no
32kHz crystal...?

and i need always to include this lines for winavr, because i see that without
this lines the basemon is not working ??? :

#ifdef __GNUC__
void NutInit(void) __attribute__ ((naked)) __attribute__ ((section(".init8")));
extern int NutAppMain(void) __attribute__ ((noreturn));
#endif

void NutInit(void)
{
    extern void *__bss_end;
    NutHeapAdd(&__bss_end, (uptr_t) RAMEND - 256 - (uptr_t) (&__bss_end));


thx stephan


----------------------------------------------------
This mail has been sent using Alpikom webmail system
http://www.alpikom.it




More information about the En-Nut-Discussion mailing list