rel_1.6.0 init

This commit is contained in:
guocheng.kgc 2020-06-18 20:06:52 +08:00 committed by shengdong.dsd
commit 27b3e2883d
19359 changed files with 8093121 additions and 0 deletions

View file

@ -0,0 +1,27 @@
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef K_BACKTRACE_H
#define K_BACKTRACE_H
#ifdef __cplusplus
extern "C"
{
#endif
#if (RHINO_CONFIG_BACKTRACE > 0)
/* show backtrace now */
void krhino_backtrace_now(void);
/* show backtrace for the task */
void krhino_backtrace_task(char *taskname);
#endif
#ifdef __cplusplus
}
#endif
#endif /* K_BACKTRACE_H */

View file

@ -0,0 +1,25 @@
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef K_DBG_API_H
#define K_DBG_API_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdio.h>
#include "k_api.h"
#include "k_dftdbg_config.h"
#include "k_infoget.h"
#include "k_overview.h"
#include "k_panic.h"
#include "k_backtrace.h"
#ifdef __cplusplus
}
#endif
#endif /* K_DBG_API_H */

View file

@ -0,0 +1,33 @@
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef K_DFTDBG_CONFIG_H
#define K_DFTDBG_CONFIG_H
#ifndef RHINO_CONFIG_BACKTRACE
#define RHINO_CONFIG_BACKTRACE 1
#endif
/* If AliOS task over the Exception/Fatal Error */
#ifndef RHINO_CONFIG_PANIC
#define RHINO_CONFIG_PANIC 1
#endif
#if (RHINO_CONFIG_PANIC > 0)
/* If the mcu printf depends on isr */
#ifndef RHINO_CONFIG_PANIC_PRT_INT
#define RHINO_CONFIG_PANIC_PRT_INT 1
#endif
#ifndef RHINO_CONFIG_PANIC_OVERVIEW
#define RHINO_CONFIG_PANIC_OVERVIEW 1
#endif
#endif
#ifndef RHINO_CONFIG_NORMAL_PRT
#define RHINO_CONFIG_NORMAL_PRT 1
#endif
#endif /* K_DFTDBG_CONFIG_H */

View file

@ -0,0 +1,39 @@
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef K_INFOGET_H
#define K_INFOGET_H
#ifdef __cplusplus
extern "C"
{
#endif
/**
* This function will get task handle by its name.
*/
ktask_t *krhino_task_find(char *name);
/**
* This function will return true if task is ready.
*/
int krhino_is_task_ready(ktask_t *task);
/**
* This function will return true if task is running.
*/
int krhino_task_is_running(ktask_t *task);
/**
* This function will get the bottom of task stack
* @param[in] task NULL for active task
* @return the bottom of stack
*/
void *krhino_task_stack_bottom(ktask_t *task);
#ifdef __cplusplus
}
#endif
#endif /* K_INFOGET_H */

View file

@ -0,0 +1,69 @@
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef K_OVERVIEW_H
#define K_OVERVIEW_H
#ifdef __cplusplus
extern "C"
{
#endif
/**
* convert int to ascii(HEX)
* while using format % in libc, malloc/free is involved.
* this function avoid using malloc/free. so it works when heap corrupt.
* @param[in] num number
* @param[in] str fix 8 character str
* @return str
*/
char *k_int2str(int num, char *str);
/**
* This function print the overview of heap
* @param[in] print_func function to output information, NULL for
* "printf"
*/
void krhino_mm_overview(int (*print_func)(const char *fmt, ...));
/**
* This function print the overview of tasks
* @param[in] print_func function to output information, NULL for
* "printf"
*/
void krhino_task_overview(int (*print_func)(const char *fmt, ...));
/**
* This function print the overview of buf_queues
* @param[in] print_func function to output information, NULL for
* "printf"
*/
void krhino_buf_queue_overview(int (*print_func)(const char *fmt, ...));
/**
* This function print the overview of queues
* @param[in] print_func function to output information, NULL for
* "printf"
*/
void krhino_queue_overview(int (*print_func)(const char *fmt, ...));
/**
* This function print the overview of sems
* @param[in] print_func function to output information, NULL for
* "printf"
*/
void krhino_sem_overview(int (*print_func)(const char *fmt, ...));
/**
* This function print the overview of all
* @param[in] print_func function to output information, NULL for
* "printf"
*/
void krhino_overview();
#ifdef __cplusplus
}
#endif
#endif /* K_OVERVIEW_H */

View file

@ -0,0 +1,24 @@
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef K_PANIC_H
#define K_PANIC_H
#ifdef __cplusplus
extern "C"
{
#endif
#if (RHINO_CONFIG_PANIC > 0)
/* fault/exception entry
notice: this function maybe reentried by double exception */
void panicHandler(void *context);
void debug_fatal_error(kstat_t err, char *file, int line);
#endif
#ifdef __cplusplus
}
#endif
#endif /* K_PANIC_H */