python-on-a-chip online compiler

Dependencies:   mbed TSI

/media/uploads/va009039/p14p-f446re.png

more info: python-on-a-chip

Committer:
va009039
Date:
Thu Apr 14 22:32:57 2016 +0000
Revision:
15:94ca5c8003e5
Parent:
0:65f1469d6bfb
update Nucleo-F401RE.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 0:65f1469d6bfb 1 /*
va009039 0:65f1469d6bfb 2 # This file is Copyright 2010 Dean Hall.
va009039 0:65f1469d6bfb 3 # This file is part of the PyMite VM.
va009039 0:65f1469d6bfb 4 # This file is licensed under the MIT License.
va009039 0:65f1469d6bfb 5 # See the LICENSE file for details.
va009039 0:65f1469d6bfb 6 */
va009039 0:65f1469d6bfb 7
va009039 0:65f1469d6bfb 8
va009039 0:65f1469d6bfb 9 #ifndef __PM_EMPTY_PM_FEATURES_H__
va009039 0:65f1469d6bfb 10 #define __PM_EMPTY_PM_FEATURES_H__
va009039 0:65f1469d6bfb 11
va009039 0:65f1469d6bfb 12
va009039 0:65f1469d6bfb 13 /**
va009039 0:65f1469d6bfb 14 * \file
va009039 0:65f1469d6bfb 15 * \brief Platform feature descriptions and dependency checks
va009039 0:65f1469d6bfb 16 *
va009039 0:65f1469d6bfb 17 * This file explains the purpose of all of the HAVE_* features
va009039 0:65f1469d6bfb 18 * and provides logical checks for features that depend on other features.
va009039 0:65f1469d6bfb 19 *
va009039 0:65f1469d6bfb 20 * A platform defines the features it wants in src/platform/<plat>/pmfeatures.py
va009039 0:65f1469d6bfb 21 * A tool generates C HAVE_* definitions in pmfeatures.h from pmfeatures.py.
va009039 0:65f1469d6bfb 22 *
va009039 0:65f1469d6bfb 23 *
va009039 0:65f1469d6bfb 24 * HAVE_PRINT
va009039 0:65f1469d6bfb 25 * ----------
va009039 0:65f1469d6bfb 26 *
va009039 0:65f1469d6bfb 27 * When defined, bytecodes PRINT_ITEM and PRINT_NEWLINE are supported. Along
va009039 0:65f1469d6bfb 28 * with these, helper routines in the object type are compiled in that allow
va009039 0:65f1469d6bfb 29 * printing of the object.
va009039 0:65f1469d6bfb 30 * REQUIRES stdio.h to have snprintf()
va009039 0:65f1469d6bfb 31 *
va009039 0:65f1469d6bfb 32 *
va009039 0:65f1469d6bfb 33 * HAVE_GC
va009039 0:65f1469d6bfb 34 * -------
va009039 0:65f1469d6bfb 35 *
va009039 0:65f1469d6bfb 36 * When defined, the code to perform mark-sweep garbage collection is included
va009039 0:65f1469d6bfb 37 * in the build and automatic GC is enabled. When undefined the allocator
va009039 0:65f1469d6bfb 38 * will distribute memory until none is left, after which a memory exception
va009039 0:65f1469d6bfb 39 * will occur.
va009039 0:65f1469d6bfb 40 *
va009039 0:65f1469d6bfb 41 *
va009039 0:65f1469d6bfb 42 * HAVE_FLOAT
va009039 0:65f1469d6bfb 43 * ----------
va009039 0:65f1469d6bfb 44 *
va009039 0:65f1469d6bfb 45 * When defined, the code to support floating point objects is included
va009039 0:65f1469d6bfb 46 * in the build.
va009039 0:65f1469d6bfb 47 * Issue #148 Create configurable float datatype
va009039 0:65f1469d6bfb 48 *
va009039 0:65f1469d6bfb 49 *
va009039 0:65f1469d6bfb 50 * HAVE_DEL
va009039 0:65f1469d6bfb 51 * --------
va009039 0:65f1469d6bfb 52 *
va009039 0:65f1469d6bfb 53 * When defined, the code to support the keyword del is included in the build.
va009039 0:65f1469d6bfb 54 * This involves the bytecodes: DELETE_SUBSCR, DELETE_NAME, DELETE_ATTR,
va009039 0:65f1469d6bfb 55 * DELETE_GLOBAL and DELETE_FAST.
va009039 0:65f1469d6bfb 56 *
va009039 0:65f1469d6bfb 57 *
va009039 0:65f1469d6bfb 58 * HAVE_IMPORTS
va009039 0:65f1469d6bfb 59 * ------------
va009039 0:65f1469d6bfb 60 *
va009039 0:65f1469d6bfb 61 * When defined, the code to support the IMPORT_FROM and IMPORT_STAR styles
va009039 0:65f1469d6bfb 62 * is included in the build.
va009039 0:65f1469d6bfb 63 *
va009039 0:65f1469d6bfb 64 *
va009039 0:65f1469d6bfb 65 * HAVE_DEFAULTARGS
va009039 0:65f1469d6bfb 66 * ----------------
va009039 0:65f1469d6bfb 67 *
va009039 0:65f1469d6bfb 68 * When defined, the code to support default arguments to functions is included
va009039 0:65f1469d6bfb 69 * in the build.
va009039 0:65f1469d6bfb 70 * Issue #157 Support default args
va009039 0:65f1469d6bfb 71 *
va009039 0:65f1469d6bfb 72 *
va009039 0:65f1469d6bfb 73 * HAVE_REPLICATION
va009039 0:65f1469d6bfb 74 * ----------------
va009039 0:65f1469d6bfb 75 *
va009039 0:65f1469d6bfb 76 * When defined, the code to support sequence (list, tuple, string) replcation
va009039 0:65f1469d6bfb 77 * is included in the build.
va009039 0:65f1469d6bfb 78 * This feature is required by the builtin function __bi.map().
va009039 0:65f1469d6bfb 79 * #160 Add support for string and tuple replication
va009039 0:65f1469d6bfb 80 *
va009039 0:65f1469d6bfb 81 *
va009039 0:65f1469d6bfb 82 * HAVE_CLASSES
va009039 0:65f1469d6bfb 83 * ------------
va009039 0:65f1469d6bfb 84 *
va009039 0:65f1469d6bfb 85 * When defined, the code to support classes, instances, methods, etc.
va009039 0:65f1469d6bfb 86 * is included in the build.
va009039 0:65f1469d6bfb 87 * Issue #202 Implement classes in the vm
va009039 0:65f1469d6bfb 88 *
va009039 0:65f1469d6bfb 89 *
va009039 0:65f1469d6bfb 90 * HAVE_ASSERT
va009039 0:65f1469d6bfb 91 * -----------
va009039 0:65f1469d6bfb 92 *
va009039 0:65f1469d6bfb 93 * When defined, the code to support the assert statement is included
va009039 0:65f1469d6bfb 94 * in the build.
va009039 0:65f1469d6bfb 95 *
va009039 0:65f1469d6bfb 96 *
va009039 0:65f1469d6bfb 97 * HAVE_GENERATORS
va009039 0:65f1469d6bfb 98 * ---------------
va009039 0:65f1469d6bfb 99 *
va009039 0:65f1469d6bfb 100 * When defined, the code to support the yield keyword's use for
va009039 0:65f1469d6bfb 101 * generator-iterators is included in the build.
va009039 0:65f1469d6bfb 102 * Issue #207 Add support for the yield keyword
va009039 0:65f1469d6bfb 103 *
va009039 0:65f1469d6bfb 104 *
va009039 0:65f1469d6bfb 105 * HAVE_BACKTICK
va009039 0:65f1469d6bfb 106 * -------------
va009039 0:65f1469d6bfb 107 *
va009039 0:65f1469d6bfb 108 * When defined, the code to support the backtick operation (`x`) is included
va009039 0:65f1469d6bfb 109 * in the build.
va009039 0:65f1469d6bfb 110 * REQUIRES stdio.h to have snprintf()
va009039 0:65f1469d6bfb 111 * Issue #244 Add support for the backtick operation (UNARY_CONVERT)
va009039 0:65f1469d6bfb 112 *
va009039 0:65f1469d6bfb 113 *
va009039 0:65f1469d6bfb 114 * HAVE_STRING_FORMAT
va009039 0:65f1469d6bfb 115 * ------------------
va009039 0:65f1469d6bfb 116 *
va009039 0:65f1469d6bfb 117 * When defined, the code to perform string formatting using the binary modulo
va009039 0:65f1469d6bfb 118 * operator is included in the build.
va009039 0:65f1469d6bfb 119 * REQUIRES stdio.h to have snprintf()
va009039 0:65f1469d6bfb 120 * Issue #205 Add support for string format operation
va009039 0:65f1469d6bfb 121 *
va009039 0:65f1469d6bfb 122 *
va009039 0:65f1469d6bfb 123 * HAVE_CLOSURES
va009039 0:65f1469d6bfb 124 * -------------
va009039 0:65f1469d6bfb 125 *
va009039 0:65f1469d6bfb 126 * When defined, the code to support function closures is included in the
va009039 0:65f1469d6bfb 127 * build.
va009039 0:65f1469d6bfb 128 * Issue #256 Add support for closures
va009039 0:65f1469d6bfb 129 *
va009039 0:65f1469d6bfb 130 *
va009039 0:65f1469d6bfb 131 * HAVE_BYTEARRAY
va009039 0:65f1469d6bfb 132 * --------------
va009039 0:65f1469d6bfb 133 *
va009039 0:65f1469d6bfb 134 * When defined, the code to support the bytearray type is included in the
va009039 0:65f1469d6bfb 135 * build. NOTE: If this is defined, the bytearray class in src/lib/__bi.py
va009039 0:65f1469d6bfb 136 * must also be uncommented.
va009039 0:65f1469d6bfb 137 * Issue #289 Create bytearray datatype
va009039 0:65f1469d6bfb 138 *
va009039 0:65f1469d6bfb 139 *
va009039 0:65f1469d6bfb 140 * HAVE_DEBUG_INFO
va009039 0:65f1469d6bfb 141 * ---------------
va009039 0:65f1469d6bfb 142 *
va009039 0:65f1469d6bfb 143 * When defined, the code to support debug information in exception reports
va009039 0:65f1469d6bfb 144 * is included in the build.
va009039 0:65f1469d6bfb 145 * Issue #103 Add debug info to exception reports
va009039 0:65f1469d6bfb 146 *
va009039 0:65f1469d6bfb 147 *
va009039 0:65f1469d6bfb 148 * HAVE_SNPRINTF_FORMAT
va009039 0:65f1469d6bfb 149 * --------------------
va009039 0:65f1469d6bfb 150 *
va009039 0:65f1469d6bfb 151 * When defined, the string format operation is performed using C's snprintf().
va009039 0:65f1469d6bfb 152 * The snprintf() function and all its helper functions can take up program
va009039 0:65f1469d6bfb 153 * memory, so some people may choose to do without this.
va009039 0:65f1469d6bfb 154 * You should define this when you need precise control over numeric formatting
va009039 0:65f1469d6bfb 155 * such as when you supply numbers between the '%' and the type specifier,
va009039 0:65f1469d6bfb 156 * like so::
va009039 0:65f1469d6bfb 157 *
va009039 0:65f1469d6bfb 158 * printf "Number = %4d" % someNumber
va009039 0:65f1469d6bfb 159 * pirntf "PI approx = %1.2" % 3.1415
va009039 0:65f1469d6bfb 160 */
va009039 0:65f1469d6bfb 161
va009039 0:65f1469d6bfb 162 /* Check for dependencies */
va009039 0:65f1469d6bfb 163
va009039 0:65f1469d6bfb 164 #if defined(HAVE_ASSERT) && !defined(HAVE_CLASSES)
va009039 0:65f1469d6bfb 165 #error HAVE_ASSERT requires HAVE_CLASSES
va009039 0:65f1469d6bfb 166 #endif
va009039 0:65f1469d6bfb 167
va009039 0:65f1469d6bfb 168
va009039 0:65f1469d6bfb 169 #if defined(HAVE_GENERATORS) && !defined(HAVE_CLASSES)
va009039 0:65f1469d6bfb 170 #error HAVE_GENERATORS requires HAVE_CLASSES
va009039 0:65f1469d6bfb 171 #endif
va009039 0:65f1469d6bfb 172
va009039 0:65f1469d6bfb 173
va009039 0:65f1469d6bfb 174 #if defined(HAVE_CLOSURES) && !defined(HAVE_DEFAULTARGS)
va009039 0:65f1469d6bfb 175 #error HAVE_CLOSURES requires HAVE_DEFAULTARGS
va009039 0:65f1469d6bfb 176 #endif
va009039 0:65f1469d6bfb 177
va009039 0:65f1469d6bfb 178
va009039 0:65f1469d6bfb 179 #if defined(HAVE_BYTEARRAY) && !defined(HAVE_CLASSES)
va009039 0:65f1469d6bfb 180 #error HAVE_BYTEARRAY requires HAVE_CLASSES
va009039 0:65f1469d6bfb 181 #endif
va009039 0:65f1469d6bfb 182
va009039 0:65f1469d6bfb 183 #if defined(HAVE_SNPRINTF_FORMAT) && !defined(HAVE_STRING_FORMAT)
va009039 0:65f1469d6bfb 184 #error HAVE_SNPRINTF_FORMAT requires HAVE_STRING_FORMAT
va009039 0:65f1469d6bfb 185 #endif /* __PM_EMPTY_PM_FEATURES_H__ */