Hello,
of course, it is still possible to use the Generic Platform Package on a target without operating system (bare-metal). The new file ew_bsp_os.c introduced with version 12 is just an abstraction of an underlying operating system - if any. Due to the fact that in case of bare-metal the implementation depends on your particular target, there is no default implementation included.
In your case, you need to implement the two functions: EwBspOsGetTicks() and EwBspOsDelay().
As for your second question, please keep in mind that even though there are no parallel threads in case of bare-metal, it could happen that EwInvoke() or EwInvokeCopy() are called from an interrupt service routine (ISR). Therefore, the atomic_fetch_add() is necessary also in case of bare-metal.
In case there are no atomic operations supported for your target, you can use the following implementation:
int EwAtomicFetchAndAdd( XAtomic* aAtomic, int aArg )
{
#ifdef EW_USE_ATOMIC_WORKAROUND
long oldValue;
__disable_irq();
oldValue = *aAtomic;
*aAtomic += aArg;
__enable_irq();
return oldValue;
#else
return (int)atomic_fetch_add( aAtomic, aArg );
#endif
}
Does this work on your target?
Best regards,
Manfred Schweyer.