Hello,
I was able to flash demo .hex to my nRF52840DKs from this (https://github.com/NordicPlayground/nrf52-ble-multi-link-multi-role) project, but now I would like to make some changes in the source to increase the power of the signal on both aggregator and peripheral, and also I would like to send RSSI frequently not only on the button event. Anyway, before making changes to the source, I wanted to create makefile in order to be able to compile the example source successfully, unfortunately, I`m struggling with it.
Let`s begin with ble_peripheral_long_range. I downloaded the whole ZIP archive from github, extracted "ble_peripheral_long_range" folder into nRF5_SDK_15.3.0_59ac345/examples/ble_peripheral/. As this example doesn`t contain make file, I copied the armgcc folder from .../ble_app_template/pca10056/s140/ to ../ble_peripheral/pca10056/s140/. At first, when running make command, compiler didn`t like line 647 on main.c - "ble_gap_phys_t phys;", as phys is defined but never used. Ok, I put "//" to comment out this line, and this is when the real problems appear. "app_display.h" was included in main.c, but compiler was unaware of the location of this file so there were problems with linking, so I just added "$(PROJ_DIR)/app_display.c \" to my makefile SRC_FILES. Then app_display.c was included "ugui.h", so I copied /comon/ugui/ folder to project directory and added "$(PROJ_DIR)/ugui" to makefile INC_FOLDERS and "$(PROJ_DIR)/ugui.c" to SRC_FILES. After that I had to add "$(PROJ_DIR)/gfx_extended" and " $(SDK_ROOT)/external/thedotfactory_fonts" to INC_FOLDERS because of "ugui/ugui.h:1058:10: fatal error: nrf_gfx_ext.h: No such file or directory" and "/gfx_extended/nrf_gfx_ext.h:48:10: fatal error: nrf_font.h: No such file or directory". The next message after adding these two, was "/../../app_display.c:4:10: fatal error: images.h: No such file or directory", so I just copied images.h into my PROJ_DIR. So, at this point I have added "$(PROJ_DIR)/app_display.c \$(PROJ_DIR)/ugui.c \" to the template SRC_FILES and " $(SDK_ROOT)/external/thedotfactory_fonts \$(PROJ_DIR)/ugui \ $(PROJ_DIR)/gfx_extended \ " to INC_FOLDERS, also I have copied gfx_extended and ugui folders and images.h file to my PROJ_DIR. Now I`m getting this:
In file included from ../../../app_display.c:2: ../../../ugui/ugui.h:1059:18: error: '_HW_draw_line' declared 'static' but never defined [-Werror=unused-function] static UG_RESULT _HW_draw_line(UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_COLOR c); ^~~~~~~~~~~~~ ../../../ugui/ugui.h:1060:18: error: '_HW_fill_frame' declared 'static' but never defined [-Werror=unused-function] static UG_RESULT _HW_fill_frame( UG_S16 x1, UG_S16 y1, UG_S16 x2 , UG_S16 y2 , UG_COLOR c); ^~~~~~~~~~~~~~ ../../../ugui/ugui.h:1061:18: error: '_HW_draw_buffer' declared 'static' but never defined [-Werror=unused-function] static UG_RESULT _HW_draw_buffer(UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, void *p_data, UG_U32 length); ^~~~~~~~~~~~~~~ ../../../ugui/ugui.h:1063:13: error: 'UserSetPixel' declared 'static' but never defined [-Werror=unused-function] static void UserSetPixel (UG_S16 x, UG_S16 y, UG_COLOR c); ^~~~~~~~~~~~ cc1: all warnings being treated as errors ../../../../../../components/toolchain/gcc/Makefile.common:272: recipe for target '_build/nrf52840_xxaa/app_display.c.o' failed make: *** [_build/nrf52840_xxaa/app_display.c.o] Error 1
And I`m stuck there. I assume I have to change something in my makefile but I`m not sure of what. I`m not a programmer and this is my first time editing makefile. I`ll appreciate your help. Thanks in advance!