<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCU Bootloader中的主题 FRDM-MCXN236 mcuboot</title>
    <link>https://community.nxp.com/t5/MCU-Bootloader/FRDM-MCXN236-mcuboot/m-p/2416812#M1512</link>
    <description>&lt;H3&gt;Building MCUboot, Device Tree and Zephyr separately on FRDM-MCXN236&lt;/H3&gt;&lt;P&gt;I am using the &lt;STRONG&gt;NXP FRDM-MCXN236&lt;/STRONG&gt; board and I am relatively new to Zephyr.&lt;/P&gt;&lt;P&gt;As part of my Zephyr training, I have successfully built and run a basic Zephyr project using &lt;STRONG&gt;Visual Studio Code&lt;/STRONG&gt;. I would now like to understand the boot and board bring-up process at a lower level.&lt;/P&gt;&lt;P&gt;My goal is to try building the following components separately:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;MCUboot&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Device Tree&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Zephyr application/kernel&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I would then like to understand which parts are actually flashed to the board, flash them separately where possible, and observe the boot sequence.&lt;/P&gt;&lt;P&gt;I feel this would be a useful exercise for understanding &lt;STRONG&gt;board bring-up, bootloaders, Device Tree, Kconfig, linker scripts, and the relationship between MCUboot and the Zephyr application&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I would also like to understand whether Zephyr can be customized in a way similar to the Linux kernel menuconfig workflow.&lt;/P&gt;&lt;H3&gt;My environment&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Board: &lt;STRONG&gt;NXP FRDM-MCXN236&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Host OS: &lt;STRONG&gt;Windows 11&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Build environment: &lt;STRONG&gt;Ubuntu 22.04 under WSL2&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Zephyr: &lt;STRONG&gt;4.4.99&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Python: &lt;STRONG&gt;3.10.12&lt;/STRONG&gt; currently installed&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;West: &lt;STRONG&gt;1.5.0&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;CMake: &lt;STRONG&gt;4.4.3&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Ninja: &lt;STRONG&gt;1.10.1&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Zephyr SDK: &lt;STRONG&gt;1.0.1&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;My workspace is:&lt;/P&gt;&lt;PRE&gt;~/zephyr-training/
├── zephyr/
├── mcuboot/
├── my-zephyr-app/
└── workspace/&lt;/PRE&gt;&lt;H3&gt;MCUboot source&lt;/H3&gt;&lt;P&gt;I cloned MCUboot separately under:&lt;/P&gt;&lt;PRE&gt;~/zephyr-training/mcuboot/&lt;/PRE&gt;&lt;P&gt;The Zephyr-specific MCUboot application is located at:&lt;/P&gt;&lt;PRE&gt;~/zephyr-training/mcuboot/boot/zephyr/&lt;/PRE&gt;&lt;P&gt;I found the following relevant CMake files:&lt;/P&gt;&lt;PRE&gt;mcuboot/boot/zephyr/CMakeLists.txt
mcuboot/boot/zephyr/sysbuild/CMakeLists.txt
mcuboot/boot/bootutil/CMakeLists.txt
mcuboot/boot/bootutil/zephyr/CMakeLists.txt&lt;/PRE&gt;&lt;H3&gt;MCUboot build attempt&lt;/H3&gt;&lt;P&gt;I first tried to build the MCUboot Zephyr application using:&lt;/P&gt;&lt;PRE&gt;cd ~/zephyr-training

west build \
  -b frdm_mcxn236 \
  -s ~/zephyr-training/mcuboot/boot/zephyr \
  -d ~/zephyr-training/build-mcuboot&lt;/PRE&gt;&lt;P&gt;The intention here is to tell West:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;-b frdm_mcxn236 → build for the FRDM-MCXN236 board&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;-s .../mcuboot/boot/zephyr → use the Zephyr MCUboot application as the source&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;-d .../build-mcuboot → keep the MCUboot build output separate from my normal Zephyr application&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, the build did not reach the actual CMake compilation stage.&lt;/P&gt;&lt;P&gt;I received this error:&lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
  File "/usr/local/bin/west", line 8, in &amp;lt;module&amp;gt;
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 1199, in main
    app.run(argv or sys.argv[1:])
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 278, in run
    self.run_command(argv, early_args)
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 584, in run_command
    self.run_extension(args.command, argv, self.topdir, manifest=self.manifest,
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 739, in run_extension
    self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,
  File "/home/umesh/zephyr-training/zephyr/scripts/west_commands/build.py", line 263, in do_run
    self._sanity_check()
  File "/home/umesh/zephyr-training/zephyr/scripts/west_commands/build.py", line 589, in _sanity_check_source_dir
    srcrel = pathlib.Path(self.source_dir).relative_to(
TypeError: PurePath.relative_to() got an unexpected keyword argument 'walk_up'&lt;/PRE&gt;&lt;P&gt;My Python version is:&lt;/P&gt;&lt;PRE&gt;python3 --version
Python 3.10.12&lt;/PRE&gt;&lt;P&gt;and:&lt;/P&gt;&lt;PRE&gt;west --version
West version: v1.5.0

which python3
/usr/bin/python3

which west
/usr/local/bin/west&lt;/PRE&gt;&lt;P&gt;It appears that the current Zephyr west build code is using:&lt;/P&gt;&lt;PRE&gt;Path.relative_to(..., walk_up=True)&lt;/PRE&gt;&lt;P&gt;which requires a newer Python version.&lt;/P&gt;&lt;P&gt;I also checked:&lt;/P&gt;&lt;PRE&gt;python3.12 --version&lt;/PRE&gt;&lt;P&gt;but Python 3.12 is not currently installed.&lt;/P&gt;&lt;P&gt;I tried installing it directly:&lt;/P&gt;&lt;PRE&gt;sudo apt update
sudo apt install python3.12 python3.12-venv&lt;/PRE&gt;&lt;P&gt;but Ubuntu 22.04 returned:&lt;/P&gt;&lt;PRE&gt;E: Unable to locate package python3.12
E: Couldn't find any package by glob 'python3.12'
E: Unable to locate package python3.12-venv
E: Couldn't find any package by glob 'python3.12-venv'&lt;/PRE&gt;&lt;P&gt;So I am currently trying to resolve the Python/West compatibility issue before continuing with the MCUboot build.&lt;/P&gt;&lt;H3&gt;What I would like to understand&lt;/H3&gt;&lt;P&gt;Once I get MCUboot building, I would like to proceed step by step and understand:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;How to build &lt;STRONG&gt;MCUboot separately&lt;/STRONG&gt; for FRDM-MCXN236.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How the &lt;STRONG&gt;FRDM-MCXN236 Device Tree&lt;/STRONG&gt; is selected and compiled.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Whether Device Tree can be built/inspected separately from the Zephyr application.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How the &lt;STRONG&gt;Zephyr kernel/application&lt;/STRONG&gt; is built separately.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Which of these are actual flashable binaries and which are build-time configuration.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Whether MCUboot can be flashed independently and then the Zephyr application flashed separately.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How the MCUboot image layout and application image/slots are defined.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How to sign the Zephyr application so that MCUboot can boot it.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How to observe and verify the MCUboot → Zephyr boot sequence on the board.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How to customize the Zephyr kernel/configuration using something similar to the Linux kernel menuconfig workflow.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;My intention is not just to get the application running, but to understand the complete boot flow:&lt;/P&gt;&lt;PRE&gt;FRDM-MCXN236
      |
      v
   MCUboot
      |
      v
 Zephyr application
      |
      v
 Zephyr kernel / drivers
      |
      v
 Device Tree + Kconfig configuration&lt;/PRE&gt;&lt;P&gt;I believe doing this manually would help me better understand &lt;STRONG&gt;MCU/SoC startup, bootloader operation, flash layout, Device Tree, Kconfig, linker scripts, and board bring-up&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Any guidance on the correct sequence for doing this on the FRDM-MCXN236 would be appreciated.&lt;BR /&gt;&lt;LI-PRODUCT title="MCUBOOT" id="MCUBOOT"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;LI-PRODUCT title="ZEPHYR-OS-EDGE" id="ZEPHYR-OS-EDGE"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/104386"&gt;@frdmuser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2026 15:04:51 GMT</pubDate>
    <dc:creator>bottleneck</dc:creator>
    <dc:date>2026-09-28T15:04:51Z</dc:date>
    <item>
      <title>FRDM-MCXN236 mcuboot</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/FRDM-MCXN236-mcuboot/m-p/2416812#M1512</link>
      <description>&lt;H3&gt;Building MCUboot, Device Tree and Zephyr separately on FRDM-MCXN236&lt;/H3&gt;&lt;P&gt;I am using the &lt;STRONG&gt;NXP FRDM-MCXN236&lt;/STRONG&gt; board and I am relatively new to Zephyr.&lt;/P&gt;&lt;P&gt;As part of my Zephyr training, I have successfully built and run a basic Zephyr project using &lt;STRONG&gt;Visual Studio Code&lt;/STRONG&gt;. I would now like to understand the boot and board bring-up process at a lower level.&lt;/P&gt;&lt;P&gt;My goal is to try building the following components separately:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;MCUboot&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Device Tree&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Zephyr application/kernel&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I would then like to understand which parts are actually flashed to the board, flash them separately where possible, and observe the boot sequence.&lt;/P&gt;&lt;P&gt;I feel this would be a useful exercise for understanding &lt;STRONG&gt;board bring-up, bootloaders, Device Tree, Kconfig, linker scripts, and the relationship between MCUboot and the Zephyr application&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I would also like to understand whether Zephyr can be customized in a way similar to the Linux kernel menuconfig workflow.&lt;/P&gt;&lt;H3&gt;My environment&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Board: &lt;STRONG&gt;NXP FRDM-MCXN236&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Host OS: &lt;STRONG&gt;Windows 11&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Build environment: &lt;STRONG&gt;Ubuntu 22.04 under WSL2&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Zephyr: &lt;STRONG&gt;4.4.99&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Python: &lt;STRONG&gt;3.10.12&lt;/STRONG&gt; currently installed&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;West: &lt;STRONG&gt;1.5.0&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;CMake: &lt;STRONG&gt;4.4.3&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Ninja: &lt;STRONG&gt;1.10.1&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Zephyr SDK: &lt;STRONG&gt;1.0.1&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;My workspace is:&lt;/P&gt;&lt;PRE&gt;~/zephyr-training/
├── zephyr/
├── mcuboot/
├── my-zephyr-app/
└── workspace/&lt;/PRE&gt;&lt;H3&gt;MCUboot source&lt;/H3&gt;&lt;P&gt;I cloned MCUboot separately under:&lt;/P&gt;&lt;PRE&gt;~/zephyr-training/mcuboot/&lt;/PRE&gt;&lt;P&gt;The Zephyr-specific MCUboot application is located at:&lt;/P&gt;&lt;PRE&gt;~/zephyr-training/mcuboot/boot/zephyr/&lt;/PRE&gt;&lt;P&gt;I found the following relevant CMake files:&lt;/P&gt;&lt;PRE&gt;mcuboot/boot/zephyr/CMakeLists.txt
mcuboot/boot/zephyr/sysbuild/CMakeLists.txt
mcuboot/boot/bootutil/CMakeLists.txt
mcuboot/boot/bootutil/zephyr/CMakeLists.txt&lt;/PRE&gt;&lt;H3&gt;MCUboot build attempt&lt;/H3&gt;&lt;P&gt;I first tried to build the MCUboot Zephyr application using:&lt;/P&gt;&lt;PRE&gt;cd ~/zephyr-training

west build \
  -b frdm_mcxn236 \
  -s ~/zephyr-training/mcuboot/boot/zephyr \
  -d ~/zephyr-training/build-mcuboot&lt;/PRE&gt;&lt;P&gt;The intention here is to tell West:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;-b frdm_mcxn236 → build for the FRDM-MCXN236 board&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;-s .../mcuboot/boot/zephyr → use the Zephyr MCUboot application as the source&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;-d .../build-mcuboot → keep the MCUboot build output separate from my normal Zephyr application&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, the build did not reach the actual CMake compilation stage.&lt;/P&gt;&lt;P&gt;I received this error:&lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
  File "/usr/local/bin/west", line 8, in &amp;lt;module&amp;gt;
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 1199, in main
    app.run(argv or sys.argv[1:])
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 278, in run
    self.run_command(argv, early_args)
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 584, in run_command
    self.run_extension(args.command, argv, self.topdir, manifest=self.manifest,
  File "/usr/local/lib/python3.10/dist-packages/west/app/main.py", line 739, in run_extension
    self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,
  File "/home/umesh/zephyr-training/zephyr/scripts/west_commands/build.py", line 263, in do_run
    self._sanity_check()
  File "/home/umesh/zephyr-training/zephyr/scripts/west_commands/build.py", line 589, in _sanity_check_source_dir
    srcrel = pathlib.Path(self.source_dir).relative_to(
TypeError: PurePath.relative_to() got an unexpected keyword argument 'walk_up'&lt;/PRE&gt;&lt;P&gt;My Python version is:&lt;/P&gt;&lt;PRE&gt;python3 --version
Python 3.10.12&lt;/PRE&gt;&lt;P&gt;and:&lt;/P&gt;&lt;PRE&gt;west --version
West version: v1.5.0

which python3
/usr/bin/python3

which west
/usr/local/bin/west&lt;/PRE&gt;&lt;P&gt;It appears that the current Zephyr west build code is using:&lt;/P&gt;&lt;PRE&gt;Path.relative_to(..., walk_up=True)&lt;/PRE&gt;&lt;P&gt;which requires a newer Python version.&lt;/P&gt;&lt;P&gt;I also checked:&lt;/P&gt;&lt;PRE&gt;python3.12 --version&lt;/PRE&gt;&lt;P&gt;but Python 3.12 is not currently installed.&lt;/P&gt;&lt;P&gt;I tried installing it directly:&lt;/P&gt;&lt;PRE&gt;sudo apt update
sudo apt install python3.12 python3.12-venv&lt;/PRE&gt;&lt;P&gt;but Ubuntu 22.04 returned:&lt;/P&gt;&lt;PRE&gt;E: Unable to locate package python3.12
E: Couldn't find any package by glob 'python3.12'
E: Unable to locate package python3.12-venv
E: Couldn't find any package by glob 'python3.12-venv'&lt;/PRE&gt;&lt;P&gt;So I am currently trying to resolve the Python/West compatibility issue before continuing with the MCUboot build.&lt;/P&gt;&lt;H3&gt;What I would like to understand&lt;/H3&gt;&lt;P&gt;Once I get MCUboot building, I would like to proceed step by step and understand:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;How to build &lt;STRONG&gt;MCUboot separately&lt;/STRONG&gt; for FRDM-MCXN236.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How the &lt;STRONG&gt;FRDM-MCXN236 Device Tree&lt;/STRONG&gt; is selected and compiled.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Whether Device Tree can be built/inspected separately from the Zephyr application.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How the &lt;STRONG&gt;Zephyr kernel/application&lt;/STRONG&gt; is built separately.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Which of these are actual flashable binaries and which are build-time configuration.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Whether MCUboot can be flashed independently and then the Zephyr application flashed separately.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How the MCUboot image layout and application image/slots are defined.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How to sign the Zephyr application so that MCUboot can boot it.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How to observe and verify the MCUboot → Zephyr boot sequence on the board.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;How to customize the Zephyr kernel/configuration using something similar to the Linux kernel menuconfig workflow.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;My intention is not just to get the application running, but to understand the complete boot flow:&lt;/P&gt;&lt;PRE&gt;FRDM-MCXN236
      |
      v
   MCUboot
      |
      v
 Zephyr application
      |
      v
 Zephyr kernel / drivers
      |
      v
 Device Tree + Kconfig configuration&lt;/PRE&gt;&lt;P&gt;I believe doing this manually would help me better understand &lt;STRONG&gt;MCU/SoC startup, bootloader operation, flash layout, Device Tree, Kconfig, linker scripts, and board bring-up&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Any guidance on the correct sequence for doing this on the FRDM-MCXN236 would be appreciated.&lt;BR /&gt;&lt;LI-PRODUCT title="MCUBOOT" id="MCUBOOT"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;LI-PRODUCT title="ZEPHYR-OS-EDGE" id="ZEPHYR-OS-EDGE"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/104386"&gt;@frdmuser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2026 15:04:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/FRDM-MCXN236-mcuboot/m-p/2416812#M1512</guid>
      <dc:creator>bottleneck</dc:creator>
      <dc:date>2026-09-28T15:04:51Z</dc:date>
    </item>
  </channel>
</rss>

