Example #1
0
#ifndef LOG_ISR_ENTER
#define LOG_ISR_ENTER(intno)
#endif /* LOG_ISR_ENTER */

#ifndef LOG_ISR_LEAVE
#define LOG_ISR_LEAVE(intno)
#endif /* LOG_ISR_LEAVE */

/*
 *  Task Management Functions
 */

const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1);

static STK_T _kernel_stack_INIT_TASK[COUNT_STK_T(STACK_SIZE)];
static STK_T _kernel_stack_FUNC1_TASK[COUNT_STK_T(STACK_SIZE)];

const TINIB _kernel_tinib_table[TNUM_TSKID] = {
	{ (TA_ACT), (intptr_t)(0), (main), INT_PRIORITY(IDLE_PRIORITY), ROUND_STK_T(STACK_SIZE), (_kernel_stack_INIT_TASK), (TA_NULL), (NULL) },
	{ (TA_NULL), (intptr_t)(0), (func1_task), INT_PRIORITY(MID_PRIORITY), ROUND_STK_T(STACK_SIZE), (_kernel_stack_FUNC1_TASK), (TA_NULL), (NULL) }
};

TCB _kernel_tcb_table[TNUM_TSKID];

const ID _kernel_torder_table[TNUM_TSKID] = {
	INIT_TASK, FUNC1_TASK
};

/*
 *  Semaphore Functions
Example #2
0
#include <hrp2/kernel.h>
#include "ev3_gcc/dmloader/app/common/module_common.h"
#include "target/target_config.h"
#include "ev3_gcc/pil/platform_interface_layer.h"
#include "ev3_gcc/platform/csl.h"
#include <hrp2/arch/arm_gcc/am1808/chip_timer.h>
#include <hrp2/syssvc/syslog.h>
#include <hrp2/syssvc/banner.h>
#include "target/target_serial.h"
#include <hrp2/syssvc/serial.h>
#include <hrp2/syssvc/logtask.h>
#include "ev3_gcc/api/api.cfg.h"
#include "sample/app.h"

ID _module_id_APP_INIT_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_APP_INIT_TASK[COUNT_STK_T(STACK_SIZE)];

ID _module_id_BALANCE_CONTROL_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_BALANCE_CONTROL_TASK[COUNT_STK_T(STACK_SIZE)];

ID _module_id_LINE_TRACE_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_LINE_TRACE_TASK[COUNT_STK_T(STACK_SIZE)];

ID _module_id_TAIL_CONTROL_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_TAIL_CONTROL_TASK[COUNT_STK_T(STACK_SIZE)];

ID _module_id_SELECTED_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_SELECTED_TASK[COUNT_STK_T(STACK_SIZE)];

ID _module_id_MAIN_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_MAIN_TASK[COUNT_STK_T(STACK_SIZE)];
Example #3
0
#include "common/module_common.h"
#include "target_config.h"
#include "platform_interface_layer.h"
#include "csl.h"
#include "chip_timer.h"
#include "syssvc/syslog.h"
#include "syssvc/banner.h"
#include "target_serial.h"
#include "target_serial_dbsio.h"
#include "syssvc/serial.h"
#include "syssvc/logtask.h"
#include "api.cfg.h"
#include "app.h"

ID _module_id_APP_INIT_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_APP_INIT_TASK[COUNT_STK_T(STACK_SIZE)];

ID _module_id_MAIN_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_MAIN_TASK[COUNT_STK_T(STACK_SIZE)];

ID _module_id_TRACER_TASK __attribute__((section (".module.text")));
static STK_T _module_ustack_TRACER_TASK[COUNT_STK_T(STACK_SIZE)];

static const T_CTSK _module_ctsk_tab[3] = {
	{ TA_ACT, 0, _app_init_task, TPRI_APP_INIT_TASK, ROUND_STK_T(STACK_SIZE), _module_ustack_APP_INIT_TASK, DEFAULT_SSTKSZ, NULL },
	{ TA_ACT, 0, main_task, MAIN_PRIORITY, ROUND_STK_T(STACK_SIZE), _module_ustack_MAIN_TASK, DEFAULT_SSTKSZ, NULL },
	{ TA_NULL, 0, tracer_task, TRACER_PRIORITY, ROUND_STK_T(STACK_SIZE), _module_ustack_TRACER_TASK, DEFAULT_SSTKSZ, NULL },
};

const SIZE _module_cfg_entry_num = 3;