概述
官方文档主要修改
为了实现log服务
1,在log_service.h 取消注释
#ifndef LOG_SERVICE_H
#define LOG_SERVICE_H
#include "dlist.h"
/*
* Include user defined options first. Anything not defined in these files
* will be set to standard values. Override anything you dont like!
*/
#if defined(CONFIG_PLATFORM_8195A) || defined(CONFIG_PLATFORM_8711B)
#include "platform_opts.h"
#include "platform_stdlib.h"
#endif
#ifdef __ICCARM__
//#define STRINGIFY(s) #s
//#define SECTION(_name) _Pragma( STRINGIFY(location=_name))
#define log_module_init(fn)
SECTION(".data.log_init") __root static void* log_##fn = (void*)fn
#elif defined(__CC_ARM)
#define log_module_init(fn)
static void* log_##fn __attribute__((section(".data.log_init"))) = (void*)fn;
#define DiagPrintf printf
#elif defined(__GNUC__)
#define log_module_init(fn)
static void* log_##fn __attribute__((section(".data.log_init"))) = (void*)fn;
#else
#error "not implement"
#endif
//#define log_module_init(fn)
#define ATC_INDEX_NUM 32
#ifndef SUPPORT_LOG_SERVICE
#define SUPPORT_LOG_SERVICE 1
#endif
//LOG_SERVICE_BUFLEN: default, only 63 bytes could be used for keeping input
// cmd, the last byte is for string end ('