This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Makefile not including files from Makefile.common

I can't figure out why but my build cannot locate files that are included in the makefile.common I'm using SDK 5.1.0 and the ble_app_hrs project. It seems it can't find one of the files in the source directory.

Here's the Error:

Description	Resource	Path	Location	Type
fatal error: app_error.h: No such file or directory	
battery.c	/ble_app_hrs_PCA10001	line 29	
make: *** [_build/battery.o] Error 1	ble_app_hrs_PCA10001		 

I've tried with the LED project provided and that seems to work. I used it as a template for my makefile. This leads me to believe that the makefile.common is ok. I haven't made any changes to it.

TARGET_CHIP := NRF51822_QFAA_CA
BOARD := BOARD_PCA10001

C_SOURCE_FILES += battery.c
C_SOURCE_FILES += led.c

OUTPUT_FILENAME := ble_app_hrs_gcc
SDK_PATH = ../../../../../


#Uncomment correct line if you have s110 programmed on the chip.
DEVICE_VARIANT := xxaa
#DEVICE_VARIANT := xxab

#USE_SOFTDEVICE := s110
#USE_SOFTDEVICE := s210

include $(SDK_PATH)Source/templates/gcc/Makefile.common
Parents
  • Ok I included all the c_source files and now it seems to get trough building battery.c but I still have tons of undefined symbols in main.c

    eg:

    Symbol 'PSTORAGE_FLASH_PAGE_END' could not be resolved main.c /ble_app_hrs_PCA10001 line 514 Symbol 'PSTORAGE_FLASH_PAGE_END' could not be resolved main.c /ble_app_hrs_PCA10001 line 515 Symbol 'NULL' could not be resolved main.c /ble_app_hrs_PCA10001 line 383 Symbol 'RADIO_CRCCNF_LEN_Msk' could not be resolved radio_config.c /LED line 57

    These seem to all be in pstorage_platform.h which is in the project.

    Looking in the file I see <stdint.h> is listed as an unresolved inclusion. Could this be a toolchain problem? I also see uint32_t cannot be resolved.

  • Can you please make sure that the GCC version is set correctly in Makefile.windows? If it isn't, it won't find the toolchain includes, which seems to be what you're describing.

    If you still have trouble, can you please try uploading the entire build output as a text file, so I can see exactly what it does?

Reply Children
No Data
Related