본문 바로가기
임베디드.일렉트로닉스

SEGGER Embedded Studio. Project macro

by i.got.it 2019. 1. 5.




You can use macros to modify the way the project system refers to files.

Macros are divided into four classes:

  • System macros defined by SEGGER Embedded Studio relay information about the environment, such as paths to common directories.
  • Global macros are saved in the environment and are shared across all solutions and projects. Typically, you would set up paths to libraries and any external items here.
  • Project macros are saved as project options in the project file and can define values specific to the solution or project in which they are defined.
  • Build macros are generated by the project system when you build your project.

System macros

System macros are defined by SEGGER Embedded Studio itself and as such are read-only. System macros can be used in project options, environment settings and to refer to files. See System macros list for the list of System macros.

Global macros

Global macros are store in the environment option Build Macros.

To define a global macro:
  1. Use Tools > Options to show the environment options dialog.
  2. In the Environment Options dialog's Building group, select the Build Macros option.
  3. Click the ellipsis button on the right.
  4. Set the macro using the syntax name = replacement text.

Project macros

To define a project macro:

To set the project macros:

  1. Select the appropriate solution/project in the Project Explorer.
  2. Use Project > Options to show the project options dialog.
  3. In the Project Options dialog's General Options group, select the Macros option.
  4. Click the ellipsis button on the right.
  5. Set the macro using the syntax name = replacement text.

Build macros

Build macros are defined by the project system for a build of a given project node. See Build macros list for the list of build macros.

Using macros

You can use a macro for a project option or environment setting by using the $(macro) syntax. For example, the Object File Name option has a default value of $(IntDir)/$(InputName)$(OBJ).

You can also specify a default value for a macro if it is undefined using the $(macro:default) syntax. For example, $(MyMacro:0) would expand to 0 if the macro MyMacro has not been defined.




from : https://studio.segger.com/index.htm?https://studio.segger.com/ide_project_macros.htm





첫등록 : 2018년 1월 5일

최종수정 : 


본 글 단축주소 : https://igotit.tistory.com/2024





댓글



 

비트코인




암호화폐       외환/나스닥/골드       암호화폐/외환/나스닥/골드 암호화폐/외환/나스닥/골드   암호화폐/외환/나스닥/골드
     
현물 |선물 인버스 |선물 USDT       전략매니저(카피트레이딩)     롤오버 이자 없는 스왑프리계좌
( 스왑프리 암호화폐도 거래 가능 )    
MT4, MT5 , cTrader 모두 지원     FTMO 계좌 매매운용. MT4,MT5