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]

Problems with var_mk_defs.c


In the SH Hal architecture I am getting build problems relating to var_mk_defs.c.  If I comment out the code within int main(void), the compile problems go away. When included, every call to DEFINE throws up a bad expression. Can anyone explain to me what this file is actually doing, or indeed why it isn't working as I am completely stuck.

#define DEFINE(sym, val) \
        asm volatile("\n\t.equ\t" #sym ",%0" : : "i" (val))

int main(void)
{
    // Caching details
    DEFINE(HAL_UCACHE_SIZE, HAL_UCACHE_SIZE);
    DEFINE(HAL_UCACHE_WAYS, HAL_UCACHE_WAYS);
    DEFINE(HAL_UCACHE_LINE_SIZE, HAL_UCACHE_LINE_SIZE);

    // Interrupt details
    DEFINE(CYGNUM_HAL_ISR_MAX, CYGNUM_HAL_ISR_MAX);
    DEFINE(CYGNUM_HAL_INTERRUPT_LVL0, CYGNUM_HAL_INTERRUPT_LVL0);
    DEFINE(CYGNUM_HAL_INTERRUPT_LVL_MAX, CYGNUM_HAL_INTERRUPT_LVL_MAX);
#ifdef CYGNUM_HAL_INTERRUPT_LVL14
    DEFINE(CYGNUM_HAL_INTERRUPT_LVL14, CYGNUM_HAL_INTERRUPT_LVL14);
#endif
    DEFINE(CYGNUM_HAL_INTERRUPT_NMI, CYGNUM_HAL_INTERRUPT_NMI);
    DEFINE(CYGNUM_HAL_VECTOR_TRAP, CYGNUM_HAL_VECTOR_TRAP);
    DEFINE(CYGNUM_HAL_VECTOR_INTERRUPT, CYGNUM_HAL_VECTOR_INTERRUPT);

    return 0;
}


Many Thanks in advance

	James Yates

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


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