This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tm_basic for edb9301


>>>>> "Daniel" == Daniel Gomes <danielcgomes@yahoo.com.br> writes:

    Daniel> Hi again. :)
    Daniel> In my struggle trying to build the tests for the EDB9301,
    Daniel> I got a problem in tb_basic.cxx. arm-elf-gcc is
    Daniel> complaining about a nasty define that is based in a
    Daniel> variable-size type:

    Daniel> cirrus/ecos-2.0/packages/kernel/v2_0/tests/tm_basic.cxx:143:
    Daniel> variable-size type declared outside of any function

    Daniel> And, indeed, it's true. I've greped for the source of
    Daniel> it and found this :

    Daniel> // install/include/pkgconf/mlt_arm_arm9_edb9301_ram.h 
    Daniel> // eCos memory layout - Tue Nov 21 14:25:35 2000
    Daniel> // This is a generated file - do not edit

    Daniel> #include <cyg/infra/cyg_type.h>
    Daniel> #include <stddef.h>

    Daniel> extern unsigned long SDRAMSize;
    Daniel> #define CYGMEM_REGION_ram (0)
    Daniel> #define CYGMEM_REGION_ram_SIZE (SDRAMSize)

    Daniel> Where SDRAMSize is an assembly routine at
    Daniel> install/include/cyg/hal/hal_platform_setup.h

    Daniel> SDRAMSize:
    Daniel>     // Store zero at offset zero.
    Daniel>     str     r0, [r0]
    Daniel>     // Start checking for an alias at 1MB into SDRAM.
    Daniel>     ldr     r1, =0x00100000
    Daniel> (snip, code continues ...)

    Daniel> Well ... now I have a lot of ways to overcome this
    Daniel> problem, like fixing the value in tm_basic, ignoring
    Daniel> tm_basic test for my target, jump out of my office's
    Daniel> window, etc ... I'd like a suggestion from you, gurus out
    Daniel> there.

There is no EDB9301 support in the eCos repository. I have never seen
the port and don't know who is responsible, but it looks like they
never even built the testcases.

CYGMEM_REGION_ram_SIZE should be a compile-time constant, so it is the
platform HAL that is broken. If a platform may have varying amounts of
memory then usually the platform HAL should default to the smallest,
ensuring that you cannot build an application which won't actually run
on the target. Then if run-time sizing detects extra memory this can
be added to the heap. If you know that the application will only be
run on a larger board and its static memory requirements exceed the
minimum, there are a number of ways of addressing it.

For now I suggest you just hardwire CYGMEM_REGION_ram_SIZE to match
your hardware.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]