mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
7a4fa9aa3d
* update to v1.8.7 * Update pikaBeforBuild-keil.bat * remove trash * cmsis-pack v0.9.2 * Delete README.md * rm big bin file Co-authored-by: Gabriel Wang <gabriel.wang@arm.com>
31 lines
971 B
C
31 lines
971 B
C
/* ******************************** */
|
|
/* Warning! Don't modify this file! */
|
|
/* ******************************** */
|
|
#include "PikaMain.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
PikaObj *__pikaMain;
|
|
PikaObj *pikaScriptInit(void){
|
|
__platform_printf("======[pikascript packages installed]======\r\n");
|
|
__platform_printf("PikaStdLib==v1.8.7\r\n");
|
|
__platform_printf("pikascript-core==v1.8.7\r\n");
|
|
__platform_printf("===========================================\r\n");
|
|
__pikaMain = newRootObj("pikaMain", New_PikaMain);
|
|
extern unsigned char pikaModules_py_a[];
|
|
obj_linkLibrary(__pikaMain, pikaModules_py_a);
|
|
#if PIKA_INIT_STRING_ENABLE
|
|
obj_run(__pikaMain,
|
|
"import PikaStdLib\n"
|
|
"print('hello PikaScript!')\n"
|
|
"mem = PikaStdLib.MemChecker()\n"
|
|
"print('mem used max:')\n"
|
|
"mem.max()\n"
|
|
"\n");
|
|
#else
|
|
obj_runModule(__pikaMain, "main");
|
|
#endif
|
|
return __pikaMain;
|
|
}
|
|
|