 *  Executing task: nRF Connect: Build [pristine]: hekipatch-1.0-firmware/build_1 (active) 

Building hekipatch-1.0-firmware
west build --build-dir /home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1 /home/hossein/Hekimed/Software/hekipatch-1.0-firmware --pristine --board nrf52dk_nrf52832 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCACHED_CONF_FILE=/home/hossein/Hekimed/Software/hekipatch-1.0-firmware/prj.conf -DDTC_OVERLAY_FILE=/home/hossein/Hekimed/Software/hekipatch-1.0-firmware/nrf52dk_nrf52832.overlay

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/hossein/Hekimed/Software/hekipatch-1.0-firmware
-- Found Python3: /home/hossein/ncs/toolchains/v2.1.1/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
-- Cache files will be written to: /home/hossein/.cache/zephyr
-- Zephyr version: 3.1.99 (/home/hossein/ncs/v2.1.1/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf52dk_nrf52832
-- Found host-tools: zephyr 0.14.1 (/home/hossein/ncs/toolchains/v2.1.1/opt/zephyr-sdk)
-- Found dtc: /home/hossein/ncs/toolchains/v2.1.1/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.14.1 (/home/hossein/ncs/toolchains/v2.1.1/opt/zephyr-sdk)
-- Found BOARD.dts: /home/hossein/ncs/v2.1.1/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
-- Found devicetree overlay: /home/hossein/Hekimed/Software/hekipatch-1.0-firmware/nrf52dk_nrf52832.overlay
-- Generated zephyr.dts: /home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1/zephyr/dts.cmake
Parsing /home/hossein/ncs/v2.1.1/zephyr/Kconfig
Loaded configuration '/home/hossein/ncs/v2.1.1/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig'
Merged configuration '/home/hossein/Hekimed/Software/hekipatch-1.0-firmware/prj.conf'
Configuration saved to '/home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1/zephyr/.config'
Kconfig header saved to '/home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/hossein/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hossein/Hekimed/Software/hekipatch-1.0-firmware/build_1
-- west build: building application
[1/229] Preparing syscall dependency handling

[2/229] Generating include/generated/version.h
-- Zephyr version: 3.1.99 (/home/hossein/ncs/v2.1.1/zephyr), build: v3.1.99-ncs1
[17/229] Building C object CMakeFiles/app.dir/lib/MAX30003.c.obj
../lib/MAX30003.c: In function 'max30003_regRead':
../lib/MAX30003.c:16:20: warning: initialization of 'void *' from 'uint8_t' {aka 'unsigned char'} makes pointer from integer without a cast [-Wint-conversion]
   16 |             .buf = readBuff, // used to ignore the first spare byte
      |                    ^~~~~~~~
../lib/MAX30003.c:16:20: note: (near initialization for 'rx_bufs[0].buf')
../lib/MAX30003.c: In function 'max30003_checkAvailability':
../lib/MAX30003.c:110:9: warning: unused variable 'err' [-Wunused-variable]
  110 |     int err;
      |         ^~~
../lib/MAX30003.c: In function 'max30003_regRead':
../lib/MAX30003.c:14:20: warning: 'readBuff' is used uninitialized in this function [-Wuninitialized]
   14 |     struct spi_buf rx_bufs[] = {
      |                    ^~~~~~~
[22/229] Building C object CMakeFiles/app.dir/src/main.c.obj
../src/main.c:52:74: warning: backslash and newline separated by space
   52 | #define BLE_BUF_SIZE      (PCG_BUF_SIZE + ECG_BUF_SIZE + ACCEL_BUF_SIZE +\
      |                                                                           
In file included from ../src/main.c:2:
/home/hossein/ncs/v2.1.1/zephyr/include/zephyr/device.h:296:32: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  296 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                ^
../src/main.c:118:30: note: in expansion of macro 'DEVICE_DT_GET'
  118 | struct device *led_ind_pwm = DEVICE_DT_GET(LED_PWM_NODE_ID);
      |                              ^~~~~~~~~~~~~
../src/main.c: In function 'main':
../src/main.c:538:2: warning: multi-line comment [-Wcomment]
  538 |  // max30003_int_pin_cfg(max30003_dev, &spi_cfg,\
      |  ^
../src/main.c:554:61: warning: passing argument 5 of 'bt_le_adv_start' makes integer from pointer without a cast [-Wint-conversion]
  554 |  err = bt_le_adv_start(adv_param, ad, ARRAY_SIZE(ad), NULL, NULL);
      |                                                             ^~~~
      |                                                             |
      |                                                             void *
In file included from ../src/main.c:26:
/home/hossein/ncs/v2.1.1/zephyr/include/zephyr/bluetooth/bluetooth.h:916:40: note: expected 'size_t' {aka 'unsigned int'} but argument is of type 'void *'
  916 |       const struct bt_data *sd, size_t sd_len);
      |                                 ~~~~~~~^~~~~~
../src/main.c:581:8: warning: unused variable 'z_accel' [-Wunused-variable]
  581 |  float z_accel = 0;
      |        ^~~~~~~
../src/main.c:580:8: warning: unused variable 'y_accel' [-Wunused-variable]
  580 |  float y_accel = 0;
      |        ^~~~~~~
../src/main.c:579:8: warning: unused variable 'x_accel' [-Wunused-variable]
  579 |  float x_accel = 0;
      |        ^~~~~~~
../src/main.c:563:13: warning: unused variable 'ret' [-Wunused-variable]
  563 |  nrfx_err_t ret;
      |             ^~~
../src/main.c: In function 'thread_accel':
../src/main.c:831:43: warning: unused variable 'z_accel_sum' [-Wunused-variable]
  831 |   float x_accel_sum = 0, y_accel_sum = 0, z_accel_sum = 0;
      |                                           ^~~~~~~~~~~
../src/main.c:831:26: warning: unused variable 'y_accel_sum' [-Wunused-variable]
  831 |   float x_accel_sum = 0, y_accel_sum = 0, z_accel_sum = 0;
      |                          ^~~~~~~~~~~
../src/main.c:831:9: warning: unused variable 'x_accel_sum' [-Wunused-variable]
  831 |   float x_accel_sum = 0, y_accel_sum = 0, z_accel_sum = 0;
      |         ^~~~~~~~~~~
../src/main.c: In function 'thread_temp':
../src/main.c:886:22: warning: operation on 'temp_count' may be undefined [-Wsequence-point]
  886 |   temp_buf[temp_count++] = (temp - temp_buf[temp_count-1]) * 100;
      |            ~~~~~~~~~~^~
In file included from ../src/main.c:24:
../src/main.c: At top level:
.././lib/MAX30003.h:379:12: warning: 'max30003_regRead' declared 'static' but never defined [-Wunused-function]
  379 | static int max30003_regRead(const struct device *max30003_dev, struct spi_config *spi_cfg, uint8_t reg, uint8_t *data, size_t len);
      |            ^~~~~~~~~~~~~~~~
.././lib/MAX30003.h:380:12: warning: 'max30003_regWrite' declared 'static' but never defined [-Wunused-function]
  380 | static int max30003_regWrite(const struct device *max30003_dev, struct spi_config *spi_cfg, uint8_t reg, uint8_t *data, size_t len);
      |            ^~~~~~~~~~~~~~~~~
[23/229] Building C object CMakeFiles/app.dir/lib/ble_service.c.obj
../lib/ble_service.c: In function 'comm_write_cb':
../lib/ble_service.c:35:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   35 |     char *buffer = buf;
      |                    ^~~
../lib/ble_service.c:42:13: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
   42 |             return;
      |             ^~~~~~
../lib/ble_service.c:29:16: note: declared here
   29 | static ssize_t comm_write_cb(struct bt_conn *conn,
      |                ^~~~~~~~~~~~~
../lib/ble_service.c:52:13: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
   52 |             return;
      |             ^~~~~~
../lib/ble_service.c:29:16: note: declared here
   29 | static ssize_t comm_write_cb(struct bt_conn *conn,
      |                ^~~~~~~~~~~~~
../lib/ble_service.c: In function 'ack_write_cb':
../lib/ble_service.c:67:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   67 |     char *buffer = buf;
      |                    ^~~
../lib/ble_service.c: In function 'read_battlvl':
../lib/ble_service.c:85:39: warning: passing argument 3 of 'bt_gatt_attr_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   85 |  return bt_gatt_attr_read(conn, attr, buf, len, offset, value,
      |                                       ^~~
In file included from ../lib/ble_service.c:17:
/home/hossein/ncs/v2.1.1/zephyr/include/zephyr/bluetooth/gatt.h:532:12: note: expected 'void *' but argument is of type 'const void *'
  532 |      void *buf, uint16_t buf_len, uint16_t offset,
      |      ~~~~~~^~~
../lib/ble_service.c: At top level:
../lib/ble_service.c:114:21: warning: initialization of 'ssize_t (*)(struct bt_conn *, const struct bt_gatt_attr *, void *, uint16_t,  uint16_t)' {aka 'int (*)(struct bt_conn *, const struct bt_gatt_attr *, void *, short unsigned int,  short unsigned int)'} from incompatible pointer type 'ssize_t (*)(struct bt_conn *, const struct bt_gatt_attr *, const void *, uint16_t,  uint16_t,  uint8_t)' {aka 'int (*)(struct bt_conn *, const struct bt_gatt_attr *, const void *, short unsigned int,  short unsigned int,  unsigned char)'} [-Wincompatible-pointer-types]
  114 |                     read_battlvl, NULL, NULL),
      |                     ^~~~~~~~~~~~
/home/hossein/ncs/v2.1.1/zephyr/include/zephyr/bluetooth/gatt.h:562:47: note: in definition of macro 'BT_GATT_SERVICE_DEFINE'
  562 |  const struct bt_gatt_attr attr_##_name[] = { __VA_ARGS__ }; \
      |                                               ^~~~~~~~~~~
/home/hossein/ncs/v2.1.1/zephyr/include/zephyr/bluetooth/gatt.h:713:2: note: in expansion of macro 'BT_GATT_ATTRIBUTE'
  713 |  BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _user_data)
      |  ^~~~~~~~~~~~~~~~~
../lib/ble_service.c:111:5: note: in expansion of macro 'BT_GATT_CHARACTERISTIC'
  111 |     BT_GATT_CHARACTERISTIC(BT_UUID_BATLVL,
      |     ^~~~~~~~~~~~~~~~~~~~~~
../lib/ble_service.c:114:21: note: (near initialization for 'attr_batt_service[2].read')
  114 |                     read_battlvl, NULL, NULL),
      |                     ^~~~~~~~~~~~
/home/hossein/ncs/v2.1.1/zephyr/include/zephyr/bluetooth/gatt.h:562:47: note: in definition of macro 'BT_GATT_SERVICE_DEFINE'
  562 |  const struct bt_gatt_attr attr_##_name[] = { __VA_ARGS__ }; \
      |                                               ^~~~~~~~~~~
/home/hossein/ncs/v2.1.1/zephyr/include/zephyr/bluetooth/gatt.h:713:2: note: in expansion of macro 'BT_GATT_ATTRIBUTE'
  713 |  BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _user_data)
      |  ^~~~~~~~~~~~~~~~~
../lib/ble_service.c:111:5: note: in expansion of macro 'BT_GATT_CHARACTERISTIC'
  111 |     BT_GATT_CHARACTERISTIC(BT_UUID_BATLVL,
      |     ^~~~~~~~~~~~~~~~~~~~~~
[219/229] Linking C executable zephyr/zephyr_pre0.elf

[223/229] Linking C executable zephyr/zephyr_pre1.elf

[229/229] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      174796 B       512 KB     33.34%
            SRAM:       60408 B        64 KB     92.18%
        IDT_LIST:          0 GB         2 KB      0.00%
 *  Terminal will be reused by tasks, press any key to close it. 
