Skip to content

Commit

Permalink
Revert "nrf nvm: touchups to nickzoic PR micropython#1768"
Browse files Browse the repository at this point in the history
  • Loading branch information
tannewt committed Apr 16, 2019
1 parent 22889ca commit 254d0a5
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 308 deletions.
1 change: 0 additions & 1 deletion ports/nrf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ SRC_C += \
peripherals/nrf/clocks.c \
peripherals/nrf/$(MCU_CHIP)/pins.c \
peripherals/nrf/$(MCU_CHIP)/power.c \
peripherals/nrf/nvm.c \
peripherals/nrf/timers.c \
sd_mutex.c \
supervisor/shared/memory.c
Expand Down
1 change: 1 addition & 0 deletions ports/nrf/boards/adafruit_nrf52840_s140_v6.ld
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

0x000ED000..0x000F3FFF (28KB ) Private Config Data (Bonding, Keys, etc.)
0x000AD000..0x000ECFFF (256KB) User Filesystem

0x00026000..0x000ACFFF (540KB) Application Code (including ISR vector)
0x00001000..0x00025FFF (148KB) SoftDevice
0x00000000..0x00000FFF (4KB) Master Boot Record
Expand Down
5 changes: 1 addition & 4 deletions ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
#define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "Feather52840Express"

#define FLASH_SIZE (0x100000)
#define FLASH_PAGE_SIZE (4096)

#define MICROPY_HW_NEOPIXEL (&pin_P0_16)

#define MICROPY_HW_LED_STATUS (&pin_P1_15)
Expand All @@ -58,7 +55,7 @@

#define CIRCUITPY_AUTORELOAD_DELAY_MS 500

#define CIRCUITPY_INTERNAL_NVM_SIZE (4096)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192

#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)

Expand Down
15 changes: 0 additions & 15 deletions ports/nrf/common-hal/microcontroller/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@
* THE SOFTWARE.
*/

#include "py/mphal.h"
#include "py/obj.h"
#include "py/runtime.h"

#include "common-hal/microcontroller/Pin.h"
#include "common-hal/microcontroller/Processor.h"

#include "shared-bindings/nvm/ByteArray.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/microcontroller/Processor.h"
Expand Down Expand Up @@ -68,16 +63,6 @@ const mcu_processor_obj_t common_hal_mcu_processor_obj = {
},
};

#if CIRCUITPY_INTERNAL_NVM_SIZE > 0
// The singleton nvm.ByteArray object.
const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = {
.base = {
.type = &nvm_bytearray_type,
},
.len = CIRCUITPY_INTERNAL_NVM_SIZE,
.start_address = (uint8_t*) (FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE),
};
#endif

STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) },
Expand Down
77 changes: 0 additions & 77 deletions ports/nrf/common-hal/nvm/ByteArray.c

This file was deleted.

38 changes: 0 additions & 38 deletions ports/nrf/common-hal/nvm/ByteArray.h

This file was deleted.

27 changes: 0 additions & 27 deletions ports/nrf/common-hal/nvm/__init__.c

This file was deleted.

4 changes: 2 additions & 2 deletions ports/nrf/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ CIRCUITPY_AUDIOBUSIO = 0
# No I2CSlave implementation
CIRCUITPY_I2CSLAVE = 0

# enable NVM
CIRCUITPY_NVM = 1
# nvm not yet implemented
CIRCUITPY_NVM = 0

# enable RTC
CIRCUITPY_RTC = 1
Expand Down
95 changes: 0 additions & 95 deletions ports/nrf/peripherals/nrf/nvm.c

This file was deleted.

34 changes: 0 additions & 34 deletions ports/nrf/peripherals/nrf/nvm.h

This file was deleted.

0 comments on commit 254d0a5

Please sign in to comment.