Commits

Anonymous committed 0cf4f8b

#30: mainlining. Merged 72:75 from branches/issue_0030_dwhall_create_r03 to trunk.

  • Participants
  • Parent commits bbc8f03
  • Tags pymite-03

Comments (0)

Files changed (6)

 :Author:    Dean Hall
 :Copyright: Copyright 2002 Dean Hall.
             See `License`_ for details.
-:Release:   02
+:Release:   03
 :Site:      http://pymite.python-hosting.com/
 :Id:        $Id: README 116 2006-08-24 13:42:09Z dwhall $
 
 own main() function following given examples and link in
 ``libpymvm.a`` and the appropriate PyMite native libraries.
 
-Contact
--------
+Discussion
+----------
 
-Please use the `PyMite Trac`_ issue tracking system
-space for all communications concerning PyMite.
-This will ensure that all issues are captured and
-available for public inspection.
+Please review the `PyMite Trac`_ project management space
+space for up-to-date information about PyMite.
+Please join the `PyMite maillist`_ for all communications concerning PyMite.
+This will ensure that FAQs can be found in the list archives and
+all issues are captured and available for public inspection.
 
 .. _`PyMite Trac`: http://pymite.python-hosting.com/
+.. _`PyMite maillist`: http://groups.google.com/group/pymite
+
+Thanks
+------
+
+My personal thanks go out to these people for their contribution to PyMite:
+
+    - Philipp Adelt: Enhancements to pmImgCreator.py, issues and fixes.
+    - www.webfaction.com: for providing quality, free project hosting on
+      www.python-hosting.com
 
 Release Notes
 -------------
 
-This is PyMite release 02
+This is PyMite release 03
+
+* Release 03, 2006/09/17
+
+    - #30:  Created Release 03 package
+    - #4:   Enabled compiler warnings as errors
+    - #7:   Unified licensing and copyright info in all files
+    - #16:  Created pm_init() that does the initial housekeeping
+    - #29:  Corrected function call in mmb.py's sleepms()
+    - #28:  Fixed loader to modules with root-level __NATIVE__ docstring load
+    - #2:   Separated stdlib from user app
+    - #27:  Made S16/U16 really be 16-bits on DESKTOP
+    - #20:  Added support for the assert statement
+    - #25:  Created slide-compatible illustration for build process
+    - #24:  Removed consts[0] == docstring assumption from pmImgCreator
+    - #3:   Made src/tests/Makefile clean better
+    - #23:  Removed absolute paths to allow building with WinAVR
+    - #18:  Removed "-ansi" compiler option from AVR builds
+    - #19:  Broadened target from ATMEGA103 to AVR
+    - #11:  Made src/tests/ build module images as C files, not header files
+    - #9:   Fixed BINARY_SUBSCR for case stringobj[intobj]
+    - #14:  Documented the development process
+    - #6:   Made pmImgCreator append a null terminator to image list
+    - #8:   Removed leftover uses of ``HOST_``
+    - #12:  Made mem_* funcs always use RAM memspace when target is DESKTOP
+    - #15:  All mem_*() funcs and pointers in the vm should use unsigned not
+      signed or void
+    - #1:   Transfered PyMite repository to http://pymite.python-hosting.com
 
 * Release 02, 2006/08/11
 
     - N/A:  Initial release made for PyCon 2003.
     - N/A:  Compiles for desktop and Atmel ATmega103.
 
-Thanks
-------
-
-My personal thanks go out to these people for their contribution to PyMite:
-
-    - Philipp Adelt: Enhancements to pmImgCreator.py, issues and fixes.
-
 .. :mode=rest:

File docs/src/HowToReleasePyMite.txt

+.. Copyright 2006 Dean Hall
+   Permission is granted to copy, distribute and/or modify this document
+   under the terms of the GNU Free Documentation License, Version 1.2
+   or any later version published by the Free Software Foundation;
+   with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+   Texts.  A copy of the license is in the file docs/LICENSE.
+
+=====================
+How to Release PyMite
+=====================
+
+:Author:    Dean Hall
+:Id:        $Id$
+
+Purpose
+-------
+
+This document describes how to make a package release of the PyMite project.
+In doing so, it is intended strictly for the PyMite release manager.
+
+Overview
+--------
+
+Creating a release of PyMite involves updating information in a number of places
+and performing some housekeeping actions, but it is a fairly straightforward
+process that can be accomplished by performing the following list of actions
+in the prescribed order:
+
+    - Create a ticket in the issue tracking system
+
+        - Give the ticket a title like "Create release 03"
+        - Assign the ticket to the proper milestone
+        - Accept the ticket
+
+    - Create a branch for the issue (there will be changes to files)
+    - Edit the ``README`` file:
+
+        - Update the ":Release:" number near the top of the file
+        - Add thanks to anyone who gave helpful feedback
+        - In the "Release Notes" section, create a new entry for the release
+        - Add a line item into the entry for each ticket that went into this
+          release.
+
+    - Edit ``src/vm/py.h``, update the value for the definition, ``PY_RELEASE``
+    - Perform all the standard builds to see that they complete without error
+
+        - ``make html``
+        - ``make TAGS``
+        - ``make check``
+        - ``make clean; make TARGET=AVR; cd src/sample; make``
+        - Record the size of the sample app in the ticket
+
+    - Verify that a sample app runs on an AVR device; this can be done in
+      one of the following ways:
+
+        - Download and run a known good app on an actual AVR device
+        - Build and run a known good app in Atmel's AvrStudio simulator.
+        - Run a known good app on an AVR simulator
+
+    - Check-in the branch
+    - Mainline the branch
+    - Tag the mainline: ``svn cp https://svn.pymite.python-hosting.com/trunk
+      https://svn.pymite.python-hosting.com/tags/pymite-RR``
+    - Make the distribution file:
+
+        - Get a fresh `export` of the tag so no ``.svn`` artifacts are present;
+          the directory should be named ``pymite-RR``
+        - Run ``make dist PYMITE_RELEASE=RR`` where `RR` is the release number
+        - Tar and gzip the directory so it is named ``pymite-RR.tgz``
+
+    - Attach the distribution file to the wiki front page
+    - Announce the release on the `wiki`_ front page and the `PyMite maillist`_.
+
+.. _`wiki`: http://pymite.python-hosting.com/
+.. _`PyMite maillist`: pymite@googlegroups.com
+
+.. :mode=rest:

File src/sample/sample.c

 
 #include "py.h"
 
-extern unsigned char stdlib_img[];
+
 extern unsigned char usrlib_img[];
 
 
 int main(void)
 {
-    /* ptr to code imgs */
-    P_U8 pimg;
-    pPyObj_t pstring = C_NULL;
-    /* ptr to module obj */
-    pPyObj_t pmod;
-    /* name of module to run */
-    P_U8 modstr = (P_U8)"sample";
-    PyReturn_t retval = PY_RET_OK;
+    PyReturn_t retval;
 
-    /* heap pointers are a part of globals, so init globals first */
-    global_init();
-    heap_init();
-
-    /* load std image info */
-    pimg = (P_U8)&stdlib_img;
-    retval = img_findInMem(MEMSPACE_RAM, &pimg);
+    retval = pm_init(MEMSPACE_RAM, usrlib_img);
     PY_RETURN_IF_ERROR(retval);
 
-    /* load usr image info */
-    pimg = (P_U8)&usrlib_img;
-    retval = img_findInMem(MEMSPACE_RAM, &pimg);
-    PY_RETURN_IF_ERROR(retval);
-
-    /* import module from global struct */
-    retval = string_new(&modstr, &pstring);
-    PY_RETURN_IF_ERROR(retval);
-    retval = mod_import(pstring, &pmod);
-    PY_RETURN_IF_ERROR(retval);
-    /* load builtins into root module */
-    retval = global_loadBuiltins((pPyFunc_t)pmod);
-    PY_RETURN_IF_ERROR(retval);
-
-    /* XXX set "__name__" == "__main__" in mod's attrs here? */
-
-    /* interpret the module's bcode */
-    retval = interpret((pPyFunc_t)pmod);
-
-    return retval;
+    retval = pm_run((P_U8)"sample");
+    return (int)retval;
 }

File src/tools/pmImgCreator.py

                           )
                        )
         if self.memspace.lower() == "flash":
-            fileBuff.append("#if not defined(__AVR__)\n"
+            fileBuff.append("#if !defined(__AVR__)\n"
                             "#error Defining image memspace for "
                             "non-AVR-devices is not supported!\n"
                             "#endif\n"

File src/vm/Makefile

 
 # Build the standard library into an image file and native function file
 $(SOURCE_IMG) $(SOURCE_NAT) : $(PMSTDLIB_SOURCES)
-	$(PMIMGCREATOR) -c -o $(SOURCE_IMG) --native-file=$(SOURCE_NAT) $(PMSTDLIB_SOURCES)
+	$(PMIMGCREATOR) -c --memspace=flash -o $(SOURCE_IMG) --native-file=$(SOURCE_NAT) $(PMSTDLIB_SOURCES)
 
 # Lists the size of the obejcts in the archive
 size : $(PRODUCT_VM)
  * Value indicating the release of PyMite
  *
  * This value should be incremented for every public release.
- * It helps locate a bug when used in conjunction with a fileID
+ * It helps locate a defect when used in conjunction with a fileID
  * and line number.
- *
- * Release  Description
- * -------  -----------
- * 1        First release of zip on SourceForge
- * 2        Second release on SourceForge
  */
-#define PY_RELEASE  2
+#define PY_RELEASE  3
 
 
 /***************************************************************