mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-13 18:08:54 +00:00
v1.0.3
This commit is contained in:
0
application/rt-thread/helloworld/Kconfig
Normal file
0
application/rt-thread/helloworld/Kconfig
Normal file
18
application/rt-thread/helloworld/SConscript
Normal file
18
application/rt-thread/helloworld/SConscript
Normal file
@@ -0,0 +1,18 @@
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = Glob('*.c')
|
||||
CPPPATH = [cwd, ]
|
||||
|
||||
CFLAGS = ' -c -ffunction-sections'
|
||||
|
||||
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, CFLAGS=CFLAGS)
|
||||
|
||||
list = os.listdir(cwd)
|
||||
for item in list:
|
||||
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
||||
group = group + SConscript(os.path.join(item, 'SConscript'))
|
||||
|
||||
Return('group')
|
||||
32
application/rt-thread/helloworld/main.c
Normal file
32
application/rt-thread/helloworld/main.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2022, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Authors: weilin.peng@artinchip.com
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifdef AIC_AB_SYSTEM_INTERFACE
|
||||
#include <absystem.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <dfs.h>
|
||||
#include <dfs_fs.h>
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef AIC_AB_SYSTEM_INTERFACE
|
||||
char target[32] = { 0 };
|
||||
|
||||
aic_ota_status_update();
|
||||
aic_get_rodata_to_mount(target);
|
||||
printf("Mount APP in blk %s\n", target);
|
||||
|
||||
if (dfs_mount(target, "/rodata", "elm", 0, 0) < 0)
|
||||
printf("Failed to mount elm\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user