I was wondering if there was a ‘hidden’ #define for Oasis 2.02 dev tools to determine if a RTE or Target build was being undertaken?
Reason being that I’m working with multiple tasks and some of the adl_ctxXXXX() functions perform quite differently when running under each different build type. It would be nice to be able to automatically swap in/out the appropriate bits of code workarounds.
The two functions that I’ve noticed this behavour in are:
adl_ctxSleep() (in RTL, process goes to sleep and never wakes) (in Target, operates as described)
adl_ctxSuspend() (in RTL, when calling it on it’s own task it returns immediately, not suspending task) (in Target, operates as described)
Also noted that timing values for adl_tmrSubscribe() are almost an order of magnitude slower when running in RTE mode - although this is to be expected considering that RTE is emulating the hardware on the host PC
// Fix fault in wm_types.h, which relies upon a definition of REMOTETASKS, but
// the Project defines only __REMOTETASKS__ !!
// Without this fix, the definitions of NULL, USE_PROTOTYPES, and _PROTO are incorrect
// in Remote builds!
#if defined __REMOTETASKS__
#define REMOTETASKS
#endif
I’m not sure if Wavecom have actually fixed the bug mentioned above - but I keep that in anyhow!
However, in (my copy of) Oasis 2.02, there is no mention of REMOTETASKS in wm_types.h. I grep’ed all the files in the ADL directory, and only found a couple of cases where REMOTETASKS is used, none where it is defined. Looks like the bug you referred to has been fixed…
Out of interest, I’ve posted my copy of wm_types.h.
/**
* @file wm_types.h
* @brief Wavecom standard types and Wavecom standard macros definition
*
* This file defines standard integer types which should be used
* throughout all Wavecom source files to ensure both platform and
* compiler portability: the ANSI C89 standard does not define such
* portable types, but although C99 finally does and both GCC and ARMCC
* make them available in the C99 standard "stdint.h" include file,
* compilers such as Microsoft's or many source verification tools
* still use or need their own type definitions.
*
* This file and "wm_macros.h" should supersede the previous "stdcomp.h", which overrides
* the Borland C++ include file or the RogueWave C++ library include file,
* and the previous "wm_types.ht" which basically had the same contents
* as "stdcomp.h" but was intended to be delivered to Open MMI layers
* (and had a non C standard name).
*/
#ifndef WM_TYPES_H
#define WM_TYPES_H
/****************************************************************************/
/* AT LEAST ANSI/ISO C90 COMPLIANCE IS REQUIRED */
/****************************************************************************/
#include <stddef.h>
/****************************************************************************/
/* WAVECOM INTEGER TYPES */
/****************************************************************************/
/* Modern ARM compilers and GCC */
#if (defined(__ARMCC_VERSION)&&(__ARMCC_VERSION >= 120000)) || defined(__GNUC__)
#include <stdint.h>
typedef uint8_t u8;
typedef int8_t s8;
typedef uint16_t u16;
typedef int16_t s16;
typedef uint32_t u32;
typedef int32_t s32;
typedef uint64_t u64;
typedef int64_t s64;
#elif defined(_MSC_VER) /* Microsoft C (Visual C++) */
typedef unsigned _int8 u8;
typedef _int8 s8;
typedef unsigned _int16 u16;
typedef _int16 s16;
typedef unsigned _int32 u32;
typedef _int32 s32;
typedef unsigned _int64 u64;
typedef _int64 s64;
#elif defined(S_SPLINT_S) /* Secure programming lint */
/* Splint natively knows about ISO standard int types */
#define u8 uint8_t
#define s8 int8_t
#define u16 uint16_t
#define s16 int16_t
#define u32 uint32_t
#define s32 int32_t
#define u64 uint64_t
#define s64 int64_t
#else /* other old ARM compilers (SDT/Jumpstart/Norcroft) and unknown stuff */
typedef unsigned char u8;
typedef signed char s8;
typedef unsigned short int u16;
typedef short int s16;
typedef unsigned long int u32;
typedef long int s32;
typedef unsigned long long int u64;
typedef long long int s64;
#endif
/****************************************************************************/
/* BOOLEAN RELATED DEFINITIONS */
/****************************************************************************/
/* The bool type is a standard type in C++,
* note that ISO C99 has introduced a new boolean type for C, "_Bool" */
#ifndef __cplusplus
/* Note that in C++, sizeof(bool) == 1 */
typedef unsigned char bool;
#define TRUE 1
#define FALSE 0
#define true TRUE
#define false FALSE
#endif
/****************************************************************************/
/* OTHER WAVECOM SPECIFIC TYPES */
/****************************************************************************/
typedef char ascii; /* For ASCIIZ strings */
typedef unsigned long Primitive; /* For messages IDs */
/****************************************************************************/
/* Methuselah's corner:
* still supporting definitions once required by non-ANSI compilers.
* Many source files still use them */
#define CONST const
#define VOID void
/****************************************************************************/
/* OK and ERROR are return codes used by many software elements */
#define OK 0
#define ERROR -1
#endif /* WM_TYPES_H not defined */