<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>EZ-MCXN: CMake script for NXP MCXN326 controller</title><link>/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller</link><description>In this post, I propose a CMake script for NXP MCXN326 controller. Not dependent on MCUXpresso&amp;#39;s IDE or VS Code extension. Also independent of dev board definitions and SDK example code files.
Prerequisites: What do you need:

working CMake...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: EZ-MCXN: CMake script for NXP MCXN326 controller</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller</link><pubDate>Sun, 01 Nov 2026 19:36:58 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f6ce0645-9249-415d-8e66-6c3290f3f9b3</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Great post Jan.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=30373&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: EZ-MCXN: CMake script for NXP MCXN326 controller</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller</link><pubDate>Sun, 01 Nov 2026 09:23:40 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f6ce0645-9249-415d-8e66-6c3290f3f9b3</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The MCUXpresso toolchain has a program called mcux-fix-elf, that touches up GCC created .elf files.&amp;nbsp;&lt;br /&gt;For the MCXN236 this isn&amp;#39;t neccessary. &lt;br /&gt;For multicore and security enabled development, it is required. I added it for completion.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t set&amp;nbsp;MCUX_FIXELF_EXE, and don&amp;#39;t have the executable on your path, this will be skipped.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:ebe1882f-6f6a-497f-9bf2-9ede8e9af67a:type=json&amp;text=%23%20MCUXpresso%20FIXELF%20section%0D%0A%23%20Not%20really%20needed%20for%20a%20single%20core%20MCXN236%2C%20but%20included%20for%20completeness%0D%0Aset%28MCUX_FIXELF_EXE%20%24ENV%7BMCUX_FIXELF_EXE%7D%29%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20check%20if%20MCUXpresso%20FIXELF%20path%20is%20set%20%20%20%20%20%20%20%20%20%0D%0Amessage%28STATUS%20%22mcux-fixelf%20set%20as%3A%20%24%7BMCUX_FIXELF_EXE%7D%22%29%0D%0Aif%28NOT%20MCUX_FIXELF_EXE%29%0D%0A%20%20%20%20find_program%28MCUX_FIXELF_EXE%20mcux-fixelf%29%0D%0A%20%20%20%20if%28NOT%20MCUX_FIXELF_EXE%29%0D%0A%20%20%20%20%20%20%20%20message%28STATUS%20%22Can%27t%20locate%20mcux-fixelf.exe%20in%20environment%20or%20on%20path.%20Skipping%20post-build%20fixelf%20step.%22%29%0D%0A%20%20%20%20endif%28%29%0D%0Aelse%28%29%0D%0A%20%20%20%20message%28STATUS%20%22using%20mcux-fixelf%3A%20%24%7BMCUX_FIXELF_EXE%7D%22%29%0D%0Aendif%28%29%0D%0Aif%28MCUX_FIXELF_EXE%29%20%20%20%20%20%20%0D%0Amessage%28STATUS%20%22start%20mcux-fixelf%22%29%0D%0Aadd_custom_command%28TARGET%20%24%7BCMAKE_PROJECT_NAME%7D%20POST_BUILD%0D%0A%20%20%20%20COMMAND%20%24%7BMCUX_FIXELF_EXE%7D%20%0D%0A%20%20%20%20%24%3CTARGET_FILE%3A%24%7BCMAKE_PROJECT_NAME%7D%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20.elf%20file%20to%20fix%0D%0A%20%20%20%20COMMENT%20%22Executing%20mcux-fixelf%20post-build%20steps%20voor%20NXP%20MCU...%22%0D%0A%20%20%20%20VERBATIM%0D%0A%29%0D%0Aendif%28%29]&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=30373&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: EZ-MCXN: CMake script for NXP MCXN326 controller</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller</link><pubDate>Sat, 31 Oct 2026 23:59:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f6ce0645-9249-415d-8e66-6c3290f3f9b3</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Addition to automatically generate source files from the .mex config file:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:c2b6a70d-02ec-4d1a-a114-19ab1e0581ed:type=batchfile&amp;text=%23%20MCUXpresso%20Config%20section%0Aset%28CONFIG_TOOL_PATH%20%24ENV%7BCONFIG_TOOL_PATH%7D%29%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20check%20if%20MCUXpresso%20Config%20path%20is%20set%20%20%20%20%20%20%20%20%20%0Aif%28CONFIG_TOOL_PATH%29%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20path%20set%3A%20generate%20sources%0A%20%20%20%20message%28STATUS%20%22CONFIG_TOOL_PATH%3A%20%24%7BCONFIG_TOOL_PATH%7D%22%29%0A%20%20%20%20set%28MEX_FILE%20%22%24%7BCMAKE_CURRENT_SOURCE_DIR%7D%2FEZ_MCXN.mex%22%29%0A%20%20%20%20set%28OUTPUT_DIR%20%22%24%7BCMAKE_CURRENT_SOURCE_DIR%7D%22%29%0A%0A%20%20%20%20message%28STATUS%20%22MCUXpresso%20Config%20Tools%3A%20source-export%20%28Pins%2C%20Clocks%2C%20Peripherals%29...%22%29%0A%20%20%20%20execute_process%28%0A%20%20%20%20%20%20%20%20COMMAND%20%22%24%7BCONFIG_TOOL_PATH%7D%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-noSplash%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-consoleLog%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-HeadlessTool%22%20%22Pins%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-Load%22%20%22%24%7BMEX_FILE%7D%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-ExportSrc%22%20%22%24%7BOUTPUT_DIR%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20RESULT_VARIABLE%20CONFIG_TOOL_RESULT%0A%20%20%20%20%20%20%20%20ERROR_VARIABLE%20CONFIG_TOOL_ERROR%0A%20%20%20%20%29%0A%20%20%20%20execute_process%28%0A%20%20%20%20%20%20%20%20COMMAND%20%22%24%7BCONFIG_TOOL_PATH%7D%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-noSplash%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-consoleLog%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-HeadlessTool%22%20%22Clocks%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-Load%22%20%22%24%7BMEX_FILE%7D%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-ExportSrc%22%20%22%24%7BOUTPUT_DIR%7D%22%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20RESULT_VARIABLE%20CONFIG_TOOL_RESULT%0A%20%20%20%20%20%20%20%20ERROR_VARIABLE%20CONFIG_TOOL_ERROR%0A%20%20%20%20%29%0A%20%20%20%20execute_process%28%0A%20%20%20%20%20%20%20%20COMMAND%20%22%24%7BCONFIG_TOOL_PATH%7D%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-noSplash%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-consoleLog%22%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-HeadlessTool%22%20%22Peripherals%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-Load%22%20%22%24%7BMEX_FILE%7D%22%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22-ExportSrc%22%20%22%24%7BOUTPUT_DIR%7D%22%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20RESULT_VARIABLE%20CONFIG_TOOL_RESULT%0A%20%20%20%20%20%20%20%20ERROR_VARIABLE%20CONFIG_TOOL_ERROR%0A%20%20%20%20%29%0A%20%20%20%20%23%20command%20line%20places%20clock%20files%20in%20cm33_core0%20dir.%20Move%20files%2C%20then%20remove%20folder%0A%20%20%20%20if%28EXISTS%20%22%24%7BOUTPUT_DIR%7D%2Fcm33_core0%22%29%0A%20%20%20%20%20%20%20%20message%28STATUS%20%22Move%20clock%20sources%20and%20delete%20cm33_core0%20subdir...%22%29%0A%20%20%20%20%20%20%20%20file%28RENAME%20%22%24%7BOUTPUT_DIR%7D%2Fcm33_core0%2Fboard%2Fclock_config.c%22%20%22%24%7BOUTPUT_DIR%7D%2Fboard%2Fclock_config.c%22%29%0A%20%20%20%20%20%20%20%20file%28RENAME%20%22%24%7BOUTPUT_DIR%7D%2Fcm33_core0%2Fboard%2Fclock_config.h%22%20%22%24%7BOUTPUT_DIR%7D%2Fboard%2Fclock_config.h%22%29%0A%20%20%20%20%20%20%20%20file%28REMOVE_RECURSE%20%22%24%7BOUTPUT_DIR%7D%2Fcm33_core0%2Fboard%22%29%0A%20%20%20%20%20%20%20%20file%28REMOVE_RECURSE%20%22%24%7BOUTPUT_DIR%7D%2Fcm33_core0%22%29%0A%20%20%20%20endif%28%29%0Aelse%28%29%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20path%20not%20set%3A%20developer%20should%20generate%20sources%20with%20GUI%0A%20%20%20%20message%28STATUS%20%22CONFIG_TOOL_PATH%20not%20set.%20Skipping%20source%20generation.%22%29%0Aendif%28%29]&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t define an environment variable&amp;nbsp;CONFIG_TOOL_PATH, nothing happens.&lt;br /&gt;You should generate the files before starting the build, in that case.&lt;/p&gt;
&lt;p&gt;If it is set,&amp;nbsp;CMake generates the files during the config phase.&lt;br /&gt;(every time. Maybe I should create a checkpoint to see if .mex file is newer than any of the generated files?)&lt;br /&gt;During build, this part of the make script isn&amp;#39;t executed, so still fast.&lt;/p&gt;
&lt;p&gt;On command prompt, you can set it like this:&lt;/p&gt;
&lt;pre&gt;set CONFIG_TOOL_PATH=C:/NXP/MCUX_CFG_26.09/bin/tools.exe&lt;/pre&gt;
&lt;img src="https://community.element14.com/aggbug?PostID=30373&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: EZ-MCXN: CMake script for NXP MCXN326 controller</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller</link><pubDate>Sat, 31 Oct 2026 22:39:56 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f6ce0645-9249-415d-8e66-6c3290f3f9b3</guid><dc:creator>shabaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;Great work!! So glad this functions, since it saves having to install manufacturer IDEs, plus, importantly, it is faster to build, and use.&lt;/p&gt;
&lt;p&gt;Turnaround time can&amp;nbsp;now be as low as&amp;nbsp;just single-digit seconds now, for all of building/flashing/testing combined : )&amp;nbsp;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=30373&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>