APP_Framework/lib/:add cJSON library

This commit is contained in:
chunyexixiaoyu 2021-08-04 16:24:16 +08:00
parent 1afdd8c056
commit 3b74443dac
10 changed files with 38 additions and 7 deletions

View File

@ -4,4 +4,5 @@ config FACE_DETECT
depends on DRV_USING_OV2640
depends on USING_KPU_POSTPROCESSING
depends on USING_YOLOV2
select LIB_USING_CJSON
default n

View File

@ -1,6 +1,7 @@
#include <transform.h>
#include "cJSON.h"
#ifdef LIB_USING_CJSON
#include <cJSON.h>
#endif
#include "region_layer.h"
#define ANCHOR_NUM 5
#define STACK_SIZE (128 * 1024)

View File

@ -1,5 +1,5 @@
menu "app lib"
menu "lib"
choice
prompt "chose a kind of lib for app"
default APP_SELECT_NEWLIB
@ -10,5 +10,5 @@ menu "app lib"
config APP_SELECT_OTHER_LIB
bool "app select other lib"
endchoice
source "$APP_DIR/lib/cJSON/Kconfig"
endmenu

View File

@ -0,0 +1,14 @@
import os
Import('RTT_ROOT')
from building import *
cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(path, 'SConscript'))
Return('objs')

View File

@ -0,0 +1,3 @@
menuconfig LIB_USING_CJSON
bool "USING cJSON"
default n

View File

@ -0,0 +1,10 @@
from building import *
import os
cwd = GetCurrentDir()
src = Glob('*.c')
group = DefineGroup('cjson', src, depend = ['LIB_USING_CJSON'], CPPPATH = [cwd])
Return('group')

View File

@ -59,6 +59,7 @@ objs.extend(SConscript(os.getcwd() + '/../../../../APP_Framework/Framework/SCons
# include APP_Framework/Applications
objs.extend(SConscript(os.getcwd() + '/../../../../APP_Framework/Applications/SConscript'))
# include APP_Framework/lib
objs.extend(SConscript(os.getcwd() + '/../../../../APP_Framework/lib/SConscript'))
# make a building
DoBuilding(TARGET, objs)

View File

@ -81,6 +81,7 @@ objs.extend(SConscript(os.getcwd() + '/../../../../APP_Framework/Framework/SCons
# include APP_Framework/Applications
objs.extend(SConscript(os.getcwd() + '/../../../../APP_Framework/Applications/SConscript'))
# include APP_Framework/lib
objs.extend(SConscript(os.getcwd() + '/../../../../APP_Framework/lib/SConscript'))
# make a building
DoBuilding(TARGET, objs)