This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How I can predefine C macros from commad line in A51?

I want select configuration from command line.
In A51 I cann't define __CONFIG__ as C macros.
"config.h" include in C and ASM files.
config.h

#ifndef _CONFIG_H
#define _CONFIG_H

#define CONFIG_DEBUG        0
#define CONFIG_TEST         1
#define CONFIG_RELEASE      2

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#if     __CONFIGx__ == CONFIG_DEBUG

#define DEBUG                   1
#define xTECH_ROM               1
#define ENABLE_EPROM            1
#define LANG                    UKR
#define _RESTAURANT_MODE        1
#define PRINT_LOGO_FROM_ROM     1

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#elif   __CONFIGx__ == CONFIG_TEST

#define SIMULATOR               1

#define DEBUG                   1
#define xTECH_ROM               1
#define ENABLE_EPROM            1
#define LANG                    UKR
#define _RESTAURANT_MODE        1
#define INTERNAL_TEST           1
#define xPRINT_LOGO_FROM_ROM    1

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#elif   __CONFIGx__ == CONFIG_RELEASE

#define xDEBUG                  1
#define xTECH_ROM               1
#define ENABLE_EPROM            1
#define LANG                    UKR
#define _RESTAURANT_MODE        1
#define xPRINT_LOGO_FROM_ROM    1

#endif
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#endif

0