Makefile.base 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 ?= ilm
  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. ## ilm: Program will be downloaded into ilm/ram and run directly in ilm/ram, program lost when poweroff
  22. ## flash: Program will be downloaded into flash, when running, program will be copied to ilm/ram and run in ilm/ram
  23. ## flashxip: Program will be downloaded into flash and run directly in Flash
  24. DOWNLOAD ?= ilm
  25. ## If SIMULATION=1, it means the program is optimized for hardware simulation environment
  26. SIMULATION ?= 0
  27. ## If V=1, it will display compiling message in verbose including compiling options
  28. V ?=
  29. ## If SILENT=1, it will not display any compiling messsage
  30. SILENT ?=
  31. # Variables should be defined in Application Makefile
  32. ## Available choices:
  33. ## The name of sub directories in $(NUCLEI_SDK_ROOT)/OS/
  34. RTOS ?=
  35. ## Available choices:
  36. ##### Using newlib
  37. ### newlib_full: Normal newlib library with full newlib feature
  38. ### newlib_fast: Newlib-nano library with printf and scanf float feature
  39. ### newlib_small: Newlib-nano library with printf float feature
  40. ### newlib_nano: Newlib-nano library without float printf/scanf feature
  41. ##### Using Nuclei C Runtime library
  42. ### libncrt_fast: Nuclei C Runtime library, favor speed at the expense of size
  43. ### libncrt_balanced: balanced, full feature
  44. ### libncrt_small: favor size at the expense of speed, but full feature
  45. ### libncrt_nano: favor size at the expense of speed, no float support
  46. ### libncrt_pico: favor size at the expense of speed, no long/long long support
  47. ##### Using without system library or include
  48. ### nostd: Don't search the standard system directories for header files
  49. ### nospec: Don't pass any --specs options
  50. STDCLIB ?= newlib_nano
  51. ## Available choices:
  52. ### Use to choose heapops type for libncrt, only available for libncrt
  53. ### basic: A low-overhead best-fit heap where allocation and deallocation have very little internal fragmentation
  54. ### realtime: A real-time heap where allocation and deallocation have O(1) performance
  55. ### minimal: An allocate-only heap where deallocation and reallocation are not implemented
  56. NCRTHEAP ?= basic
  57. ## Available choices:
  58. ### Use to choose fileops type for libncrt, only available for libncrt
  59. ### uart: lower level input/output via uart, developer need to implement metal_tty_putc/getc
  60. ### semi: input/output via semihosting
  61. ### rtt: input/output via jlink rtt, require to use JLink tool
  62. NCRTIO ?= uart
  63. ## If NOGC=1, it will not gc any sections during compiling to save code size
  64. NOGC ?=
  65. ## If BANNER=0, it will not display sdk banner when program run
  66. BANNER ?=
  67. ## If AUTOVEC=0, it will try to disable compiler auto vectorization as much as possible
  68. AUTOVEC ?=
  69. # Directory variables for NMSIS, SoC/RTOS chosen, Middleware Components
  70. # NUCLEI_SDK_SOC and NUCLEI_SDK_RTOS variables need to be set deferred
  71. NUCLEI_SDK_NMSIS ?= $(NUCLEI_SDK_ROOT)/NMSIS
  72. NUCLEI_SDK_SOC = $(NUCLEI_SDK_ROOT)/SoC/$(SOC)
  73. NUCLEI_SDK_RTOS = $(NUCLEI_SDK_ROOT)/OS/$(RTOS)
  74. NUCLEI_SDK_MIDDLEWARE := $(NUCLEI_SDK_ROOT)/Components
  75. ## Include GNU Make Standard Library
  76. ## Website: http://gmsl.sourceforge.net/
  77. include $(NUCLEI_SDK_BUILD)/gmsl/gmsl
  78. include $(NUCLEI_SDK_BUILD)/Makefile.misc
  79. include $(NUCLEI_SDK_BUILD)/Makefile.conf
  80. include $(NUCLEI_SDK_BUILD)/Makefile.rules