0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MCUXpressoでのヘッドレス・ビルド (macOSでの例)

Posted at

MCUXpressoでのヘッドレス・ビルド

前から調べていたのだけど,ようやくその方法が判明した.  
MCUXpresso IDEは,macOSではそのOS用のアプリケーション「MCUXpressoIDE.app」として提供されている.実は「MCUXpressoIDE.app」はアプロケーションに必要なファイルを格納したパッケージのフォルダになっている.
このアプリケーションをコマンドラインから開くには,その中の実体を指し示してやらなければならない.
ちなみに,標準のインストーラでインストールしたものでは,次のような場所に置かれる(アプリケーション・パッケージの内容は,ファインダ上なら*.app上で右クリックして「パッケージの内容を表示」を選べば覗いてみることができる)

/Applications/MCUXpressoIDE_24.9.25/ide/MCUXpressoIDE.app/Contents/MacOS/mcuxpressoide

これを使って,次のような引数と一緒にコールしてやると動く.

-nosplash 
--launcher.suppressErrors 
-application org.eclipse.cdt.managedbuilder.core.headlessbuild 
-data {ワークスペース名} 
-cleanBuild {プロジェクト名}

具体的な例として,たとえばデスクトップに置いたワークスペース:「nnn」内の「0_0_Hello_world_FRDM_MCXN236」プロジェクトのビルドはこんな感じになる.

/Applications/MCUXpressoIDE_24.9.25/ide/MCUXpressoIDE.app/Contents/MacOS/mcuxpressoide -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data '/Users/tedd/Desktop/nnn/' -cleanBuild 0_0_Hello_world_FRDM_MCXN236

ちなみにこのアプリケーションの場合,別プロジェクトにリンクされるライブラリが用意される.このためライブラリは先にビルドされてなければならない.なので次の2つのコマンドでエラーなくビルドできる.

/Applications/MCUXpressoIDE_24.9.25/ide/MCUXpressoIDE.app/Contents/MacOS/mcuxpressoide -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data '/Users/tedd/Desktop/nnn/' -cleanBuild _r01lib_frdm_mcxn236
/Applications/MCUXpressoIDE_24.9.25/ide/MCUXpressoIDE.app/Contents/MacOS/mcuxpressoide -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data '/Users/tedd/Desktop/nnn/' -cleanBuild 0_0_Hello_world_FRDM_MCXN236

参考情報

Windowsバッチファイルの例

オプション指定の詳細

.app上で右クリックして「パッケージの内容を表示」を選ぶ

スクリーンショット 2024-12-16 10.34.23.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?