builtin

August 30, 2018 ยท View on GitHub

The builtin supports registering commands in TASH through Makefile without calling any TASH public API. This helps in porting the application directly to TinyAra without changing application's code.
It is needed only when TASH is enabled.

How to use

Configuration

Enable configuration of builtin with menuconfig

cd $TIZENRT_BASEDIR
cd os
make menuconfig

Select menu

Application Configuration -> [*] Support builtin applications

Makefile

  1. Add calling REGISTER at context tab
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
	$(call REGISTER,$(APPNAME),$(FUNCNAME),$(THREADEXEC),$(PRIORITY),$(STACKSIZE))

context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
  1. Include apps/Make.defs to use REGISTER
include $(APPDIR)/Make.defs
  1. Set arguments, command name, callback function and execution type
APPNAME =
FUNCNAME =
THREADEXEC =
PRIORITY =
STACKSIZE =

For arguments details, please refer Public APIs [tab] of TASH README