v01d commented on a change in pull request #2735: URL: https://github.com/apache/incubator-nuttx/pull/2735#discussion_r563328226
########## File path: arch/arm/src/nrf52/Make.defs ########## @@ -163,3 +163,89 @@ endif ifeq ($(CONFIG_PM),y) CHIP_CSRCS += nrf52_pminitialize.c endif + +ifeq ($(CONFIG_NRF52_SOFTDEVICE_CONTROLLER),y) + +NRFXLIB_UNPACK := sdk-nrfxlib +NRFXLIB_VER := 1.4.2 +NRFXLIB_REF := v$(NRFXLIB_VER) +NRFXLIB_TGZ := $(NRFXLIB_REF).tar.gz +NRFXLIB_URL := https://github.com/nrfconnect/sdk-nrfxlib/archive + +NRFX_UNPACK := nrfx +NRFX_VER := 2.4.0 +NRFX_REF := v$(NRFX_VER) +NRFX_TGZ := $(NRFX_REF).tar.gz +NRFX_URL := https://github.com/NordicSemiconductor/nrfx/archive + +CMSIS_UNPACK := CMSIS_5 +CMSIS_VER := 5.7.0 +CMSIS_REF := $(CMSIS_VER) +CMSIS_TGZ := $(CMSIS_REF).tar.gz +CMSIS_URL := https://github.com/ARM-software/CMSIS_5/archive + +$(NRFXLIB_TGZ): + $(Q) echo "Downloading: NRFXLIB" + $(Q) curl -L $(NRFXLIB_URL)/$(NRFXLIB_TGZ) -o chip/$(NRFXLIB_TGZ) + +$(NRFX_TGZ): + $(Q) echo "Downloading: NRFX" + $(Q) curl -L $(NRFX_URL)/$(NRFX_TGZ) -o chip/$(NRFX_TGZ) + +$(CMSIS_TGZ): + $(Q) echo "Downloading: CMSIS" + $(Q) curl -L $(CMSIS_URL)/$(CMSIS_TGZ) -o chip/$(CMSIS_TGZ) + +chip/$(NRFXLIB_UNPACK): $(NRFXLIB_TGZ) + $(Q) echo "Unpacking: NRXFLIB" + $(Q) cd chip && tar zxf $(NRFXLIB_TGZ) + $(Q) mv chip/$(NRFXLIB_UNPACK)-$(NRFXLIB_VER)* chip/$(NRFXLIB_UNPACK) + $(Q) touch chip/$(NRFXLIB_UNPACK) + +chip/$(NRFX_UNPACK): $(NRFX_TGZ) + $(Q) echo "Unpacking: NRXF" + $(Q) cd chip && tar zxf $(NRFX_TGZ) + $(Q) mv chip/$(NRFX_UNPACK)-$(NRFX_VER)* chip/$(NRFX_UNPACK) + $(Q) touch chip/$(NRFX_UNPACK) + +chip/$(CMSIS_UNPACK): $(CMSIS_TGZ) Review comment: I tried to stub this at first but from what I understand it requires the headers, even though we would never use them ourselves. nrfxlib includes nrf.h from nrfx and that requires CMSIS headers in turn. I think it is mostly to define certain types/values such as IRQ numbers. I think it is safe to do so. Maybe we can only retrieve the minimum number of files required, but I'm not sure if there's too much gain. ########## File path: arch/arm/src/nrf52/Make.defs ########## @@ -163,3 +163,89 @@ endif ifeq ($(CONFIG_PM),y) CHIP_CSRCS += nrf52_pminitialize.c endif + +ifeq ($(CONFIG_NRF52_SOFTDEVICE_CONTROLLER),y) + +NRFXLIB_UNPACK := sdk-nrfxlib +NRFXLIB_VER := 1.4.2 +NRFXLIB_REF := v$(NRFXLIB_VER) +NRFXLIB_TGZ := $(NRFXLIB_REF).tar.gz +NRFXLIB_URL := https://github.com/nrfconnect/sdk-nrfxlib/archive + +NRFX_UNPACK := nrfx +NRFX_VER := 2.4.0 +NRFX_REF := v$(NRFX_VER) +NRFX_TGZ := $(NRFX_REF).tar.gz +NRFX_URL := https://github.com/NordicSemiconductor/nrfx/archive + +CMSIS_UNPACK := CMSIS_5 +CMSIS_VER := 5.7.0 +CMSIS_REF := $(CMSIS_VER) +CMSIS_TGZ := $(CMSIS_REF).tar.gz +CMSIS_URL := https://github.com/ARM-software/CMSIS_5/archive + +$(NRFXLIB_TGZ): + $(Q) echo "Downloading: NRFXLIB" + $(Q) curl -L $(NRFXLIB_URL)/$(NRFXLIB_TGZ) -o chip/$(NRFXLIB_TGZ) + +$(NRFX_TGZ): Review comment: As mentioned in the other comment, it uses nrf.h to distinguish the different chips. ########## File path: arch/arm/src/nrf52/Make.defs ########## @@ -163,3 +163,89 @@ endif ifeq ($(CONFIG_PM),y) CHIP_CSRCS += nrf52_pminitialize.c endif + +ifeq ($(CONFIG_NRF52_SOFTDEVICE_CONTROLLER),y) + +NRFXLIB_UNPACK := sdk-nrfxlib +NRFXLIB_VER := 1.4.2 +NRFXLIB_REF := v$(NRFXLIB_VER) +NRFXLIB_TGZ := $(NRFXLIB_REF).tar.gz +NRFXLIB_URL := https://github.com/nrfconnect/sdk-nrfxlib/archive + +NRFX_UNPACK := nrfx +NRFX_VER := 2.4.0 +NRFX_REF := v$(NRFX_VER) +NRFX_TGZ := $(NRFX_REF).tar.gz +NRFX_URL := https://github.com/NordicSemiconductor/nrfx/archive + +CMSIS_UNPACK := CMSIS_5 +CMSIS_VER := 5.7.0 +CMSIS_REF := $(CMSIS_VER) +CMSIS_TGZ := $(CMSIS_REF).tar.gz +CMSIS_URL := https://github.com/ARM-software/CMSIS_5/archive + +$(NRFXLIB_TGZ): Review comment: We also need the headers ########## File path: arch/arm/src/nrf52/Make.defs ########## @@ -163,3 +163,89 @@ endif ifeq ($(CONFIG_PM),y) CHIP_CSRCS += nrf52_pminitialize.c endif + +ifeq ($(CONFIG_NRF52_SOFTDEVICE_CONTROLLER),y) + +NRFXLIB_UNPACK := sdk-nrfxlib +NRFXLIB_VER := 1.4.2 +NRFXLIB_REF := v$(NRFXLIB_VER) +NRFXLIB_TGZ := $(NRFXLIB_REF).tar.gz +NRFXLIB_URL := https://github.com/nrfconnect/sdk-nrfxlib/archive + +NRFX_UNPACK := nrfx +NRFX_VER := 2.4.0 +NRFX_REF := v$(NRFX_VER) +NRFX_TGZ := $(NRFX_REF).tar.gz +NRFX_URL := https://github.com/NordicSemiconductor/nrfx/archive + +CMSIS_UNPACK := CMSIS_5 +CMSIS_VER := 5.7.0 +CMSIS_REF := $(CMSIS_VER) +CMSIS_TGZ := $(CMSIS_REF).tar.gz +CMSIS_URL := https://github.com/ARM-software/CMSIS_5/archive + +$(NRFXLIB_TGZ): + $(Q) echo "Downloading: NRFXLIB" + $(Q) curl -L $(NRFXLIB_URL)/$(NRFXLIB_TGZ) -o chip/$(NRFXLIB_TGZ) + +$(NRFX_TGZ): + $(Q) echo "Downloading: NRFX" + $(Q) curl -L $(NRFX_URL)/$(NRFX_TGZ) -o chip/$(NRFX_TGZ) + +$(CMSIS_TGZ): + $(Q) echo "Downloading: CMSIS" + $(Q) curl -L $(CMSIS_URL)/$(CMSIS_TGZ) -o chip/$(CMSIS_TGZ) + +chip/$(NRFXLIB_UNPACK): $(NRFXLIB_TGZ) + $(Q) echo "Unpacking: NRXFLIB" + $(Q) cd chip && tar zxf $(NRFXLIB_TGZ) + $(Q) mv chip/$(NRFXLIB_UNPACK)-$(NRFXLIB_VER)* chip/$(NRFXLIB_UNPACK) + $(Q) touch chip/$(NRFXLIB_UNPACK) + +chip/$(NRFX_UNPACK): $(NRFX_TGZ) + $(Q) echo "Unpacking: NRXF" + $(Q) cd chip && tar zxf $(NRFX_TGZ) + $(Q) mv chip/$(NRFX_UNPACK)-$(NRFX_VER)* chip/$(NRFX_UNPACK) + $(Q) touch chip/$(NRFX_UNPACK) + +chip/$(CMSIS_UNPACK): $(CMSIS_TGZ) Review comment: It is not a simple header, have a look at nrf.h, it is quite involved. Not saying it is not possible, but I'm just focused on making it work first. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org