00001 /* 00002 # This file is Copyright 2009 Dean Hall. 00003 # 00004 # This file is part of the Python-on-a-Chip program. 00005 # Python-on-a-Chip is free software: you can redistribute it and/or modify 00006 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. 00007 # 00008 # Python-on-a-Chip is distributed in the hope that it will be useful, 00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00011 # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 00012 # is seen in the file COPYING up one directory from this. 00013 */ 00014 00015 00016 #include "pm.h" 00017 00018 00019 #ifdef __cplusplus 00020 extern 00021 #endif 00022 unsigned char const usrlib_img[]; 00023 00024 00025 int 00026 main(void) 00027 { 00028 PmReturn_t retval; 00029 00030 /* Init PyMite */ 00031 retval = pm_init(MEMSPACE_PROG, (uint8_t *)usrlib_img); 00032 PM_RETURN_IF_ERROR(retval); 00033 00034 /* Run the sample program */ 00035 retval = pm_run((uint8_t *)"main"); 00036 00037 return (int)retval; 00038 }