[En-Nut-Discussion] Fw: NutOS Upgrade, was: NutGetMillis in Uart ISR

Ernst Stippl ernst at stippl.org
Wed Nov 14 23:34:20 CET 2007


Hi!

Just to make sure not to overlook something I used grep to find all
occurrences of FOPEN_MAX. The current dir was the "Ethernut_4.3.3 dir:

1) ==== looking up .h files
D:\DRV-NUT\ET7CF1~1.3>d:\borland_sw\bp\bin\grep -d+ FOPEN_MAX *.h
File NUT\CRT\NUT_IO.H:
#ifndef FOPEN_MAX
#define FOPEN_MAX       8   /*!< \brief Default maximum number of open
streams.

2) ==== looking up .c files
D:\DRV-NUT\ET7CF1~1.3>d:\borland_sw\bp\bin\grep -d+ FOPEN_MAX *.c
File NUT\CRT\FCLOSE.C:
        if (++i >= FOPEN_MAX) {
File NUT\CRT\FCLOSE~1.C:
    for (i = 3; i < FOPEN_MAX; i++)
File NUT\CRT\FDOPEN.C:
        if (i >= FOPEN_MAX - 1) {
File NUT\CRT\FLUSHALL.C:
    for (i = 0; i < FOPEN_MAX; i++)
File NUT\CRT\FOPEN.C:
FILE *__iob[FOPEN_MAX] = { (FILE *) 1, (FILE *) 2, (FILE *) 3 };
        if (i >= FOPEN_MAX - 1) {
File NUT\CRT\FREOPEN.C:
        if (++i >= FOPEN_MAX) {

3) ==== looking up .nut files
D:\DRV-NUT\ET7CF1~1.3>d:\borland_sw\bp\bin\grep -d+ FOPEN_MAX *.nut
File NUT\CONF\CRT\CRT.NUT:
                macro = "FOPEN_MAX",


Then I started the nutconf and set FOPEN_MAX to 16. I tried to start "build
Nut/OS". That failed because I am currently a victim of Vista ;-) and have
messed up all my WINAVR configurations. Nevertheless, after receiving the
error messages in nutconf that the compiler was not found, I re-ran grep:

4) ==== looking up .nut files again
D:\DRV-NUT\ET7CF1~1.3>d:\borland_sw\bp\bin\grep -d+ FOPEN_MAX *.nut
File NUT\CONF\CRT\CRT.NUT:
                macro = "FOPEN_MAX",

4) ==== looking up .h files again
D:\DRV-NUT\ET7CF1~1.3>d:\borland_sw\bp\bin\grep -d+ FOPEN_MAX *.h
File NUT\CRT\NUT_IO.H:   <-------------------------------------------!!!
#ifndef FOPEN_MAX
#define FOPEN_MAX       8   /*!< \brief Default maximum number of open
streams.
File NUTBLD\INCLUDE\CFG\CRT.H:
#ifndef FOPEN_MAX
#define FOPEN_MAX 16

So I could at least verify that nutconf is placing the correct (the entered)
value in the file where it is expected to go.

Have you gone thru these steps with the same results?

Regards
Ernst


D:\DRV-NUT\ET7CF1~1.3>

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von Hugo Simon
Gesendet: Dienstag, 13. November 2007 22:14
An: Ethernut User Chat (English)
Betreff: [En-Nut-Discussion] Fw: NutOS Upgrade,was: NutGetMillis in Uart ISR

> I looked where __iob is defined:
>
> FILE *__iob[FOPEN_MAX] = { (FILE *) 1, (FILE *) 2, (FILE *) 3 };
>
> I cannot see how this could become 0x10=16 bytes in size, or is the
mapfile
> in words? But also then: since one element of __iob seems to have three
> pointers in it, the size should be a multiple of three. Am I wrong?
Oh no, it's to late today. Each element is a pointer (2 bytes?), the first
three are initialized (stdin, stdout, stderr I think). So with 8 entries we
get 16 bytes. Ok.

So it seems that NutOS make ignore's the settings, but App-Build doesn't.
Why?


_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion



-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 14.11.2007
16:54





More information about the En-Nut-Discussion mailing list