2008-09-18 20:22:15 +00:00
|
|
|
// Validate eLua configuration options
|
|
|
|
// Should be included in main.c, as this is the first file that's compiled, so
|
|
|
|
// any configuration errors are caught right at the beginning of the build
|
|
|
|
// process
|
|
|
|
|
|
|
|
#ifndef __VALIDATE_H__
|
|
|
|
#define __VALIDATE_H__
|
|
|
|
|
2008-10-09 10:49:07 +00:00
|
|
|
#include "platform_conf.h"
|
2008-09-18 20:22:15 +00:00
|
|
|
|
|
|
|
// Can't define more than one console devices
|
|
|
|
#if defined( BUILD_CON_TCP ) && defined( BUILD_CON_GENERIC )
|
2009-02-24 22:09:22 +00:00
|
|
|
#error "Can't have two console devices (don't enable BUILD_CON_TCP and BUILD_CON_GENERIC in platform_conf.h at the same time)"
|
2008-09-18 20:22:15 +00:00
|
|
|
#endif // #if defined( BUILD_CON_TCP ) && defined( BUILD_CON_GENERIC )
|
|
|
|
|
|
|
|
// For TCP console we need to enable TCP support
|
|
|
|
#ifdef BUILD_CON_TCP
|
|
|
|
#ifndef BUILD_UIP
|
2009-02-24 22:09:22 +00:00
|
|
|
#error "BUILD_CON_TCP requires BUILD_UIP to be defined in platform_conf.h"
|
2008-09-18 20:22:15 +00:00
|
|
|
#endif // #ifndef BUILD_UIP
|
|
|
|
#endif // #ifdef BUILD_CON_TCP
|
|
|
|
|
|
|
|
// If TCP console is enabled, we don't need xmodem or term
|
|
|
|
// (they can still function separately over UART, but this doesn't make sense)
|
|
|
|
#ifdef BUILD_CON_TCP
|
|
|
|
#ifdef BUILD_XMODEM
|
2009-02-24 22:09:22 +00:00
|
|
|
#error "XMODEM doesn't work with TCP console. Disable BUILD_XMODEM in platform_conf.h"
|
2008-09-18 20:22:15 +00:00
|
|
|
#endif // #ifdef BUILD_XMODME
|
|
|
|
#ifdef BUILD_TERM
|
2009-02-24 22:09:22 +00:00
|
|
|
#error "ANSI terminal support doesn't work (yet) with TCP console. Disable BUILD_TERM in platform_conf.h"
|
2008-09-18 20:22:15 +00:00
|
|
|
#endif // #ifdef BUILD_TERM
|
|
|
|
#endif // #ifdef BUILD_CON_TCP
|
|
|
|
|
2008-09-20 15:14:05 +00:00
|
|
|
// For DHCP we need to have TCP/IP support
|
|
|
|
#ifdef BUILD_DHCPC
|
|
|
|
#ifndef BUILD_UIP
|
2009-02-24 22:09:22 +00:00
|
|
|
#error "DHCP client requires TCP/IP support (enable BUILD_UIP in platform_conf.h)"
|
2008-09-20 15:14:05 +00:00
|
|
|
#endif // #ifndef BUILD_UIP
|
|
|
|
#endif // #ifdef BUILD_DHCPC
|
|
|
|
|
2009-02-24 22:09:22 +00:00
|
|
|
// For DNS we need to have TCP/IP support
|
|
|
|
#ifdef BUILD_DNS
|
|
|
|
#ifndef BUILD_UIP
|
|
|
|
#error "DNS resolver requires TCP/IP support (enable BUILD_UIP in platform_conf.h)"
|
|
|
|
#endif // #ifndef BUILD_UIP
|
|
|
|
#endif // #ifdef BUILD_DNS
|
|
|
|
|
2008-09-18 20:22:15 +00:00
|
|
|
#endif // #ifndef __VALIDATE_H__
|