diff --git a/package/RTthreadBooter/pika_config.c b/package/RTthreadBooter/pika_config.c new file mode 100644 index 000000000..6dddb4e06 --- /dev/null +++ b/package/RTthreadBooter/pika_config.c @@ -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 +#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); +} diff --git a/package/RTthreadBooter/pika_config.h b/package/RTthreadBooter/pika_config.h new file mode 100644 index 000000000..490a363e1 --- /dev/null +++ b/package/RTthreadBooter/pika_config.h @@ -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 + + +#endif /* PACKAGES_PIKASCRIPT_LATEST_PIKASCRIPT_LIB_RTBOOTER_PIKA_CONFIG_H_ */ diff --git a/package/RTthreadBooter/rt_main.c b/package/RTthreadBooter/rt_main.c new file mode 100644 index 000000000..61a8da08c --- /dev/null +++ b/package/RTthreadBooter/rt_main.c @@ -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 +#include + +static int rt_pika_main(void) +{ + PikaObj * pikaMain = pikaScriptInit(); + printf(">>>\r\n"); + while(1){ + + } + return 0; +} +INIT_APP_EXPORT(rt_pika_main);