diff --git a/.github/actions/action-zephyr/Dockerfile b/.github/actions/action-zephyr/Dockerfile index be91974..e52e8fd 100644 --- a/.github/actions/action-zephyr/Dockerfile +++ b/.github/actions/action-zephyr/Dockerfile @@ -1,10 +1,12 @@ # -# Copyright (c) 2019 Blue Clover Devices +# Copyright (c) 2019-2021 Blue Clover Devices # # SPDX-License-Identifier: Apache-2.0 # -FROM bcdevices/zephyr-west:zephyr-2.6.0-0 +FROM ghcr.io/bcdevices/zephyr:2.7.0-1 + +WORKDIR /usr/src/ ADD entrypoint.sh /entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 943148e..0379b32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ -# -# Copyright (c) 2019 Blue Clover Devices -# # SPDX-License-Identifier: Apache-2.0 # +# Copyright (c) 2020-2021 Blue Clover Devices -FROM bcdevices/zephyr-west:zephyr-2.6.0-0 +FROM ghcr.io/bcdevices/zephyr:2.7.0-1 WORKDIR /usr/src/ ## Copy everything (use .dockerignore to exclude) diff --git a/Makefile b/Makefile index a3049f1..85d4558 100644 --- a/Makefile +++ b/Makefile @@ -28,129 +28,10 @@ DOCKER_BUILD_ARGS += --network=host DOCKER_RUN_ARGS := DOCKER_RUN_ARGS += --network=none -BOARDS_COMMON := -BOARDS_COMMON += nrf52dk_nrf52832 -BOARDS_COMMON += nrf9160dk_nrf9160 -BOARDS_COMMON += stm32f4_disco -BOARDS_COMMON += nucleo_f207zg -BOARDS_COMMON += nucleo_f401re -BOARDS_COMMON += nucleo_l432kc -BOARDS_COMMON += disco_l475_iot1 - -BLINKY_TARGETS := $(patsubst %,build.%/blinky/zephyr/zephyr.hex,$(BOARDS_COMMON)) - -BOARDS_BUTTON := -BOARDS_BUTTON += nrf52dk_nrf52832 -BOARDS_BUTTON += nrf9160dk_nrf9160 -BOARDS_BUTTON += stm32f4_disco -BOARDS_BUTTON += nucleo_f207zg -BOARDS_BUTTON += nucleo_f401re -BOARDS_BUTTON += disco_l475_iot1 - -BUTTON_TARGETS := $(patsubst %,build.%/button/zephyr/zephyr.hex,$(BOARDS_BUTTON)) - -BOARDS_CAN := -BOARDS_CAN += stm32f4_disco -BOARDS_CAN += nucleo_l432kc - -CAN_TARGETS := $(patsubst %,build.%/can/zephyr/zephyr.hex,$(BOARDS_CAN)) - -BOARDS_GSM_MODEM := -BOARDS_GSM_MODEM += nrf52dk_nrf52832 -#BOARDS_GSM_MODEM += stm32f4_disco # undefined references to `sys_rand32_get' -#BOARDS_GSM_MODEM += nucleo_l432kc # undefined references to `sys_rand32_get' -BOARDS_GSM_MODEM += disco_l475_iot1 - -GSM_MODEM_TARGETS := $(patsubst %,build.%/gsm_modem/zephyr/zephyr.hex,$(BOARDS_GSM_MODEM)) - -BOARDS_SERVO_MOTOR := -#BOARDS_SERVO_MOTOR += nrf52dk_nrf52832 # Unsupported board -#BOARDS_SERVO_MOTOR += nrf9160dk_nrf9160 # Unsupported board - -SERVO_MOTOR_TARGETS := $(patsubst %,build.%/servo_motor/zephyr/zephyr.hex,$(BOARDS_SERVO_MOTOR)) - -SHELL_TARGETS := $(patsubst %,build.%/shell/zephyr/zephyr.hex,$(BOARDS_COMMON)) - -ZEPHYR_TAG := 2.6.0 +ZEPHYR_TAG := 2.7.0 ZEPHYR_SYSROOT := /usr/src/zephyr-$(ZEPHYR_TAG)/zephyr ZEPHYR_USRROOT := $(HOME)/src/zephyr-$(ZEPHYR_TAG)/zephyr -build.%/blinky/zephyr/zephyr.hex: - mkdir -p build.$*/blinky - if [ -d $(ZEPHYR_USRROOT) ]; then source $(ZEPHYR_USRROOT)/zephyr-env.sh ; \ - elif [ -d $(ZEPHYR_SYSROOT) ]; then source $(ZEPHYR_SYSROOT)/zephyr-env.sh ; \ - else echo "No Zephyr"; fi && \ - west build --build-dir build.$*/blinky \ - --board $* --pristine auto \ - $$ZEPHYR_BASE/samples/basic/blinky - -build.%/button/zephyr/zephyr.hex: - mkdir -p build.$*/button - if [ -d $(ZEPHYR_USRROOT) ]; then source $(ZEPHYR_USRROOT)/zephyr-env.sh ; \ - elif [ -d $(ZEPHYR_SYSROOT) ]; then source $(ZEPHYR_SYSROOT)/zephyr-env.sh ; \ - else echo "No Zephyr"; fi && \ - west build --build-dir build.$*/button \ - --board $* --pristine auto \ - $$ZEPHYR_BASE/samples/basic/button - -build.%/gsm_modem/zephyr/zephyr.hex: - mkdir -p build.$*/gsm_modem - if [ -d $(ZEPHYR_USRROOT) ]; then source $(ZEPHYR_USRROOT)/zephyr-env.sh ; \ - elif [ -d $(ZEPHYR_SYSROOT) ]; then source $(ZEPHYR_SYSROOT)/zephyr-env.sh ; \ - else echo "No Zephyr"; fi && \ - west build --build-dir build.$*/gsm_modem \ - --board $* --pristine auto \ - $$ZEPHYR_BASE/samples/net/gsm_modem - -build.%/servo_motor/zephyr/zephyr.hex: - mkdir -p build.$*/servo_motor - if [ -d $(ZEPHYR_USRROOT) ]; then source $(ZEPHYR_USRROOT)/zephyr-env.sh ; \ - elif [ -d $(ZEPHYR_SYSROOT) ]; then source $(ZEPHYR_SYSROOT)/zephyr-env.sh ; \ - else echo "No Zephyr"; fi && \ - west build --build-dir build.$*/servo_motor \ - --board $* --pristine auto \ - $$ZEPHYR_BASE/samples/basic/servo_motor - -build.%/shell/zephyr/zephyr.hex: - mkdir -p build.$*/shell - if [ -d $(ZEPHYR_USRROOT) ]; then source $(ZEPHYR_USRROOT)/zephyr-env.sh ; \ - elif [ -d $(ZEPHYR_SYSROOT) ]; then source $(ZEPHYR_SYSROOT)/zephyr-env.sh ; \ - else echo "No Zephyr"; fi && \ - west build --build-dir build.$*/shell \ - --board $* --pristine auto \ - $$ZEPHYR_BASE/samples/subsys/shell/shell_module - -build.%/can/zephyr/zephyr.hex: - mkdir -p build.$*/can - if [ -d $(ZEPHYR_USRROOT) ]; then source $(ZEPHYR_USRROOT)/zephyr-env.sh ; \ - elif [ -d $(ZEPHYR_SYSROOT) ]; then source $(ZEPHYR_SYSROOT)/zephyr-env.sh ; \ - else echo "No Zephyr"; fi && \ - west build --build-dir build.$*/can \ - --board $* --pristine auto \ - $$ZEPHYR_BASE/samples/drivers/can - -.PHONY: build-blinky -build-blinky: $(BLINKY_TARGETS) - -.PHONY: build-button -build-button: $(BUTTON_TARGETS) - -.PHONY: build-gsm_modem -build-gsm_modem: $(GSM_MODEM_TARGETS) - -.PHONY: build-servo_motor -build-servo_motor: $(SERVO_MOTOR_TARGETS) - -.PHONY: build-shell -build-shell: $(SHELL_TARGETS) - -.PHONY: build-CAN -build-CAN: $(CAN_TARGETS) - -.PHONY: build-zephyr-samples -#build-zephyr-samples: build-blinky build-button build-shell build-CAN build-gsm_modem build-servo_motor -build-zephyr-samples: build-blinky build-button build-shell build-CAN build-gsm_modem - ZEPHYR_BOARD_ROOT := $(BASE_PATH) BOARDS_APP := @@ -172,7 +53,7 @@ versions: @echo "VERSION_TAG: $(VERSION_TAG)" .PHONY: build -build: build-zephyr-samples $(APP_TARGETS) +build: $(APP_TARGETS) .PHONY: clean clean: @@ -196,37 +77,9 @@ dist-clean: .PHONY: dist dist: dist-clean dist-prep build - install -m 666 build.disco_l475_iot1/blinky/zephyr/zephyr.hex dist/zephyr-disco_l475_iot1-sample-blinky-$(VERSION_TAG).hex - install -m 666 build.disco_l475_iot1/button/zephyr/zephyr.hex dist/zephyr-disco_l475_iot1-sample-button-$(VERSION_TAG).hex - install -m 666 build.disco_l475_iot1/gsm_modem/zephyr/zephyr.hex dist/zephyr-disco_l475_iot1-sample-gsm_modem-$(VERSION_TAG).hex - install -m 666 build.disco_l475_iot1/shell/zephyr/zephyr.hex dist/zephyr-disco_l475_iot1-sample-shell-$(VERSION_TAG).hex - install -m 666 build.ly10demo/app/zephyr/zephyr.hex dist/demo-board-zephyr-fw-$(VERSION_TAG).hex - install -m 666 build.ly10demo/app/zephyr/zephyr.elf dist/demo-board-zephyr-fw-$(VERSION_TAG).elf - install -m 666 build.ly10demo/app/zephyr/zephyr.map dist/demo-board-zephyr-fw-$(VERSION_TAG).map - #install -m 666 build.nrf52dk_nrf52832/servo_motor/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf528320-sample-servo_motor-$(VERSION_TAG).hex - install -m 666 build.nrf52dk_nrf52832/blinky/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf52832-sample-blinky-$(VERSION_TAG).hex - install -m 666 build.nrf52dk_nrf52832/button/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf52832-sample-button-$(VERSION_TAG).hex - install -m 666 build.nrf52dk_nrf52832/gsm_modem/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf52832-sample-gsm_modem-$(VERSION_TAG).hex - install -m 666 build.nrf52dk_nrf52832/shell/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf52832-sample-shell-$(VERSION_TAG).hex - install -m 666 build.nrf9160dk_nrf9160/blinky/zephyr/zephyr.hex dist/zephyr-nrf9160dk_nrf9160-sample-blinky-$(VERSION_TAG).hex - install -m 666 build.nrf9160dk_nrf9160/button/zephyr/zephyr.hex dist/zephyr-nrf9160dk_nrf9160-sample-button-$(VERSION_TAG).hex - #install -m 666 build.nrf9160dk_nrf9160/servo_motor/zephyr/zephyr.hex dist/zephyr-nrf9160dk_nrf9160-sample-servo_motor-$(VERSION_TAG).hex - install -m 666 build.nrf9160dk_nrf9160/shell/zephyr/zephyr.hex dist/zephyr-nrf9160dk_nrf9160-sample-shell-$(VERSION_TAG).hex - install -m 666 build.nucleo_f207zg/blinky/zephyr/zephyr.hex dist/zephyr-nucleo_f207zg-sample-blinky-$(VERSION_TAG).hex - install -m 666 build.nucleo_f207zg/button/zephyr/zephyr.hex dist/zephyr-nucleo_f207zg-sample-button-$(VERSION_TAG).hex - install -m 666 build.nucleo_f207zg/shell/zephyr/zephyr.hex dist/zephyr-nucleo_f207zg-sample-shell-$(VERSION_TAG).hex - install -m 666 build.nucleo_f401re/blinky/zephyr/zephyr.hex dist/zephyr-nucleo_f401re-sample-blinky-$(VERSION_TAG).hex - install -m 666 build.nucleo_f401re/button/zephyr/zephyr.hex dist/zephyr-nucleo_f401re-sample-button-$(VERSION_TAG).hex - install -m 666 build.nucleo_f401re/shell/zephyr/zephyr.hex dist/zephyr-nucleo_f401re-sample-shell-$(VERSION_TAG).hex - install -m 666 build.nucleo_l432kc/blinky/zephyr/zephyr.hex dist/zephyr-nucleo_l432kc-sample-blinky-$(VERSION_TAG).hex - install -m 666 build.nucleo_l432kc/can/zephyr/zephyr.hex dist/zephyr-nucleo_l432kc-sample-can-$(VERSION_TAG).hex - #install -m 666 build.nucleo_l432kc/gsm_modem/zephyr/zephyr.hex dist/zephyr-nucleo_l432kc-sample-gsm_modem-$(VERSION_TAG).hex - install -m 666 build.nucleo_l432kc/shell/zephyr/zephyr.hex dist/zephyr-nucleo_l432kc-sample-shell-$(VERSION_TAG).hex - install -m 666 build.stm32f4_disco/blinky/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-blinky-$(VERSION_TAG).hex - install -m 666 build.stm32f4_disco/button/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-button-$(VERSION_TAG).hex - install -m 666 build.stm32f4_disco/can/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-can-$(VERSION_TAG).hex - #install -m 666 build.stm32f4_disco/gsm_modem/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-gsm_modem-$(VERSION_TAG).hex - install -m 666 build.stm32f4_disco/shell/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-shell-$(VERSION_TAG).hex + install -m 666 build.ly10demo/app/zephyr/zephyr.hex dist/app-pltdemov1-$(VERSION_TAG).hex + install -m 666 build.ly10demo/app/zephyr/zephyr.elf dist/app-pltdemov1-$(VERSION_TAG).elf + install -m 666 build.ly10demo/app/zephyr/zephyr.map dist/app-pltdemov1-$(VERSION_TAG).map sed 's/{{VERSION}}/$(VERSION_TAG)/g' test-suites/suite-demo-board-zephyr.yaml.template > dist/suite-demo-board-zephyr-$(VERSION_TAG).yaml .PHONY: deploy diff --git a/app/src/app_ble.c b/app/src/app_ble.c index c70e67c..d409ede 100644 --- a/app/src/app_ble.c +++ b/app/src/app_ble.c @@ -62,7 +62,7 @@ int app_ble(void) // Get MAC Address // '1' as first parameter indicates we are seeking the 'random' // BD address - uint8_t *bd_addr = (uint8_t *) ll_addr_get(1, NULL); + uint8_t *bd_addr = (uint8_t *) ll_addr_get(1); printk("Random BD Address: %02x:%02x:%02x:%02x:%02x:%02x\n", bd_addr[5], bd_addr[4], bd_addr[3], diff --git a/boards/arm/ly10demo/ly10demo.dts b/boards/arm/ly10demo/ly10demo.dts index 924cc2a..c3505ba 100644 --- a/boards/arm/ly10demo/ly10demo.dts +++ b/boards/arm/ly10demo/ly10demo.dts @@ -95,15 +95,6 @@ arduino_serial: &uart0 { ch0-inverted; }; -&sw_pwm { - timer-instance = <1>; - channel-count = <3>; - clock-prescaler = <0>; - ppi-base = <7>; - gpiote-base = <0>; - status = "disabled"; -}; - &spi0 { compatible = "nordic,nrf-spi"; /* status = "okay"; */ diff --git a/test-suites/suite-demo-board-zephyr.yaml.template b/test-suites/suite-demo-board-zephyr.yaml.template index 716f3e8..ea605ca 100644 --- a/test-suites/suite-demo-board-zephyr.yaml.template +++ b/test-suites/suite-demo-board-zephyr.yaml.template @@ -1,26 +1,26 @@ -title: "Zephyr v{{VERSION}}" +title: "Demo v{{VERSION}}" suite: - - ident: ICT-T0 - title: Power on - steps: - - command: power SWD on - - ident: ICT-T1 - title: Identify DUT - steps: - - command: identify nRF52 - - ident: ICT-T2 - title: Erase nRF52 - steps: - - command: erase nRF52 - - ident: ICT-T3 - title: Program LY10-DEMO-BOARD FW - steps: - - command: program nRF52 none,demo-board-zephyr-fw-{{VERSION}}.hex,none - - ident: ICT-T4 - title: BLE discovery - steps: - - command: bledis %BLEMAC% 5 - - ident: ICT-T5 - title: Power off - steps: - - command: power off +- ident: ICT-T0 + title: Power on + steps: + - command: power SWD on +- ident: ICT-T1 + title: Identify DUT + steps: + - command: identify nRF52 +- ident: ICT-T2 + title: Erase nRF52 + steps: + - command: erase nRF52 +- ident: ICT-T3 + title: Program PLTDemoV1 board FW + steps: + - command: program nRF52 app-pltdemov1-{{VERSION}}.hex +- ident: ICT-T4 + title: BLE discovery + steps: + - command: bledis %BLEMAC% 5 +- ident: ICT-T5 + title: Power off + steps: + - command: power off