summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-02-15 20:32:32 -0500
committerDan Halbert <halbert@halwitz.org>2019-02-15 20:32:32 -0500
commit7b3f7605b8b36f5d0dbfbee60604ad266cac2645 (patch)
treec6abc3452daa7b9d3d0d78a1df1b5930063e23ee
parent72c03268a485a793948ec428718655a47306736d (diff)
address @tannewt changes: move and rename common files; remove PORT_HEAP_SIZE
-rw-r--r--ports/atmel-samd/Makefile4
-rw-r--r--ports/atmel-samd/mpconfigport.h5
-rwxr-xr-xports/nrf/Makefile4
-rw-r--r--ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h3
-rw-r--r--ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h3
-rw-r--r--ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h3
-rw-r--r--ports/nrf/boards/particle_argon/mpconfigboard.h3
-rw-r--r--ports/nrf/boards/particle_boron/mpconfigboard.h3
-rw-r--r--ports/nrf/boards/particle_xenon/mpconfigboard.h3
-rw-r--r--ports/nrf/boards/pca10056/mpconfigboard.h1
-rw-r--r--ports/nrf/boards/pca10059/mpconfigboard.h1
-rw-r--r--ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h2
-rw-r--r--ports/nrf/mpconfigport.h2
-rw-r--r--py/circuitpy_defns.mk (renamed from ports/circuitpy-common/circuitpy_defns.mk)0
-rw-r--r--py/circuitpy_mpconfig.h (renamed from ports/circuitpy-common/mpconfig_circuitpy.h)0
-rw-r--r--py/circuitpy_mpconfig.mk (renamed from ports/circuitpy-common/mpconfig_circuitpy.mk)26
-rw-r--r--supervisor/port.h4
17 files changed, 32 insertions, 35 deletions
diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile
index 6cd605069..b608f3a20 100644
--- a/ports/atmel-samd/Makefile
+++ b/ports/atmel-samd/Makefile
@@ -40,7 +40,7 @@ include boards/$(BOARD)/mpconfigboard.mk
# Port-specific
include mpconfigport.mk
# CircuitPython-specific
-include $(TOP)/ports/circuitpy-common/mpconfig_circuitpy.mk
+include $(TOP)/py/circuitpy_mpconfig.mk
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
@@ -51,7 +51,7 @@ include $(TOP)/py/py.mk
include $(TOP)/supervisor/supervisor.mk
# Include make rules and variables common across CircuitPython builds.
-include $(TOP)/ports/circuitpy-common/circuitpy_defns.mk
+include $(TOP)/py/circuitpy_defns.mk
CROSS_COMPILE = arm-none-eabi-
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h
index 8a308cd03..0b62baa5a 100644
--- a/ports/atmel-samd/mpconfigport.h
+++ b/ports/atmel-samd/mpconfigport.h
@@ -33,7 +33,6 @@
#ifdef SAMD21
#define CIRCUITPY_MCU_FAMILY samd21
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
-#define PORT_HEAP_SIZE (16384 + 4096)
#define SPI_FLASH_MAX_BAUDRATE 8000000
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
@@ -64,8 +63,6 @@
#ifdef SAMD51
#define CIRCUITPY_MCU_FAMILY samd51
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
-// 128KiB heap
-#define PORT_HEAP_SIZE (0x20000)
#define SPI_FLASH_MAX_BAUDRATE 24000000
// 24kiB stack
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
@@ -89,6 +86,6 @@
mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT] \
;
-#include "ports/circuitpy-common/mpconfig_circuitpy.h"
+#include "py/circuitpy_mpconfig.h"
#endif // __INCLUDED_MPCONFIGPORT_H
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index a408b8ca9..3681ac49e 100755
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -46,7 +46,7 @@ include boards/$(BOARD)/mpconfigboard.mk
# Port-specific
include mpconfigport.mk
# CircuitPython-specific
-include $(TOP)/ports/circuitpy-common/mpconfig_circuitpy.mk
+include $(TOP)/py/circuitpy_mpconfig.mk
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
@@ -57,7 +57,7 @@ include $(TOP)/py/py.mk
include $(TOP)/supervisor/supervisor.mk
# Include make rules and variables common across CircuitPython builds.
-include $(TOP)/ports/circuitpy-common/circuitpy_defns.mk
+include $(TOP)/py/circuitpy_defns.mk
ifneq ($(SD), )
include bluetooth/bluetooth_common.mk
diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h
index da72c085e..764decbca 100644
--- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h
+++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h
@@ -55,9 +55,6 @@
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
-// If you change this, then make sure to update the linker scripts as well to
-// make sure you don't overwrite code
-#define PORT_HEAP_SIZE (128 * 1024)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h
index 40b6487ec..ed4836494 100644
--- a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h
+++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h
@@ -42,9 +42,6 @@
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
-// If you change this, then make sure to update the linker scripts as well to
-// make sure you don't overwrite code
-#define PORT_HEAP_SIZE (128 * 1024)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h
index 8321abb96..e8830bb8d 100644
--- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h
+++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h
@@ -35,9 +35,6 @@
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
-// If you change this, then make sure to update the linker scripts as well to
-// make sure you don't overwrite code
-#define PORT_HEAP_SIZE (128 * 1024)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.h b/ports/nrf/boards/particle_argon/mpconfigboard.h
index bd9a46349..902f0c2e7 100644
--- a/ports/nrf/boards/particle_argon/mpconfigboard.h
+++ b/ports/nrf/boards/particle_argon/mpconfigboard.h
@@ -57,9 +57,6 @@
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
-// If you change this, then make sure to update the linker scripts as well to
-// make sure you don't overwrite code
-#define PORT_HEAP_SIZE (128 * 1024)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.h b/ports/nrf/boards/particle_boron/mpconfigboard.h
index ed675c811..1e9b78b45 100644
--- a/ports/nrf/boards/particle_boron/mpconfigboard.h
+++ b/ports/nrf/boards/particle_boron/mpconfigboard.h
@@ -57,9 +57,6 @@
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
-// If you change this, then make sure to update the linker scripts as well to
-// make sure you don't overwrite code
-#define PORT_HEAP_SIZE (128 * 1024)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.h b/ports/nrf/boards/particle_xenon/mpconfigboard.h
index 0b119b8bf..7c0f238a3 100644
--- a/ports/nrf/boards/particle_xenon/mpconfigboard.h
+++ b/ports/nrf/boards/particle_xenon/mpconfigboard.h
@@ -57,9 +57,6 @@
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
-// If you change this, then make sure to update the linker scripts as well to
-// make sure you don't overwrite code
-#define PORT_HEAP_SIZE (128 * 1024)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
diff --git a/ports/nrf/boards/pca10056/mpconfigboard.h b/ports/nrf/boards/pca10056/mpconfigboard.h
index 8d420721f..c083b329d 100644
--- a/ports/nrf/boards/pca10056/mpconfigboard.h
+++ b/ports/nrf/boards/pca10056/mpconfigboard.h
@@ -30,7 +30,6 @@
#define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "nRF52840-DK"
-#define PORT_HEAP_SIZE (128 * 1024)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
#define MICROPY_HW_LED_STATUS (&pin_P0_13)
diff --git a/ports/nrf/boards/pca10059/mpconfigboard.h b/ports/nrf/boards/pca10059/mpconfigboard.h
index 03abd65e8..d5ce21229 100644
--- a/ports/nrf/boards/pca10059/mpconfigboard.h
+++ b/ports/nrf/boards/pca10059/mpconfigboard.h
@@ -30,5 +30,4 @@
#define MICROPY_HW_LED_STATUS (&pin_P0_06)
-#define PORT_HEAP_SIZE (128 * 1024)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h
index 353a0ad8f..3c13a4ad5 100644
--- a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h
+++ b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h
@@ -30,7 +30,6 @@
#define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "SFE_NRF52840_Mini"
-#define PORT_HEAP_SIZE (128 * 1024)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
#define DEFAULT_I2C_BUS_SCL (&pin_P0_11)
@@ -65,4 +64,3 @@
#define SPI_FLASH_SCK_PIN &pin_P0_19
#define SPI_FLASH_CS_PIN &pin_P0_17
#endif*/
-
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index bec4cf7f7..cb6e2e350 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -56,6 +56,6 @@
CIRCUITPY_COMMON_ROOT_POINTERS \
;
-#include "ports/circuitpy-common/mpconfig_circuitpy.h"
+#include "py/circuitpy_mpconfig.h"
#endif // NRF5_MPCONFIGPORT_H__
diff --git a/ports/circuitpy-common/circuitpy_defns.mk b/py/circuitpy_defns.mk
index 2fa2e78e2..2fa2e78e2 100644
--- a/ports/circuitpy-common/circuitpy_defns.mk
+++ b/py/circuitpy_defns.mk
diff --git a/ports/circuitpy-common/mpconfig_circuitpy.h b/py/circuitpy_mpconfig.h
index 721b3c538..721b3c538 100644
--- a/ports/circuitpy-common/mpconfig_circuitpy.h
+++ b/py/circuitpy_mpconfig.h
diff --git a/ports/circuitpy-common/mpconfig_circuitpy.mk b/py/circuitpy_mpconfig.mk
index 0294d3905..30d5a7554 100644
--- a/ports/circuitpy-common/mpconfig_circuitpy.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -1,3 +1,29 @@
+#
+# This file is part of the MicroPython project, http://micropython.org/
+#
+# The MIT License (MIT)
+#
+# Copyright (c) 2019 Dan Halbert for Adafruit Industries
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+
# mpconfigboard.mk files can specify:
# CIRCUITPY_FULL_BUILD = 1 (which is the default)
# or
diff --git a/supervisor/port.h b/supervisor/port.h
index 59898c8e4..1430c6a50 100644
--- a/supervisor/port.h
+++ b/supervisor/port.h
@@ -29,10 +29,6 @@
#include "py/mpconfig.h"
-#ifndef PORT_HEAP_SIZE
-#error "Please define PORT_HEAP_SIZE to specify heap size in bytes."
-#endif
-
#include "supervisor/shared/safe_mode.h"
// Provided by the linker;