Makefile.base 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. NUCLEI_SDK_BUILD = $(NUCLEI_SDK_ROOT)/Build
  2. # Include your local and global makefile variables
  3. # SOC, DOWNLOAD, STDCLIB etc.
  4. # Makefile.global should be placed in $(NUCLEI_SDK_ROOT)/Build
  5. # Makefile.local should be placed together with application Makefile in your own application folder
  6. # Sample content for this Makefile.local or Makefile.global
  7. # SOC ?= evalsoc
  8. # DOWNLOAD ?= sram
  9. EXTRA_MKS := $(wildcard Makefile.local $(NUCLEI_SDK_BUILD)/Makefile.global)
  10. ifneq ("$(strip $(EXTRA_MKS))", "")
  11. $(info Obtaining addtional make variables from $(realpath $(EXTRA_MKS)))
  12. include $(EXTRA_MKS)
  13. endif
  14. # Variables could be passed in make command
  15. # NOTE: CORE and BOARD are defined in $(NUCLEI_SDK_ROOT)/SoC/$(SOC)/Makefile.build
  16. # BOARD and SOC name should always be lower-case
  17. ## Available choices:
  18. ## The name of sub directories in $(NUCLEI_SDK_ROOT)/SoC/
  19. SOC ?= evalsoc
  20. ## Available choices:
  21. ## sram: Program will be downloaded into sram and run directly in sram, program lost when poweroff
  22. DOWNLOAD ?= sram
  23. ## If SIMULATION=1, it means the program is optimized for hardware simulation environment
  24. SIMULATION ?= 0
  25. ## If V=1, it will display compiling message in verbose including compiling options
  26. V ?=
  27. ## If SILENT=1, it will not display any compiling messsage
  28. SILENT ?=
  29. # Variables should be defined in Application Makefile
  30. ## Available choices:
  31. ## The name of sub directories in $(NUCLEI_SDK_ROOT)/OS/
  32. RTOS ?=
  33. ## Available choices:
  34. ##### Using newlib
  35. ### newlib_full: Normal newlib library with full newlib feature, to replace NEWLIB!=nano
  36. ### newlib_fast: Newlib-nano library with printf and scanf float feature
  37. ### newlib_small: Newlib-nano library with printf float feature, to replace NEWLIB=nano PFLOAT=1
  38. ### newlib_nano: Newlib-nano library without float printf/scanf feature, to replace NEWLIB=nano PFLOAT=0
  39. ##### Using Nuclei C Runtime library
  40. ### libncrt_fast: Nuclei C Runtime library, favor speed at the expense of size
  41. ### libncrt_balanced: balanced, full feature
  42. ### libncrt_small: favor size at the expense of speed, but full feature
  43. ### libncrt_nano: favor size at the expense of speed, no float support
  44. ### libncrt_pico: favor size at the expense of speed, no long/long long support
  45. ##### Using without system library or include
  46. ### nostd: Don't search the standard system directories for header files
  47. ### nospec: Don't pass any --specs options
  48. STDCLIB ?= newlib_nano
  49. ## Available choices:
  50. ### Use to choose heapops type for libncrt, only available for libncrt
  51. ### basic: A low-overhead best-fit heap where allocation and deallocation have very little internal fragmentation
  52. ### realtime: A real-time heap where allocation and deallocation have O(1) performance
  53. ### minimal: An allocate-only heap where deallocation and reallocation are not implemented
  54. NCRTHEAP ?= basic
  55. ## Available choices:
  56. ### Use to choose fileops type for libncrt, only available for libncrt
  57. ### uart: lower level input/output via uart, developer need to implement metal_tty_putc/getc
  58. ### semi: input/output via semihosting
  59. ### rtt: input/output via jlink rtt, require to use JLink tool
  60. NCRTIO ?= uart
  61. ## If NOGC=1, it will not gc any sections during compiling to save code size
  62. NOGC ?=
  63. ## If BANNER=0, it will not display sdk banner when program run
  64. BANNER ?=
  65. # Directory variables for NMSIS, SoC/RTOS chosen, Middleware Components
  66. # NUCLEI_SDK_SOC and NUCLEI_SDK_RTOS variables need to be set deferred
  67. NUCLEI_SDK_NMSIS ?= $(NUCLEI_SDK_ROOT)/NMSIS
  68. NUCLEI_SDK_SOC = $(NUCLEI_SDK_ROOT)/SoC/$(SOC)
  69. NUCLEI_SDK_RTOS = $(NUCLEI_SDK_ROOT)/OS/$(RTOS)
  70. NUCLEI_SDK_MIDDLEWARE := $(NUCLEI_SDK_ROOT)/Components
  71. ## Include GNU Make Standard Library
  72. ## Website: http://gmsl.sourceforge.net/
  73. include $(NUCLEI_SDK_BUILD)/gmsl/gmsl
  74. include $(NUCLEI_SDK_BUILD)/Makefile.misc
  75. include $(NUCLEI_SDK_BUILD)/Makefile.conf
  76. include $(NUCLEI_SDK_BUILD)/Makefile.rules