Browse Source

APP_Framework/lib/:add cJSON library

pull/6/head
chunyexixiaoyu 1 year ago
parent
commit
3b74443dac
  1. 1
      APP_Framework/Applications/knowing_app/face_detect/Kconfig
  2. 5
      APP_Framework/Applications/knowing_app/face_detect/face_detect.c
  3. 6
      APP_Framework/lib/Kconfig
  4. 14
      APP_Framework/lib/SConscript
  5. 3
      APP_Framework/lib/cJSON/Kconfig
  6. 10
      APP_Framework/lib/cJSON/SConscript
  7. 0
      APP_Framework/lib/cJSON/cJSON.c
  8. 0
      APP_Framework/lib/cJSON/cJSON.h
  9. 3
      Ubiquitous/RT_Thread/bsp/k210/SConstruct
  10. 3
      Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/SConstruct

1
APP_Framework/Applications/knowing_app/face_detect/Kconfig

@ -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

5
APP_Framework/Applications/knowing_app/face_detect/face_detect.c

@ -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)

6
APP_Framework/lib/Kconfig

@ -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

14
APP_Framework/lib/SConscript

@ -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')

3
APP_Framework/lib/cJSON/Kconfig

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

10
APP_Framework/lib/cJSON/SConscript

@ -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')

0
APP_Framework/Applications/knowing_app/face_detect/cJSON.c → APP_Framework/lib/cJSON/cJSON.c

0
APP_Framework/Applications/knowing_app/face_detect/cJSON.h → APP_Framework/lib/cJSON/cJSON.h

3
Ubiquitous/RT_Thread/bsp/k210/SConstruct

@ -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)

3
Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/SConstruct

@ -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)

Loading…
Cancel
Save