Does anyone know if there is a way to make a #define in 'C' visible to A51 code (or visa-versa)? I know how to make a header file in Hi-Tech C51 that will let 'C' and 'A51 definitions coexist, but can't figure out how to this with Keil.
In Hi-Tech's C51 compiler you can create a common ('C' and 'A51') header file like this:
But when I try this in Keil it chokes on the ; before the #define.
Any ideas?
Read-Only
Author Support Intl Keil
Posted 27-Nov-2001 07:38 GMT
Toolset C51
RE: Sharing #defines and EQU statements
Support Intl Keil
A51 Version 6 adds a C preprocessor to the assembler. Therefore it is possible to use #define statements also in the assembler language. If you have an older version of our tools you should consider to upgrade it.
you are able to pass the specific "variable" with the command line : SET(WATCHDOG=1). You can define different targets for example one with watchdog and an other without watchdog.
...Leo
Read-Only
Author Marques Girardelli
Posted 30-Nov-2001 00:00 GMT
Toolset C51
RE: Sharing #defines and EQU statements
Marques Girardelli
Assuming you have version 6 or newer of A51/C51, just take the semi-colons out of your code example and it should assemble fine. The C preprocessor in A51 will process those lines.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.