py: Add MICROPY_OBJ_BASE_ALIGNMENT to help with 16-bit ports.
diff --git a/py/mpconfig.h b/py/mpconfig.h
index e8c8fcc..b235d6f 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -536,6 +536,14 @@
 /*****************************************************************************/
 /* Miscellaneous settings                                                    */
 
+// All uPy objects in ROM must be aligned on at least a 4 byte boundary
+// so that the small-int/qstr/pointer distinction can be made.  For machines
+// that don't do this (eg 16-bit CPU), define the following macro to something
+// like __attribute__((aligned(4))).
+#ifndef MICROPY_OBJ_BASE_ALIGNMENT
+#define MICROPY_OBJ_BASE_ALIGNMENT
+#endif
+
 // On embedded platforms, these will typically enable/disable irqs.
 #ifndef MICROPY_BEGIN_ATOMIC_SECTION
 #define MICROPY_BEGIN_ATOMIC_SECTION() (0)