Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: src/platform/mbed/main.cpp
- Revision:
- 0:14e5e829dffe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/platform/mbed/main.cpp Wed Jul 21 12:50:41 2010 +0000
@@ -0,0 +1,38 @@
+/*
+# This file is Copyright 2009 Dean Hall.
+#
+# This file is part of the Python-on-a-Chip program.
+# Python-on-a-Chip is free software: you can redistribute it and/or modify
+# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
+#
+# Python-on-a-Chip is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
+# is seen in the file COPYING up one directory from this.
+*/
+
+
+#include "pm.h"
+
+
+#ifdef __cplusplus
+extern
+#endif
+unsigned char const usrlib_img[];
+
+
+int
+main(void)
+{
+ PmReturn_t retval;
+
+ /* Init PyMite */
+ retval = pm_init(MEMSPACE_PROG, (uint8_t *)usrlib_img);
+ PM_RETURN_IF_ERROR(retval);
+
+ /* Run the sample program */
+ retval = pm_run((uint8_t *)"main");
+
+ return (int)retval;
+}