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?

FRDM MCXN947 - helloworld on zephyr

0
Last updated at Posted at 2026-06-08
FRDM MCXN947 - helloworld on zephyr
  • はじめに

  • 作業環境
    VirtualBox7.1.4で、Ubuntu24.04 LTSを使用
     

  • 参照サイト

  • NXP提供のツール(LinkServer)の導入

    $ sudo apt-get update
    $ sudo apt-get install libusb-1.0.0-dev
    $ sudo apt-get install apt-utils
    $ sudo apt-get install udev
    $ sudo apt-get install usbutils
    
    • ダウンロードしたツールの展開
    $ sudo chmod +x LinkServer_*.x86_64.deb.bin  
    $ sudo ./LinkServer_*.x86_64.deb.bin --noexec --keep
    $ cd installer  
    
    • 展開後のフォルダ内容
    $ ls -la
    total 29712
    drwxr-xr-x 4 root root     4096 Apr 13 11:47 .
    drwxrwxr-x 3 oly  oly      4096 Apr 13 11:08 ..
    -rw-r--r-- 1 root root    52226 Mar 20 23:40 LICENSE
    -rwxr-xr-x 1 root root  4039512 Mar 20 23:40 LPCScrypt.deb
    -rwxr-xr-x 1 root root 24671702 Mar 20 23:40 LinkServer_26.3.123.x86_64.deb
    -rwxr-xr-x 1 root root  1627206 Mar 20 23:40 MCU-Link.deb
    -rwxr-xr-x 1 root root     4633 Mar 20 23:40 install.sh
    
    • ツールのインストールに関して
      ./install.shの実行により、インストールが実行される。
      実行するとLICENSEの確認を促されるのだが、この際、
      アプリケーションwhiptailが使用される。
      whiptailのインストールは以下で実施
    $ sudo apt install whiptail
    

 

  • zephyrのビルド(hello worldサンプルアプリケーションのビルド)
    $ source /home/zephyr/zephyrproject/.venv/bin/activate
    $ west build -b frdm_mcxn947/mcxn947/cpu0 samples/hello_world -p always  
    

 

  • 基板への書き込み

    • 基板との接続確認
      (以下により参照先が見えない場合は、VirtualBoxのUSB接続を確認する。)
    $ sudo /usr/local/LinkServer_26.3.123/LinkServer probes  
    #  Description                                    Serial         Device    Board         Capabilities  
    ---  ---------------------------------------------  -------------  --------  ------------  ----------------
    1  MCU-LINK FRDM-MCXN947 (r0E7) CMSIS-DAP V3.128  NTHIAGLY3CJUH  MCXN947   FRDM-MCXN947  DEBUG, VCOM, SIO
    
    • 書き込み(コマンド west flashを使用して書き込む。LinkServerが用いられる。)
    $ sudo env "PATH=/usr/local/LinkServer_26.3.123:$PATH" $(which west) flash  
    -- west flash: rebuilding  
    ninja: no work to do.
    -- west flash: using runner linkserver
    RUNNER - gdb_port = 3333, semih port = 8888  
    -- runners.linkserver: LinkServer: /usr/local/LinkServer_26.3.123/LinkServer, version v26.3.123  
    INFO: Exact match for MCXN947:FRDM-MCXN947 found  
    INFO: Selected device MCXN947:FRDM-MCXN947  
    INFO: Selected probe #1 NTHIAGLY3CJUH (MCU-LINK FRDM-MCXN947 (r0E7) CMSIS-DAP V3.128)
    INFO: MCU-Link firmware update `check`: MCU-Link firmware not found at /usr/local/LinkServer_26.3.123/MCU-LINK_installer/probe_firmware.
    
    • 書き込み結果の確認
      hello worldサンプルアプリケーションは、
      シリアルコンソールから文字列hello worldを出力する
      アプリケーションとなっている。
      シリアルコンソールの出力を確認して、書き込み結果を確認する。
      USBケーブルを挿抜して、基板の電源を入れなおして出力した結果は下記。
    *** Booting Zephyr OS build v4.2.0-5452-g169cf86969d7 ***
    Hello World! frdm_mcxn947/mcxn947/cpu0
    
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?