Advertisement
Guest User

makefile

a guest
Aug 29th, 2023
79
0
117 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.24 KB | None | 0 0
  1. ################################################################################
  2. # \file Makefile
  3. # \version 1.0
  4. #
  5. # \brief
  6. # Top-level application make file.
  7. #
  8. ################################################################################
  9. # \copyright
  10. # Copyright 2018-2023, Cypress Semiconductor Corporation (an Infineon company)
  11. # SPDX-License-Identifier: Apache-2.0
  12. #
  13. # Licensed under the Apache License, Version 2.0 (the "License");
  14. # you may not use this file except in compliance with the License.
  15. # You may obtain a copy of the License at
  16. #
  17. # http://www.apache.org/licenses/LICENSE-2.0
  18. #
  19. # Unless required by applicable law or agreed to in writing, software
  20. # distributed under the License is distributed on an "AS IS" BASIS,
  21. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. # See the License for the specific language governing permissions and
  23. # limitations under the License.
  24. ################################################################################
  25.  
  26.  
  27. ################################################################################
  28. # Basic Configuration
  29. ################################################################################
  30.  
  31. # Type of ModusToolbox Makefile Options include:
  32. #
  33. # COMBINED -- Top Level Makefile usually for single standalone application
  34. # APPLICATION -- Top Level Makefile usually for multi project application
  35. # PROJECT -- Project Makefile under Application
  36. #
  37. MTB_TYPE=COMBINED
  38.  
  39. # Target board/hardware (BSP).
  40. # To change the target, it is recommended to use the Library manager
  41. # ('make library-manager' from command line), which will also update Eclipse IDE launch
  42. # configurations.
  43. TARGET=APP_CY8CPROTO-062-4343W
  44.  
  45. # Name of application (used to derive name of final linked file).
  46. #
  47. # If APPNAME is edited, ensure to update or regenerate launch
  48. # configurations for your IDE.
  49. APPNAME=mtb-example-empty-app
  50.  
  51. # Name of toolchain to use. Options include:
  52. #
  53. # GCC_ARM -- GCC provided with ModusToolbox software
  54. # ARM -- ARM Compiler (must be installed separately)
  55. # IAR -- IAR Compiler (must be installed separately)
  56. #
  57. # See also: CY_COMPILER_PATH below
  58. TOOLCHAIN=GCC_ARM
  59.  
  60. # Default build configuration. Options include:
  61. #
  62. # Debug -- build with minimal optimizations, focus on debugging.
  63. # Release -- build with full optimizations
  64. # Custom -- build with custom configuration, set the optimization flag in CFLAGS
  65. #
  66. # If CONFIG is manually edited, ensure to update or regenerate launch configurations
  67. # for your IDE.
  68. CONFIG=Debug
  69.  
  70. # If set to "true" or "1", display full command-lines when building.
  71. VERBOSE=
  72.  
  73.  
  74. ################################################################################
  75. # Advanced Configuration
  76. ################################################################################
  77.  
  78. # Enable optional code that is ordinarily disabled by default.
  79. #
  80. # Available components depend on the specific targeted hardware and firmware
  81. # in use. In general, if you have
  82. #
  83. # COMPONENTS=foo bar
  84. #
  85. # ... then code in directories named COMPONENT_foo and COMPONENT_bar will be
  86. # added to the build
  87. #
  88. COMPONENTS=
  89.  
  90. # Like COMPONENTS, but disable optional code that was enabled by default.
  91. DISABLE_COMPONENTS=
  92.  
  93. # By default the build system automatically looks in the Makefile's directory
  94. # tree for source code and builds it. The SOURCES variable can be used to
  95. # manually add source code to the build process from a location not searched
  96. # by default, or otherwise not found by the build system.
  97. SOURCES=
  98.  
  99. # Like SOURCES, but for include directories. Value should be paths to
  100. # directories (without a leading -I).
  101. INCLUDES=
  102.  
  103. # Add additional defines to the build process (without a leading -D).
  104. DEFINES=
  105.  
  106. # Select softfp or hardfp floating point. Default is softfp.
  107. VFP_SELECT=
  108.  
  109. # Additional / custom C compiler flags.
  110. #
  111. # NOTE: Includes and defines should use the INCLUDES and DEFINES variable
  112. # above.
  113. CFLAGS=
  114.  
  115. # Additional / custom C++ compiler flags.
  116. #
  117. # NOTE: Includes and defines should use the INCLUDES and DEFINES variable
  118. # above.
  119. CXXFLAGS=
  120.  
  121. # Additional / custom assembler flags.
  122. #
  123. # NOTE: Includes and defines should use the INCLUDES and DEFINES variable
  124. # above.
  125. ASFLAGS=
  126.  
  127. # Additional / custom linker flags.
  128. LDFLAGS=
  129.  
  130. # Additional / custom libraries to link in to the application.
  131. LDLIBS=
  132.  
  133. # Path to the linker script to use (if empty, use the default linker script).
  134. LINKER_SCRIPT=
  135.  
  136. # Custom pre-build commands to run.
  137. PREBUILD=
  138.  
  139. # Custom post-build commands to run.
  140. POSTBUILD=
  141.  
  142.  
  143. ################################################################################
  144. # Paths
  145. ################################################################################
  146.  
  147. # Relative path to the project directory (default is the Makefile's directory).
  148. #
  149. # This controls where automatic source code discovery looks for code.
  150. CY_APP_PATH=
  151.  
  152. # Relative path to the shared repo location.
  153. #
  154. # All .mtb files have the format, <URI>#<COMMIT>#<LOCATION>. If the <LOCATION> field
  155. # begins with $$ASSET_REPO$$, then the repo is deposited in the path specified by
  156. # the CY_GETLIBS_SHARED_PATH variable. The default location is one directory level
  157. # above the current app directory.
  158. # This is used with CY_GETLIBS_SHARED_NAME variable, which specifies the directory name.
  159. CY_GETLIBS_SHARED_PATH=../
  160.  
  161. # Directory name of the shared repo location.
  162. #
  163. CY_GETLIBS_SHARED_NAME=mtb_shared
  164.  
  165. # Absolute path to the compiler's "bin" directory.
  166. #
  167. # The default depends on the selected TOOLCHAIN (GCC_ARM uses the ModusToolbox
  168. # software provided compiler by default).
  169. CY_COMPILER_PATH=
  170.  
  171.  
  172. # Locate ModusToolbox helper tools folders in default installation
  173. # locations for Windows, Linux, and macOS.
  174. CY_WIN_HOME=$(subst \,/,$(USERPROFILE))
  175. CY_TOOLS_PATHS ?= $(wildcard \
  176. $(CY_WIN_HOME)/ModusToolbox/tools_* \
  177. $(HOME)/ModusToolbox/tools_* \
  178. /Applications/ModusToolbox/tools_*)
  179.  
  180. # If you install ModusToolbox software in a custom location, add the path to its
  181. # "tools_X.Y" folder (where X and Y are the version number of the tools
  182. # folder). Make sure you use forward slashes.
  183. CY_TOOLS_PATHS+=
  184.  
  185. # Default to the newest installed tools folder, or the users override (if it's
  186. # found).
  187. CY_TOOLS_DIR=$(lastword $(sort $(wildcard $(CY_TOOLS_PATHS))))
  188.  
  189. ifeq ($(CY_TOOLS_DIR),)
  190. $(error Unable to find any of the available CY_TOOLS_PATHS -- $(CY_TOOLS_PATHS). On Windows, use forward slashes.)
  191. endif
  192.  
  193. $(info Tools Directory: $(CY_TOOLS_DIR))
  194.  
  195. include $(CY_TOOLS_DIR)/make/start.mk
  196.  
  197. #Addons for RTOS Abstraction
  198. #COMPONENTS+=RTX
  199. COMPONENTS+=FREERTOS
  200. #COMPONENTS+=THREADX
  201.  
  202. #Addons for mqtt
  203. #DEFINES += CY_MQTT_ACK_RECEIVE_TIMEOUT_MS=3000
  204. #DEFINES += CY_MQTT_MESSAGE_SEND_TIMEOUT_MS=3000
  205. #DEFINES += CY_MQTT_MESSAGE_RECEIVE_TIMEOUT_MS=500
  206. #DEFINES += CY_MQTT_MAX_RETRY_VALUE=3
  207. #DEFINES += CY_MQTT_MAX_OUTGOING_PUBLISHES=2
  208. #DEFINES += CY_MQTT_MAX_OUTGOING_SUBSCRIBES=2
  209. #DEFINES += MQTT_PINGRESP_TIMEOUT_MS=5000
  210. #DEFINES += MQTT_RECV_POLLING_TIMEOUT_MS=1000
  211. #DEFINES += MQTT_SEND_RETRY_TIMEOUT_MS=500
  212. #COMPONENTS += FREERTOS MBEDTLS LWIP SECURE_SOCKETS
  213.  
  214. DEFINES+=HTTP_DO_NOT_USE_CUSTOM_CONFIG
  215. DEFINES+=ENABLE_HTTP_CLIENT_LOGS
  216. DEFINES+=HTTP_MAX_RESPONSE_HEADERS_SIZE_BYTES=<N>
  217.  
  218. #addons for secure_socket
  219. DEFINES += ENABLE_SECURE_SOCKETS_LOGS
  220.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement