#ifndef __ARCHINC_H__
#define __ARCHINC_H__

/* Arch (and toolchain) specific meta-include file */

#include "config.h"

/*
 * Toolchain detection
 */
 
// Philips LPC2xxx (ARM7TDMI)

#if defined(CONFIG_ARCH_LPC2XXX)
#  if defined(__IAR_SYSTEMS_ICC__)
#    define CONFIG_TOOLCHAIN_IAR
#  else
#    define CONFIG_TOOLCHAIN_ROWLEY
#  endif
#endif

// TI MSP430 

#if defined(CONFIG_ARCH_MSP430)
#  if defined(__ARCHELON__)
#    define CONFIG_TOOLCHAIN_QUADRAVOX
#  endif
#endif

/*
 * Arch/toolchain dependent include files
 */

#if defined(CONFIG_ARCH_MSP430)
#  if defined(CONFIG_TOOLCHAIN_QUADRAVOX)
#    include <MSP430Fx.h>
#  else
#    error "archinc.h: no toolchain detected for arch MSP430"
#  endif
#endif

#if defined(CONFIG_ARCH_LPC2XXX)
#  include "armvic.h"
#  if defined(CONFIG_TOOLCHAIN_ROWLEY)
#    include <targets/lpc213x.h>
#    include "__armlib.h"
#  else
#    if defined(CONFIG_TOOLCHAIN_IAR)
#      include <inarm.h>
#      /* include <arm_interrupt.h> -- can't use: global data declared inside */
#    else
#      error "archinc.h: no toolchain detected for arch LPC2XXX"
#    endif
#  endif
#endif

/*
 * Include some generic definitions (typedef boolean, etc.)
 */

#include "defs.h"

#endif /* __ARCHINC_H__ */
