<?xml version="1.0" encoding="UTF-8" ?>
<?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>Embedded and Microcontrollers</title><link>https://community.element14.com/technologies/embedded/</link><description>Embedded systems programming, design and products; also microcontrollers, programmable logic, memory, DSP and controllers. </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=7e1270b6-cbf3-4abb-90eb-a92e60f88104</link><pubDate>Sun, 01 Nov 2026 23:18:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:7e1270b6-cbf3-4abb-90eb-a92e60f88104</guid><dc:creator>shabaz</dc:creator><description>I&amp;#39;ve been testing this today. Works pretty well, even on Android and iPad (I don&amp;#39;t have Mac or iPhone to test with). However, a few quirks with the mobile platforms: (1) With Android, I cannot navigate to the web page at http://192.168.7.2 unless I switch off WiFi and mobile data. Very irritating. The workaround is to use an app, then the app can explicitly select a particular network. But it is a major pity that a normal browser page can&amp;#39;t work without creating an app. (2) With iPad, originally it didn&amp;#39;t work at all, but then on a hunch I swapped around the interface numbering (the microcontroller firmware has both USB COM port and USB Ethernet) and it turns out that if USB Ethernet is first, then iPad Safari works with it. However I have not tested to see if USB COM port works with iPad, since I couldn&amp;#39;t find an an app in the Play Store (and I don&amp;#39;t have a mac to build a custom app). And as tested earlier, it works fine with Windows 11 at least. The desire for this is that it is quite a fast interface, plus, the microcontroller can store the app (as a web page), so a user could plug into a PC or a mobile device (iPad and possibly iPhone, but not Android unless I can figure out that routing issue) and not have to download any app, just browse to the in-built web page.</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller?CommentId=ac07101f-aea0-4893-85cb-3358616d19e9</link><pubDate>Sun, 01 Nov 2026 19:36:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:ac07101f-aea0-4893-85cb-3358616d19e9</guid><dc:creator>DAB</dc:creator><description>Great post Jan.</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=367792f4-6fec-4f46-9628-7f153cd6edf1</link><pubDate>Sun, 01 Nov 2026 16:35:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:367792f4-6fec-4f46-9628-7f153cd6edf1</guid><dc:creator>shabaz</dc:creator><description>USB Ethernet seems to function enough to be usable. Bare minimal web server: Also a TCP/IP test: PS C:\dev\projects\mcx_projects\simple_usb_eth_project&amp;gt; ping -4 192.168.7.2 Pinging 192.168.7.2 with 32 bytes of data: Reply from 192.168.7.2: bytes=32 time python .\test_tcp_echo.py ================================================== MCXN236 USB Ethernet Demo Test Target: 192.168.7.2 ================================================== [1/3] Testing Bidirectional TCP Echo on 192.168.7.2:5000... PASS: Short message echoed (40 bytes) Sending 65,536 bytes of bulk binary data... PASS: Bulk bidirectional echo verified in 0.04s (~3274.5 KB/s total) [2/3] Testing Interactive Commands on 192.168.7.2:5000... Sent: stats -&amp;gt; Received: Uptime: 1111 s | RX: 131180 B | TX: 131220 B Sent: uptime -&amp;gt; Received: Uptime: 1111 seconds Sent: ping -&amp;gt; Received: pong PASS: Command responses verified [3/3] Testing HTTP Web Server on http://192.168.7.2:80/ ... PASS: HTTP 200 OK received with HTML status page ================================================== ALL TESTS PASSED SUCCESSFULLY! ================================================== PS C:\dev\projects\mcx_projects\simple_usb_eth_project&amp;gt; I&amp;#39;ve placed the code here: ez_mcxn/mcx_projects/simple_usb_eth_project at main &amp;#183; shabaz123/ez_mcxn and the README there explains how to use the various functions (the code is in a sub-folder, to make it easy to drop into other projects). The code implements both USB Ethernet and a USB COM port. Currently the COM port has a simple menu: To build/flash/run the code: cd simple_usb_eth_project git clone --depth 1 --branch STABLE-2_2_1_RELEASE https://github.com/lwip-tcpip/lwip.git lwip .\build_project.ps1 -clean .\build_project.ps1 -flash ping 192.168.7.2 I love how quick it is to currently to build and run.. four seconds to compile, and three to flash it to the microcontroller!</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=407f2b3d-d397-4999-9fe7-0662a13d3c70</link><pubDate>Sun, 01 Nov 2026 12:34:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:407f2b3d-d397-4999-9fe7-0662a13d3c70</guid><dc:creator>Jan Cumps</dc:creator><description>&amp;gt; NXP had placed that at C:\DEV\projects\mcuxpresso-sdk\mcuxsdk\ examples \_boards\frdmmcxn236\usb_examples\usb_device_composite_cdc_vcom_cdc_vcom_lite\bm What I try to do is: if the file is part of the SDK proper (not for example or one of their dev boards), I reference it If it is an example or board file, I copy over (the part I need) to my project. Usually with cleanup / adaptions.</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller?CommentId=251e713e-b841-40b3-9459-2f59d2c18d4f</link><pubDate>Sun, 01 Nov 2026 10:47:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:251e713e-b841-40b3-9459-2f59d2c18d4f</guid><dc:creator>Jan Cumps</dc:creator><description>I made this more performant: it only gets executed if needed if you need the Pins sources, and they don&amp;#39;t exist or are older than your .mex file , they get generated. Same for Clocks, and Peripherals. # MCUXpresso Config section set(CONFIG_TOOL_PATH $ENV{CONFIG_TOOL_PATH}) # check if MCUXpresso Config path is set if(CONFIG_TOOL_PATH) # path set: generate sources message(STATUS &amp;quot;CONFIG_TOOL_PATH: ${CONFIG_TOOL_PATH}&amp;quot;) set(MEX_FILE &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/EZ_MCXN.mex&amp;quot;) set(OUTPUT_DIR &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}&amp;quot;) message(STATUS &amp;quot;MCUXpresso Config Tools: source-export (Pins, Clocks, Peripherals)...&amp;quot;) # Check if needs to run: Pins set(PINS_DEST_HEADER &amp;quot;${OUTPUT_DIR}/board/pin_mux.h&amp;quot;) set(PINS_DEST_SOURCE &amp;quot;${OUTPUT_DIR}/board/pin_mux.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${PINS_DEST_HEADER}&amp;quot; &amp;quot;${PINS_DEST_SOURCE}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Pins&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Pins files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) # Check if needs to run: Clocks set(CLOCKS_DEST_HEADER &amp;quot;${OUTPUT_DIR}/board/clock_config.h&amp;quot;) set(CLOCKS_DEST_SOURCE &amp;quot;${OUTPUT_DIR}/board/clock_config.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${CLOCKS_DEST_HEADER}&amp;quot; &amp;quot;${CLOCKS_DEST_SOURCE}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Clocks&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR COMMAND ${CMAKE_COMMAND} -E rename &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.h&amp;quot; &amp;quot;${CLOCKS_DEST_HEADER}&amp;quot; COMMAND ${CMAKE_COMMAND} -E rename &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.c&amp;quot; &amp;quot;${CLOCKS_DEST_SOURCE}&amp;quot; COMMAND ${CMAKE_COMMAND} -E remove_directory &amp;quot;${OUTPUT_DIR}/cm33_core0/board&amp;quot; COMMAND ${CMAKE_COMMAND} -E remove_directory &amp;quot;${OUTPUT_DIR}/cm33_core0&amp;quot; DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Clocks files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) # Check if needs to run: Peripherals set(PERIPHERALS_DEST_FILE_1 &amp;quot;${OUTPUT_DIR}/board/peripherals.h&amp;quot;) set(PERIPHERALS_DEST_FILE_2 &amp;quot;${OUTPUT_DIR}/board/peripherals.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${PERIPHERALS_DEST_FILE_1}&amp;quot; &amp;quot;${PERIPHERALS_DEST_FILE_2}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Peripherals&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Peripherals files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) else() # path not set: developer should generate sources with GUI message(STATUS &amp;quot;CONFIG_TOOL_PATH not set. Skipping source generation.&amp;quot;) endif() This is fully controlled by CMake dependency mechanism: Because my project doesn&amp;#39;t use Peripherals (the board/peripherals.c isn&amp;#39;t added as source to target_sources), CMake will not run the custom command for Peripherals. That&amp;#39;s a time saver. As soon as I decide to use peripherals, and add board/peripherals.c to the target_sources, CMake will generate the .c and .h file in the next build. Another time saver: these jobs - if needed - will run in parallel.</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller?CommentId=318ce9ec-caf6-498f-990b-18d6fc81a06d</link><pubDate>Sun, 01 Nov 2026 09:23:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:318ce9ec-caf6-498f-990b-18d6fc81a06d</guid><dc:creator>Jan Cumps</dc:creator><description>The MCUXpresso toolchain has a program called mcux-fix-elf, that touches up GCC created .elf files. For the MCXN236 this isn&amp;#39;t neccessary. For multicore and security enabled development, it is required. I added it for completion. If you don&amp;#39;t set MCUX_FIXELF_EXE, and don&amp;#39;t have the executable on your path, this will be skipped. # MCUXpresso FIXELF section # Not really needed for a single core MCXN236, but included for completeness set(MCUX_FIXELF_EXE $ENV{MCUX_FIXELF_EXE}) # check if MCUXpresso FIXELF path is set message(STATUS &amp;quot;mcux-fixelf set as: ${MCUX_FIXELF_EXE}&amp;quot;) if(NOT MCUX_FIXELF_EXE) find_program(MCUX_FIXELF_EXE mcux-fixelf) if(NOT MCUX_FIXELF_EXE) message(STATUS &amp;quot;Can&amp;#39;t locate mcux-fixelf.exe in environment or on path. Skipping post-build fixelf step.&amp;quot;) endif() else() message(STATUS &amp;quot;using mcux-fixelf: ${MCUX_FIXELF_EXE}&amp;quot;) endif() if(MCUX_FIXELF_EXE) message(STATUS &amp;quot;start mcux-fixelf&amp;quot;) add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${MCUX_FIXELF_EXE} $ # .elf file to fix COMMENT &amp;quot;Executing mcux-fixelf post-build steps voor NXP MCU...&amp;quot; VERBATIM ) endif()</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=18ee0d76-8c54-498f-b23e-ea72998fdc99</link><pubDate>Sun, 01 Nov 2026 04:04:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:18ee0d76-8c54-498f-b23e-ea72998fdc99</guid><dc:creator>shabaz</dc:creator><description>More progress... microcontroller to PC direction, and still needs a ton of testing.. plus I still need to work on the other direction too. I&amp;#39;ll put it on GitHub when it is a bit more fleshed out.</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=c2823805-bcb2-40a1-9f9f-4ee007758c13</link><pubDate>Sun, 01 Nov 2026 03:14:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c2823805-bcb2-40a1-9f9f-4ee007758c13</guid><dc:creator>shabaz</dc:creator><description>On a roll, so will continue down this road a bit... Personally, I would much rather have a network interface instead of dual COM port, so I&amp;#39;m getting AI assistance to swap out one of the COM ports for USB Ethernet (I&amp;#39;ll keep one COM port for printf debugging etc, but we have awesome 480Mbps USB so the microcontroller should work quite nicely for Ethernet!). And here is first ping : ) There&amp;#39;s no network stack currently (that&amp;#39;s the next step), so literally ping is all I can do with it so far, but it&amp;#39;s great progress. Only thing is, there&amp;#39;s no RTOS with this current code, so I may need to redo a lot of effort later if it turns out more convenient to have that (and I guess it will).</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller?CommentId=042d772b-a538-4433-b0ac-f2f1c220927c</link><pubDate>Sat, 31 Oct 2026 23:59:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:042d772b-a538-4433-b0ac-f2f1c220927c</guid><dc:creator>Jan Cumps</dc:creator><description>Addition to automatically generate source files from the .mex config file: # MCUXpresso Config section set(CONFIG_TOOL_PATH $ENV{CONFIG_TOOL_PATH}) # check if MCUXpresso Config path is set if(CONFIG_TOOL_PATH) # path set: generate sources message(STATUS &amp;quot;CONFIG_TOOL_PATH: ${CONFIG_TOOL_PATH}&amp;quot;) set(MEX_FILE &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/EZ_MCXN.mex&amp;quot;) set(OUTPUT_DIR &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}&amp;quot;) message(STATUS &amp;quot;MCUXpresso Config Tools: source-export (Pins, Clocks, Peripherals)...&amp;quot;) execute_process( COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Pins&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR ) execute_process( COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Clocks&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR ) execute_process( COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Peripherals&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR ) # command line places clock files in cm33_core0 dir. Move files, then remove folder if(EXISTS &amp;quot;${OUTPUT_DIR}/cm33_core0&amp;quot;) message(STATUS &amp;quot;Move clock sources and delete cm33_core0 subdir...&amp;quot;) file(RENAME &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.c&amp;quot; &amp;quot;${OUTPUT_DIR}/board/clock_config.c&amp;quot;) file(RENAME &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.h&amp;quot; &amp;quot;${OUTPUT_DIR}/board/clock_config.h&amp;quot;) file(REMOVE_RECURSE &amp;quot;${OUTPUT_DIR}/cm33_core0/board&amp;quot;) file(REMOVE_RECURSE &amp;quot;${OUTPUT_DIR}/cm33_core0&amp;quot;) endif() else() # path not set: developer should generate sources with GUI message(STATUS &amp;quot;CONFIG_TOOL_PATH not set. Skipping source generation.&amp;quot;) endif() If you don&amp;#39;t define an environment variable CONFIG_TOOL_PATH, nothing happens. You should generate the files before starting the build, in that case. If it is set, CMake generates the files during the config phase. (every time. Maybe I should create a checkpoint to see if .mex file is newer than any of the generated files?) During build, this part of the make script isn&amp;#39;t executed, so still fast. On command prompt, you can set it like this: set CONFIG_TOOL_PATH=C:/NXP/MCUX_CFG_26.09/bin/tools.exe</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-cmake-script-for-nxp-mcxn326-controller?CommentId=aacd0864-60b9-470d-a15f-54f7ce540af5</link><pubDate>Sat, 31 Oct 2026 22:39:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:aacd0864-60b9-470d-a15f-54f7ce540af5</guid><dc:creator>shabaz</dc:creator><description>Hi Jan, Great work!! So glad this functions, since it saves having to install manufacturer IDEs, plus, importantly, it is faster to build, and use. Turnaround time can now be as low as just single-digit seconds now, for all of building/flashing/testing combined : )</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=91703d29-a116-4aac-b601-c74485347349</link><pubDate>Sat, 31 Oct 2026 22:28:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:91703d29-a116-4aac-b601-c74485347349</guid><dc:creator>shabaz</dc:creator><description>OK improved it a bit.. now it is here: ez_mcxn/mcx_projects/simple_usb_project at main &amp;#183; shabaz123/ez_mcxn Now it is a separate folder that can be dropped into projects, and will provide the two COM ports. One COM port is accessed using: printf and USB_ConsoleGetChar() , and the other COM port: USB_Port1Write() and USB_Port1GetChar() .</description></item><item><title>Blog Post: 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 21:43:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f6ce0645-9249-415d-8e66-6c3290f3f9b3</guid><dc:creator>Jan Cumps</dc:creator><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 and ARM GCC toolchains a downloaded and unzipped SDK (check if this link works - NXP account needed) MCUXPresso Config tools ( link , NXP account needed) a .mex configuration file for your project. If you use shabaz&amp;#39; EZ-MCXN dev board , get it from his GitHub repo . a main file (example below) a CMake config file, the main focus of this post. CMake file I&amp;#39;ll go start to end over the file. Check the inline comments Initialisation This step sets standards, and some definitions that are needed early on. cmake_minimum_required(VERSION 3.29) set(CMAKE_VERBOSE_MAKEFILE OF) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 26) set(CMAKE_CXX_STANDARD_REQUIRED ON) # SDK_ROOT set externally set(SDK_ROOT $ENV{SDK_ROOT}) # set as a CMake Environment variable. Points to root of unzipped SDK message(STATUS &amp;quot;SDK_ROOT: ${SDK_ROOT}&amp;quot;) set(CMAKE_SYSTEM_NAME Generic) # no OS set(CMAKE_EXE_LINKER_FLAGS &amp;quot;${CMAKE_EXE_LINKER_FLAGS} --specs=nosys.specs&amp;quot;) # prevents CMake throws toolchain error when using embedded GCC add_compile_definitions( MCXN236 # controller CPU_MCXN236VKL # package ) Fetch debug configuration, in case you want to use a hardware debugger later. Only runs if needed. Either at first run, or if the cache is cleaned. First run needs an internet connection. If you don&amp;#39;t plan to use a hardware debugger, you can safely comment this section. include(FetchContent) set(FETCHCONTENT_QUIET FALSE CACHE BOOL &amp;quot;&amp;quot; FORCE) # show download, because it takes a while set(FETCHCONTENT_UPDATES_DISCONNECTED ON CACHE BOOL &amp;quot;&amp;quot; FORCE) # skip if we have it in cache. Also allows for offline builds FetchContent_Declare(svd # get MCXN236 svd definition, so registers are available during debug GIT_REPOSITORY &amp;quot;https://github.com/nxp-mcuxpresso/mcux-soc-svd.git&amp;quot; GIT_TAG origin/main GIT_PROGRESS TRUE # show download, because it takes a while # prevent makefile execution (if any) SOURCE_SUBDIR = ) FetchContent_MakeAvailable(svd) file(COPY &amp;quot;${svd_SOURCE_DIR}/MCXN236/MCXN236.xml&amp;quot; # copy svd from download to build dir, where launch.json can find it DESTINATION &amp;quot;${CMAKE_BINARY_DIR}&amp;quot; ) Generate CMUXpresso Config source files This is called, during Build, only when needed. Either if the source files don&amp;#39;t exist yet (first build, files removed), or if they are older than the .mex file. It checks that for Pins, Clocks and Peripherals. The required jobs will run in parallel. Because my project doesn&amp;#39;t use the peripherals (the source files aren&amp;#39;t added to the build target), CMake knows that it can skip the Peripherals .h and .c file generation. # MCUXpresso Config section set(CONFIG_TOOL_PATH $ENV{CONFIG_TOOL_PATH}) # check if MCUXpresso Config path is set if(CONFIG_TOOL_PATH) # path set: generate sources message(STATUS &amp;quot;CONFIG_TOOL_PATH: ${CONFIG_TOOL_PATH}&amp;quot;) set(MEX_FILE &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/EZ_MCXN.mex&amp;quot;) set(OUTPUT_DIR &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}&amp;quot;) message(STATUS &amp;quot;MCUXpresso Config Tools: source-export (Pins, Clocks, Peripherals)...&amp;quot;) # Check if needs to run: Pins set(PINS_DEST_HEADER &amp;quot;${OUTPUT_DIR}/board/pin_mux.h&amp;quot;) set(PINS_DEST_SOURCE &amp;quot;${OUTPUT_DIR}/board/pin_mux.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${PINS_DEST_HEADER}&amp;quot; &amp;quot;${PINS_DEST_SOURCE}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Pins&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Pins files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) # Check if needs to run: Clocks set(CLOCKS_DEST_HEADER &amp;quot;${OUTPUT_DIR}/board/clock_config.h&amp;quot;) set(CLOCKS_DEST_SOURCE &amp;quot;${OUTPUT_DIR}/board/clock_config.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${CLOCKS_DEST_HEADER}&amp;quot; &amp;quot;${CLOCKS_DEST_SOURCE}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Clocks&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR COMMAND ${CMAKE_COMMAND} -E rename &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.h&amp;quot; &amp;quot;${CLOCKS_DEST_HEADER}&amp;quot; COMMAND ${CMAKE_COMMAND} -E rename &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.c&amp;quot; &amp;quot;${CLOCKS_DEST_SOURCE}&amp;quot; COMMAND ${CMAKE_COMMAND} -E remove_directory &amp;quot;${OUTPUT_DIR}/cm33_core0/board&amp;quot; COMMAND ${CMAKE_COMMAND} -E remove_directory &amp;quot;${OUTPUT_DIR}/cm33_core0&amp;quot; DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Clocks files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) # Check if needs to run: Peripherals set(PERIPHERALS_DEST_FILE_1 &amp;quot;${OUTPUT_DIR}/board/peripherals.h&amp;quot;) set(PERIPHERALS_DEST_FILE_2 &amp;quot;${OUTPUT_DIR}/board/peripherals.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${PERIPHERALS_DEST_FILE_1}&amp;quot; &amp;quot;${PERIPHERALS_DEST_FILE_2}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Peripherals&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Peripherals files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) else() # path not set: developer should generate sources with GUI message(STATUS &amp;quot;CONFIG_TOOL_PATH not set. Skipping source generation.&amp;quot;) endif() Project declaration and includes project(ez_mcxn_minimal LANGUAGES C CXX ASM) include_directories( ${SDK_ROOT}/mcxn236/mcuxsdk/arch/arm/CMSIS/Core/Include ${SDK_ROOT}/mcxn236/mcuxsdk/arch/arm/CMSIS/Core/Include/m-profile ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236 ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/periph1 # MCXN326 files are in periph1 (see config file in parent dir) ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/common ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/mcx_spc # system power controller ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/port ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/gpio # project includes ${CMAKE_SOURCE_DIR}/board ) Firmware add_executable( ${CMAKE_PROJECT_NAME}) set(MCXN_FLAGS # flags common to compiler and linker -mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 --specs=nano.specs ) target_sources(${CMAKE_PROJECT_NAME} # default source files PRIVATE ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/startup_MCXN236.S ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/system_MCXN236.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_clock.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_reset.c ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_syscall_stub.c # implements stubs for functions not implemented in nano ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_sbrk.c # alternative for gcc implementation ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_memcpy.S # alternative for gcc implementation ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_memset.S # alternative for gcc implementation ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/common/fsl_common.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/mcx_spc/fsl_spc.c # system power controller ) target_sources(${CMAKE_PROJECT_NAME} # project source files (c, asm, cpp), except cpp modules PRIVATE ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/gpio/fsl_gpio.c # project sources # MCUXpresso Cfg generated: ${CLOCKS_DEST_SOURCE} ${PINS_DEST_SOURCE} # application sources ${CMAKE_SOURCE_DIR}/main.c ) target_sources(${CMAKE_PROJECT_NAME} # cpp modules PRIVATE FILE_SET cxx_modules TYPE CXX_MODULES FILES ) target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE $ :-fno-use-cxa-atexit&amp;gt; # cpp flag $ :-fno-exceptions&amp;gt; # cpp flag $ :-fno-rtti&amp;gt; # cpp flag $ :-fcommon&amp;gt; # cpp flag $ :-fmodules-ts&amp;gt; # cpp flag: support modules ${MCXN_FLAGS} # flags shared with linker -Wall -ffunction-sections -fdata-sections ) target_link_options(${CMAKE_PROJECT_NAME} PRIVATE ${MCXN_FLAGS} # flags shared with compiler --specs=nano.specs # small c library -Wl,--gc-sections -Wl,--no-warn-rwx-segments -T ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/MCXN236_flash.ld # linker command file ) Optional mcux-fix-elf # MCUXpresso FIXELF section # Not really needed for a single core MCXN236, but included for completeness set(MCUX_FIXELF_EXE $ENV{MCUX_FIXELF_EXE}) # check if MCUXpresso FIXELF path is set message(STATUS &amp;quot;mcux-fixelf set as: ${MCUX_FIXELF_EXE}&amp;quot;) if(NOT MCUX_FIXELF_EXE) find_program(MCUX_FIXELF_EXE mcux-fixelf) if(NOT MCUX_FIXELF_EXE) message(STATUS &amp;quot;Can&amp;#39;t locate mcux-fixelf.exe in environment or on path. Skipping post-build fixelf step.&amp;quot;) endif() else() message(STATUS &amp;quot;using mcux-fixelf: ${MCUX_FIXELF_EXE}&amp;quot;) endif() if(MCUX_FIXELF_EXE) message(STATUS &amp;quot;start mcux-fixelf&amp;quot;) add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${MCUX_FIXELF_EXE} $ # .elf file to fix COMMENT &amp;quot;Executing mcux-fixelf post-build steps voor NXP MCU...&amp;quot; VERBATIM ) endif() Flashable binary add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD # create extra output: flashable binary COMMAND ${CMAKE_OBJCOPY} -O binary $ ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin COMMENT &amp;quot;create bin executable: ${CMAKE_PROJECT_NAME}.bin&amp;quot; ) Full CMakeLists.txt source: cmake_minimum_required(VERSION 3.29) set(CMAKE_VERBOSE_MAKEFILE OF) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 26) set(CMAKE_CXX_STANDARD_REQUIRED ON) # SDK_ROOT set externally set(SDK_ROOT $ENV{SDK_ROOT}) # set as a CMake Environment variable. Points to root of unzipped SDK message(STATUS &amp;quot;SDK_ROOT: ${SDK_ROOT}&amp;quot;) set(CMAKE_SYSTEM_NAME Generic) # no OS set(CMAKE_EXE_LINKER_FLAGS &amp;quot;${CMAKE_EXE_LINKER_FLAGS} --specs=nosys.specs&amp;quot;) # prevents CMake throws toolchain error when using embedded GCC add_compile_definitions( MCXN236 # controller CPU_MCXN236VKL # package ) include(FetchContent) set(FETCHCONTENT_QUIET FALSE CACHE BOOL &amp;quot;&amp;quot; FORCE) # show download, because it takes a while set(FETCHCONTENT_UPDATES_DISCONNECTED ON CACHE BOOL &amp;quot;&amp;quot; FORCE) # skip if we have it in cache. Also allows for offline builds FetchContent_Declare(svd # get MCXN236 svd definition, so registers are available during debug GIT_REPOSITORY &amp;quot;https://github.com/nxp-mcuxpresso/mcux-soc-svd.git&amp;quot; GIT_TAG origin/main GIT_PROGRESS TRUE # show download, because it takes a while # prevent makefile execution (if any) SOURCE_SUBDIR = ) FetchContent_MakeAvailable(svd) file(COPY &amp;quot;${svd_SOURCE_DIR}/MCXN236/MCXN236.xml&amp;quot; # copy svd from download to build dir, where launch.json can find it DESTINATION &amp;quot;${CMAKE_BINARY_DIR}&amp;quot; ) # MCUXpresso Config section set(CONFIG_TOOL_PATH $ENV{CONFIG_TOOL_PATH}) # check if MCUXpresso Config path is set if(CONFIG_TOOL_PATH) # path set: generate sources message(STATUS &amp;quot;CONFIG_TOOL_PATH: ${CONFIG_TOOL_PATH}&amp;quot;) set(MEX_FILE &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/EZ_MCXN.mex&amp;quot;) set(OUTPUT_DIR &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}&amp;quot;) # Check if needs to run: Pins set(PINS_DEST_HEADER &amp;quot;${OUTPUT_DIR}/board/pin_mux.h&amp;quot;) set(PINS_DEST_SOURCE &amp;quot;${OUTPUT_DIR}/board/pin_mux.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${PINS_DEST_HEADER}&amp;quot; &amp;quot;${PINS_DEST_SOURCE}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Pins&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Pins files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) # Check if needs to run: Clocks set(CLOCKS_DEST_HEADER &amp;quot;${OUTPUT_DIR}/board/clock_config.h&amp;quot;) set(CLOCKS_DEST_SOURCE &amp;quot;${OUTPUT_DIR}/board/clock_config.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${CLOCKS_DEST_HEADER}&amp;quot; &amp;quot;${CLOCKS_DEST_SOURCE}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Clocks&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR COMMAND ${CMAKE_COMMAND} -E rename &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.h&amp;quot; &amp;quot;${CLOCKS_DEST_HEADER}&amp;quot; COMMAND ${CMAKE_COMMAND} -E rename &amp;quot;${OUTPUT_DIR}/cm33_core0/board/clock_config.c&amp;quot; &amp;quot;${CLOCKS_DEST_SOURCE}&amp;quot; COMMAND ${CMAKE_COMMAND} -E remove_directory &amp;quot;${OUTPUT_DIR}/cm33_core0/board&amp;quot; COMMAND ${CMAKE_COMMAND} -E remove_directory &amp;quot;${OUTPUT_DIR}/cm33_core0&amp;quot; DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Clocks files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) # Check if needs to run: Peripherals set(PERIPHERALS_DEST_FILE_1 &amp;quot;${OUTPUT_DIR}/board/peripherals.h&amp;quot;) set(PERIPHERALS_DEST_FILE_2 &amp;quot;${OUTPUT_DIR}/board/peripherals.c&amp;quot;) add_custom_command( OUTPUT &amp;quot;${PERIPHERALS_DEST_FILE_1}&amp;quot; &amp;quot;${PERIPHERALS_DEST_FILE_2}&amp;quot; COMMAND &amp;quot;${CONFIG_TOOL_PATH}&amp;quot; &amp;quot;-noSplash&amp;quot; &amp;quot;-consoleLog&amp;quot; &amp;quot;-HeadlessTool&amp;quot; &amp;quot;Peripherals&amp;quot; &amp;quot;-Load&amp;quot; &amp;quot;${MEX_FILE}&amp;quot; &amp;quot;-ExportSrc&amp;quot; &amp;quot;${OUTPUT_DIR}&amp;quot; RESULT_VARIABLE CONFIG_TOOL_RESULT ERROR_VARIABLE CONFIG_TOOL_ERROR DEPENDS &amp;quot;${MEX_FILE}&amp;quot; COMMENT &amp;quot;Generating Peripherals files because ${MEX_FILE} changed or board files are missing&amp;quot; VERBATIM ) else() # path not set: developer should generate sources with GUI message(STATUS &amp;quot;CONFIG_TOOL_PATH not set. Skipping source generation.&amp;quot;) endif() project(ez_mcxn_minimal LANGUAGES C CXX ASM) include_directories( ${SDK_ROOT}/mcxn236/mcuxsdk/arch/arm/CMSIS/Core/Include ${SDK_ROOT}/mcxn236/mcuxsdk/arch/arm/CMSIS/Core/Include/m-profile ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236 ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/periph1 # MCXN326 files are in periph1 (see config file in parent dir) ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/common ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/mcx_spc # system power controller ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/port ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/gpio # project includes ${CMAKE_SOURCE_DIR}/board ) add_executable( ${CMAKE_PROJECT_NAME}) set(MCXN_FLAGS # flags common to compiler and linker -mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 --specs=nano.specs ) target_sources(${CMAKE_PROJECT_NAME} # default source files PRIVATE ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/startup_MCXN236.S ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/system_MCXN236.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_clock.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_reset.c ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_syscall_stub.c # implements stubs for functions not implemented in nano ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_sbrk.c # alternative for gcc implementation ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_memcpy.S # alternative for gcc implementation ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_memset.S # alternative for gcc implementation ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/common/fsl_common.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/mcx_spc/fsl_spc.c # system power controller ) target_sources(${CMAKE_PROJECT_NAME} # project source files (c, asm, cpp), except cpp modules PRIVATE ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/gpio/fsl_gpio.c # project sources # MCUXpresso Cfg generated: ${CLOCKS_DEST_SOURCE} ${PINS_DEST_SOURCE} # ${PERIPHERALS_DEST_SOURCE} # this minimal project doesn&amp;#39;t use the Peripherals # application sources ${CMAKE_SOURCE_DIR}/main.c ) target_sources(${CMAKE_PROJECT_NAME} # cpp modules PRIVATE FILE_SET cxx_modules TYPE CXX_MODULES FILES ) target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE $ :-fno-use-cxa-atexit&amp;gt; # cpp flag $ :-fno-exceptions&amp;gt; # cpp flag $ :-fno-rtti&amp;gt; # cpp flag $ :-fcommon&amp;gt; # cpp flag $ :-fmodules-ts&amp;gt; # cpp flag: support modules ${MCXN_FLAGS} # flags shared with linker -Wall -ffunction-sections -fdata-sections ) target_link_options(${CMAKE_PROJECT_NAME} PRIVATE ${MCXN_FLAGS} # flags shared with compiler --specs=nano.specs # small c library -Wl,--gc-sections -Wl,--no-warn-rwx-segments -T ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/MCXN236_flash.ld # linker command file ) # MCUXpresso FIXELF section # Not really needed for a single core MCXN236, but included for completeness set(MCUX_FIXELF_EXE $ENV{MCUX_FIXELF_EXE}) # check if MCUXpresso FIXELF path is set message(STATUS &amp;quot;mcux-fixelf set as: ${MCUX_FIXELF_EXE}&amp;quot;) if(NOT MCUX_FIXELF_EXE) find_program(MCUX_FIXELF_EXE mcux-fixelf) if(NOT MCUX_FIXELF_EXE) message(STATUS &amp;quot;Can&amp;#39;t locate mcux-fixelf.exe in environment or on path. Skipping post-build fixelf step.&amp;quot;) endif() else() message(STATUS &amp;quot;using mcux-fixelf: ${MCUX_FIXELF_EXE}&amp;quot;) endif() if(MCUX_FIXELF_EXE) add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${MCUX_FIXELF_EXE} $ # .elf file to fix COMMENT &amp;quot;Executing mcux-fixelf post-build steps voor NXP MCU...&amp;quot; VERBATIM ) endif() add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD # create extra output: flashable binary COMMAND ${CMAKE_OBJCOPY} -O binary $ $ .bin COMMENT &amp;quot;create bin executable: $ .bin&amp;quot; ) Example main source main.c: #include &amp;quot;fsl_common.h&amp;quot; // #include &amp;quot;fsl_device_registers.h&amp;quot; #include &amp;quot;pin_mux.h&amp;quot; #include &amp;quot;clock_config.h&amp;quot; int main(void) { BOARD_InitPins(); BOARD_BootClockRUN(); while (1) { for (uint32_t i = 0; i cmake .. -G &amp;quot;Ninja&amp;quot; -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=c:\\Users\\jancu\\Documents\\toolchains\\arm-gnu-toolchain-15.2.rel1-mingw-w64-i686-arm-none-eabi\\bin\\arm-none-eabi-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=c:\\Users\\jancu\\Documents\\toolchains\\arm-gnu-toolchain-15.2.rel1-mingw-w64-i686-arm-none-eabi\\bin\\arm-none-eabi-g++.exe -DCMAKE_BUILD_TYPE=Debug -- SDK_ROOT: C:/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard -- The C compiler identification is GNU 15.2.1 -- The CXX compiler identification is GNU 15.2.1 -- The ASM compiler identification is GNU -- Found assembler: C:/Users/jancu/Documents/toolchains/arm-gnu-toolchain-15.2.rel1-mingw-w64-i686-arm-none-eabi/bin/arm-none-eabi-gcc.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: c:/Users/jancu/Documents/toolchains/arm-gnu-toolchain-15.2.rel1-mingw-w64-i686-arm-none-eabi/bin/arm-none-eabi-gcc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: c:/Users/jancu/Documents/toolchains/arm-gnu-toolchain-15.2.rel1-mingw-w64-i686-arm-none-eabi/bin/arm-none-eabi-g++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done (66.2s) -- Generating done (0.1s) -- Build files have been written to: C:/Users/jancu/workspace_vscode_nxp/ez-mcxn_hello_world/ez_mcxn_minimal/build C:\Users\jancu\workspace_vscode_nxp\ez-mcxn_hello_world\ez_mcxn_minimal\build&amp;gt;cmake --build . [15/15] Linking C executable ez_mcxn_minimal When you use VS Code&amp;#39;s CMake extension: you can select the toolchain there, and it &amp;#39;ll be passed automatically. The SDK_ROOT and CONFIG_TOOL_PATH, you can configure in Extensions - CMake - CMake:Environment press Configure press build Timings config: &amp;lt; 2.5s build: seconds** first config (or when cache cleared): 66s*. first build (or when build cleared, or .mex file altered): 20s** * If you don&amp;#39;t plan to use a hardware debugger, you can comment the svd section, and also a new config is below 10s ** first build includes generating the source files with CMUXpresso Config. If you do this step by hand, during your design, it takes virtually all time off. A rebuild after you changed / added some sources takes a few seconds. All times recorded on Windows 11 Laptop, 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (2.30 GHz), 16.0 GB RAM. Fast internet, but WiFi connected. BD711 solid state drive In the next post, I&amp;#39;ll try to get Debug working in VS Code. Also without the MCXpresso extension. Thank you for reading Project attached: community.element14.com/.../ez_5F00_mcxn_5F00_minimal.zip</description><category domain="https://community.element14.com/technologies/embedded/tags/EZ_2D00_MCXN">EZ-MCXN</category><category domain="https://community.element14.com/technologies/embedded/tags/nxp">nxp</category><category domain="https://community.element14.com/technologies/embedded/tags/FRDM_2D00_MCXN236">FRDM-MCXN236</category><category domain="https://community.element14.com/technologies/embedded/tags/MCXN236">MCXN236</category></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=6eb55dcb-a990-438e-a7e4-d6e9bd7882d1</link><pubDate>Sat, 31 Oct 2026 19:56:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:6eb55dcb-a990-438e-a7e4-d6e9bd7882d1</guid><dc:creator>shabaz</dc:creator><description>That&amp;#39;s awesome! I too feel that west is an unnecessary irritation. Also, I&amp;#39;m not convinced it is a good idea to have a separate boards section like NXP have, because nine times out of ten, the .mex file will inevitably need to be modified. One may as well just place the .mex file, and all generated files, in the same project folder I feel (but I&amp;#39;ve not been confident enough to try this yet, in case I&amp;#39;m missing something). I just now tried a dual virtual COM port USB example, from mcuxpresso-sdk\mcuxsdk\examples\usb_examples\usb_device_composite_cdc_vcom_cdc_vcom_lite . My procedure was: (1) Copy the code from that folder (it is actually in a subfolder called bm i.e. baremetal) to my own project folder outside of the SDK, called C:\DEV\projects\mcx_projects\dual_usb_com_ports (I placed all the source files there, plus CMakeLists.txt and importantly prj.conf it won&amp;#39;t build without that). (2) Stripped clean the CMakeLists.txt a little bit. And copied my build.ps1 script into that folder too. (3) I did ./build.ps1 clean and then ./build.ps1 but it was missing a file called hardware_init.c . Searching around, NXP had placed that at C:\DEV\projects\mcuxpresso-sdk\mcuxsdk\examples\_boards\frdmmcxn236\usb_examples\usb_device_composite_cdc_vcom_cdc_vcom_lite\bm along with other auto-generated files. I didn&amp;#39;t use the other files there. Also, technically the hardware_init.c might not be needed if I were to enable the USB PLL via the GUI, but that didn&amp;#39;t work for me (it seems the &amp;#39;lite&amp;#39; version has some differences) so long story short, I didn&amp;#39;t do any mod via GUI, and just copied that hardware_init.c to my project folder, and added that to the CMakeLists.txt (4) I build it and ran it, and saw two COM ports appear! Now a normal person creating a demo would have made the COM ports display a special message but NXP in their wisdom decided to make the demo as ambiguous as possible, and merely echo a character just like serial terminals may do anyway if configured for that. Hence step 5.. (5) Enabled printf capability and now the main function (in composite.c ) will actually print more obvious stuff). I might put this project into a separate folder includable in a cmake project, so that whenever a virtual com port is needed for debug, menu etc., it can be used (and the second port exposed over the same USB connection could be used for project-specific stuff, thus the two ports are ideal for keeping the debug output separate) Anyway for now I placed the project at ez_mcxn/mcx_projects/dual_usb_com_ports at main &amp;#183; shabaz123/ez_mcxn</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=cabd9244-b0b5-4edd-b182-225b5dd08724</link><pubDate>Sat, 31 Oct 2026 19:44:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cabd9244-b0b5-4edd-b182-225b5dd08724</guid><dc:creator>Jan Cumps</dc:creator><description>I found out I didn&amp;#39;t have to write my own stubs file. There is one in the SDK, located here: /mcxn236/mcuxsdk/components/misc_utilities/fsl_syscall_stub.c Slight change to the CMake file: target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/startup_MCXN236.S ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/system_MCXN236.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_clock.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_reset.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/mcx_spc/fsl_spc.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/common/fsl_common.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/gpio/fsl_gpio.c ${SDK_ROOT}/mcxn236/mcuxsdk/components/misc_utilities/fsl_syscall_stub.c # project sources # MCUXpresso Cfg generated: ${CMAKE_SOURCE_DIR}/board/clock_config.c ${CMAKE_SOURCE_DIR}/board/pin_mux.c # application sources ${CMAKE_SOURCE_DIR}/main.c )</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=cd715bd1-3574-46fb-9092-57c39924374d</link><pubDate>Sat, 31 Oct 2026 16:54:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cd715bd1-3574-46fb-9092-57c39924374d</guid><dc:creator>Jan Cumps</dc:creator><description>I got the build part working. 4 hours of sweat and anger: cmake_minimum_required(VERSION 3.29) set(CMAKE_VERBOSE_MAKEFILE OF) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 26) set(CMAKE_CXX_STANDARD_REQUIRED ON) # SDK_ROOT set externally set(SDK_ROOT $ENV{SDK_ROOT}) message(STATUS &amp;quot;SDK_ROOT: ${SDK_ROOT}&amp;quot;) set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_EXE_LINKER_FLAGS &amp;quot;${CMAKE_EXE_LINKER_FLAGS} --specs=nosys.specs&amp;quot;) # else CMake throws toolchain error when using an embedded GCC add_compile_definitions( CPU_MCXN236VKL MCXN236 ) project(ez_mcxn_minimal LANGUAGES C CXX ASM) include_directories( ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/common ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/gpio ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/mcx_spc ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/port ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236 ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/periph1 ${SDK_ROOT}/mcxn236/mcuxsdk/arch/arm/CMSIS/Core/Include ${SDK_ROOT}/mcxn236/mcuxsdk/arch/arm/CMSIS/Core/Include/m-profile # project includes ${CMAKE_SOURCE_DIR}/board ) add_executable( ${CMAKE_PROJECT_NAME}) set(MCXN_FLAGS -mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 --specs=nano.specs ) target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/startup_MCXN236.S ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/system_MCXN236.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_clock.c ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_reset.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/mcx_spc/fsl_spc.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/common/fsl_common.c ${SDK_ROOT}/mcxn236/mcuxsdk/drivers/gpio/fsl_gpio.c # project sources # MCUXpresso Cfg generated: ${CMAKE_SOURCE_DIR}/board/clock_config.c ${CMAKE_SOURCE_DIR}/board/pin_mux.c # stubs for functions not implemented in nano c lib ${CMAKE_SOURCE_DIR}/stub.c # application sources ${CMAKE_SOURCE_DIR}/main.c ) target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE $ :-fno-use-cxa-atexit&amp;gt; $ :-fno-exceptions&amp;gt; $ :-fno-rtti&amp;gt; $ :-fcommon&amp;gt; $ :-fmodules-ts&amp;gt; ${MCXN_FLAGS} -Wall -ffunction-sections -fdata-sections ) target_link_options(${CMAKE_PROJECT_NAME} PRIVATE ${MCXN_FLAGS} --specs=nano.specs -Wl,--gc-sections -Wl,--no-warn-rwx-segments -T ${SDK_ROOT}/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/MCXN236_flash.ld ) add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -O binary $ ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin COMMENT &amp;quot;create bin executable: ${CMAKE_PROJECT_NAME}.bin&amp;quot; ) I needed to provide stub definitions (stub.c) for some functions that aren&amp;#39;t implemented by GCC nano lib (similar as for MSPM0): #include // bare-metal stubs to eliminate Newlib-nano noise and errors int _close(int file) { (void)file; return -1; } int _fstat(int file, struct stat *st) { (void)file; st-&amp;gt;st_mode = S_IFCHR; return 0; } int _isatty(int file) { (void)file; return 1; } int _lseek(int file, int ptr, int dir) { (void)file; (void)ptr; (void)dir; return 0; } int _read(int file, char *ptr, int len) { (void)file; (void)ptr; (void)len; return 0; } int _write(int file, char *ptr, int len) { (void)file; (void)ptr; (void)len; return 0; } void _exit(int status) { (void)status; while(1); } int _kill(pid_t pid, int sig) { (void)pid; (void)sig; return -1; } pid_t _getpid(void) { return 1; } It builds without using West, MCUXpresso VS Extensions. I need to have an SDK on the develop PC, and point to it with a variable: In my case, I defined a CMake environment variable SDK_ROOT, pointing to C:/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard Results: [main] Building folder: c:/Users/jancu/workspace_vscode_nxp/ez-mcxn_hello_world/ez_mcxn_minimal/build [build] Starting build [proc] Executing command: C:/Users/jancu/.pico-sdk/cmake/v4.2.1/bin/cmake.exe --build c:/Users/jancu/workspace_vscode_nxp/ez-mcxn_hello_world/ez_mcxn_minimal/build --config Debug --target all -- [build] [11/12 8% :: 0.221] Building ASM object CMakeFiles/ez_mcxn_minimal.dir/C_/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/gcc/startup_MCXN236.S.obj [build] [11/12 16% :: 0.341] Building C object CMakeFiles/ez_mcxn_minimal.dir/stub.c.obj [build] [11/12 25% :: 0.449] Building C object CMakeFiles/ez_mcxn_minimal.dir/C_/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard/mcxn236/mcuxsdk/drivers/common/fsl_common.c.obj [build] [11/12 33% :: 0.450] Building C object CMakeFiles/ez_mcxn_minimal.dir/C_/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/system_MCXN236.c.obj [build] [11/12 41% :: 0.451] Building C object CMakeFiles/ez_mcxn_minimal.dir/C_/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_reset.c.obj [build] [11/12 50% :: 0.481] Building C object CMakeFiles/ez_mcxn_minimal.dir/C_/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard/mcxn236/mcuxsdk/drivers/gpio/fsl_gpio.c.obj [build] [11/12 58% :: 0.491] Building C object CMakeFiles/ez_mcxn_minimal.dir/main.c.obj [build] [11/12 66% :: 0.499] Building C object CMakeFiles/ez_mcxn_minimal.dir/board/pin_mux.c.obj [build] [11/12 75% :: 0.510] Building C object CMakeFiles/ez_mcxn_minimal.dir/board/clock_config.c.obj [build] [11/12 83% :: 0.523] Building C object CMakeFiles/ez_mcxn_minimal.dir/C_/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard/mcxn236/mcuxsdk/drivers/mcx_spc/fsl_spc.c.obj [build] [11/12 91% :: 0.581] Building C object CMakeFiles/ez_mcxn_minimal.dir/C_/Users/jancu/Documents/elektronica/nxp/sdk/mcxn236_noboard/mcxn236/mcuxsdk/devices/MCX/MCXN/MCXN236/drivers/fsl_clock.c.obj [build] [12/12 100% :: 0.769] Linking C executable ez_mcxn_minimal; create bin executable: ez_mcxn_minimal.bin [driver] Build completed: 00:00:00.830 [build] Build finished with exit code 0</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=cf87b25a-23f1-42dd-a3c4-4f833a692101</link><pubDate>Sat, 31 Oct 2026 14:13:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cf87b25a-23f1-42dd-a3c4-4f833a692101</guid><dc:creator>Jan Cumps</dc:creator><description>I &amp;#39;m going to try and build a little project, using : the SDK where needed the output from a clean .mex, using your clocl settings CMake CMake and bash settings from your repo and then, when a compile fails, look one step further to see what&amp;#39;s missing ...</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=fd4064d6-ef48-439f-9bec-d715931397d2</link><pubDate>Sat, 31 Oct 2026 13:11:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:fd4064d6-ef48-439f-9bec-d715931397d2</guid><dc:creator>shabaz</dc:creator><description>They made it very hard to follow and I couldn&amp;#39;t figure that out. I unfortunately didn&amp;#39;t make a record of what I did the first time, but I believe I resorted to copying one of their example board folders, and then deleted files one-by-one to see what was used, and then used the GUI to create the autogenerated files to put there. But I kept one unused header file (just renamed it so it wouldn&amp;#39;t be included in the build) since it might be useful if ever using FreeRTOS one day. Also the NXP examples use &amp;quot;west&amp;quot; which I had never heard of and it&amp;#39;s another annoyance, because I found it very slow, the simplest of builds were taking 10 seconds. So for my build.ps1 I got AI to only use west for the first build, and then for all non-clean builds it skips that and just directly uses ninja. That made the simple builds occur within a second. But it did make me wonder, was west even necessary, probably not. But again perhaps the RTOS benefits from that, no idea, so I didn&amp;#39;t completely get rid of west.</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=02277a2f-ba8f-41da-87bc-3de3f6a0d1e5</link><pubDate>Sat, 31 Oct 2026 11:19:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02277a2f-ba8f-41da-87bc-3de3f6a0d1e5</guid><dc:creator>Jan Cumps</dc:creator><description>That custom SDK doesn&amp;#39;t do what I was expecting. It doesn&amp;#39;t actually add the config settings I made online. I&amp;#39;m studying further to understand how to create a project that doesn&amp;#39;t use example code settings / artifacts.</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=b49e9ee9-da21-4c69-9acf-f0994e908a74</link><pubDate>Fri, 30 Oct 2026 22:14:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b49e9ee9-da21-4c69-9acf-f0994e908a74</guid><dc:creator>Jan Cumps</dc:creator><description>Yes, you can import it in the IDE (I use VS Code + extension) and you can create projects based on it. I have it working, but not perfect. It takes some pin and clock definitions, but not all. The example I created for it, builds:</description></item><item><title /><link>https://community.element14.com/technologies/embedded/b/blog/posts/ez-mcxn-simple-dev-board-for-nxp-mcx-n-series-microcontrollers?CommentId=7ce5b4d3-a692-471d-aeb4-c85947ae8280</link><pubDate>Fri, 30 Oct 2026 21:42:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:7ce5b4d3-a692-471d-aeb4-c85947ae8280</guid><dc:creator>shabaz</dc:creator><description>Interesting.. I just downloaded it, it creates an entire custom SDK?</description></item></channel></rss>