add rtThreadBooter

This commit is contained in:
pikastech 2021-12-07 21:19:10 +08:00
parent e49aca9059
commit 0d4afb2f31
3 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,27 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-12-07 lyon the first version
*/
#include <rtthread.h>
#include "pikaPlatform.h"
/* sprintf support */
int __platform_sprintf(char* buff, char* fmt, ...) {
va_list args;
va_start(args, fmt);
int res = rt_vsprintf(buff, fmt, args);
va_end(args);
return res;
}
int __platform_vsprintf(char* buff, char* fmt, va_list args){
return rt_vsprintf(buff, fmt, args);
}
int __platform_vsnprintf(char* buff, size_t size, const char* fmt, va_list args){
return rt_vsnprintf(buff, size, fmt, args);
}

View File

@ -0,0 +1,15 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-12-07 lyon the first version
*/
#ifndef PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_
#define PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_
#include <rtthread.h>
#endif /* PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_ */

View File

@ -0,0 +1,22 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-12-07 lyon the first version
*/
#include <rtthread.h>
#include <pikaScript.h>
static int rt_pika_main(void)
{
PikaObj * pikaMain = pikaScriptInit();
printf(">>>\r\n");
while(1){
}
return 0;
}
INIT_APP_EXPORT(rt_pika_main);