You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
946 B

5 years ago
  1. #flags common to all targets
  2. CFLAGS += -DBOARD_PCA10028
  3. CFLAGS += -DNRF51
  4. CFLAGS += -DBSP_DEFINES_ONLY
  5. CFLAGS += -mcpu=cortex-m0
  6. CFLAGS += -mthumb -mabi=aapcs --std=gnu99
  7. CFLAGS += -Wall -O3 -g3
  8. CFLAGS += -mfloat-abi=soft
  9. # keep every function in separate section. This will allow linker to dump unused functions
  10. CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
  11. CFLAGS += -fno-builtin --short-enums
  12. # keep every function in separate section. This will allow linker to dump unused functions
  13. LDFLAGS += -Xlinker -Map=$(LISTING_DIRECTORY)/$(OUTPUT_FILENAME).map
  14. LDFLAGS += -mthumb -mabi=aapcs -L $(TEMPLATE_PATH) -T$(LINKER_SCRIPT)
  15. LDFLAGS += -mcpu=cortex-m0
  16. # let linker to dump unused sections
  17. LDFLAGS += -Wl,--gc-sections
  18. # use newlib in nano version
  19. LDFLAGS += --specs=nano.specs -lc -lnosys
  20. # Assembler flags
  21. ASMFLAGS += -x assembler-with-cpp
  22. ASMFLAGS += -DBOARD_PCA10028
  23. ASMFLAGS += -DNRF51
  24. ASMFLAGS += -DBSP_DEFINES_ONLY