Skip to content

nrf: More cleanup and porting #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions ports/nrf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ INC += -I$(BUILD)
INC += -I$(BUILD)/genhdr
INC += -I./../../lib/cmsis/inc
INC += -I./boards/$(BOARD)
INC += -I./hal
INC += -I./modules/ubluepy
INC += -I./modules/random
INC += -I./modules/ble
INC += -I./nrfx
INC += -I./nrfx/hal
Expand All @@ -63,7 +61,6 @@ CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(COPT) $(NRF_DEFINES)
CFLAGS += -fno-strict-aliasing
CFLAGS += -fstack-usage -fno-builtin -fshort-enums
CFLAGS += -fdata-sections -ffunction-sections
CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT)_hal.h>'
CFLAGS += -D__START=main

LDFLAGS = $(CFLAGS)
Expand All @@ -89,11 +86,6 @@ LIBS := -L $(dir $(LIBM_FILE_NAME)) -lm
LIBS += -L $(dir $(LIBC_FILE_NAME)) -lc
LIBS += -L $(dir $(LIBGCC_FILE_NAME)) -lgcc

SRC_HAL = $(addprefix hal/,\
hal_time.c \
hal_rng.c \
)

SRC_NRFX = $(addprefix nrfx/,\
drivers/src/nrfx_spim.c \
drivers/src/nrfx_twim.c \
Expand All @@ -103,10 +95,7 @@ SRC_NRFX = $(addprefix nrfx/,\
SRC_C += \
mphalport.c \
fatfs_port.c \
fifo.c \
tick.c \
drivers/softpwm.c \
drivers/ticker.c \
drivers/bluetooth/ble_drv.c \
drivers/bluetooth/ble_uart.c \
boards/$(BOARD)/board.c \
Expand Down Expand Up @@ -136,7 +125,6 @@ DRIVERS_SRC_C += $(addprefix modules/,\
ubluepy/ubluepy_scanner.c \
ubluepy/ubluepy_scan_entry.c \
ble/modble.c \
random/modrandom.c \
)

SRC_COMMON_HAL += \
Expand Down Expand Up @@ -202,7 +190,8 @@ SRC_SHARED_BINDINGS = \
bitbangio/__init__.c \
bitbangio/I2C.c \
bitbangio/SPI.c \
bitbangio/OneWire.c
bitbangio/OneWire.c \
random/__init__.c


SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_BINDINGS)) \
Expand All @@ -213,7 +202,6 @@ FROZEN_MPY_MPY_FILES := $(addprefix $(BUILD)/,$(FROZEN_MPY_PY_FILES:.py=.mpy))

OBJ += $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
OBJ += $(BUILD)/pins_gen.o
OBJ += $(addprefix $(BUILD)/, $(SRC_HAL:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_NRFX:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o))
Expand Down
18 changes: 0 additions & 18 deletions ports/nrf/boards/feather52832/nrf52_hal_conf.h

This file was deleted.

18 changes: 0 additions & 18 deletions ports/nrf/boards/feather52840/nrf52_hal_conf.h

This file was deleted.

18 changes: 0 additions & 18 deletions ports/nrf/boards/pca10040/nrf52_hal_conf.h

This file was deleted.

18 changes: 0 additions & 18 deletions ports/nrf/boards/pca10056/nrf52_hal_conf.h

This file was deleted.

7 changes: 2 additions & 5 deletions ports/nrf/common-hal/time/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@

#include "py/mphal.h"

#include "shared-bindings/time/__init__.h"
#include "tick.h"

#include "nrfx_glue.h"

inline uint64_t common_hal_time_monotonic(void) {
uint64_t common_hal_time_monotonic(void) {
return ticks_ms;
}

void common_hal_time_delay_ms(uint32_t delay) {
NRFX_DELAY_US(delay);
mp_hal_delay_ms(delay);
}
1 change: 0 additions & 1 deletion ports/nrf/drivers/bluetooth/ble_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <string.h>
#include "ble_uart.h"
#include "ringbuffer.h"
#include "hal/hal_time.h"
#include "lib/utils/interrupt_char.h"

#if MICROPY_PY_BLE_NUS
Expand Down
Loading