<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Embedded on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/embedded/</link>
        <description>Recent content in Embedded on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Sun, 17 May 2026 12:32:06 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/embedded/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>How to Choose Between FreeRTOS, RT-Thread, and Zephyr: Architecture Differences and Use Cases</title>
        <link>https://knightli.com/en/2026/05/17/freertos-rt-thread-zephyr-rtos-comparison/</link>
        <pubDate>Sun, 17 May 2026 12:32:06 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/17/freertos-rt-thread-zephyr-rtos-comparison/</guid>
        <description>&lt;p&gt;FreeRTOS, RT-Thread, and Zephyr are often compared as if they were the same kind of RTOS. They are not.&lt;/p&gt;
&lt;p&gt;The better question is not &amp;ldquo;which RTOS is better&amp;rdquo;, but what your project actually needs: a small scheduling kernel, an RTOS with strong domestic MCU support, or a complete cross-platform embedded operating system.&lt;/p&gt;
&lt;p&gt;At a high level:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FreeRTOS is a widely used scheduling kernel, plus a set of AWS-maintained IoT libraries.&lt;/li&gt;
&lt;li&gt;RT-Thread is a kernel plus a richer component ecosystem, with strong Chinese documentation and long-tail domestic MCU support.&lt;/li&gt;
&lt;li&gt;Zephyr is a Linux Foundation hosted RTOS that emphasizes unified subsystems, device models, Devicetree, and cross-vendor application reuse.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;bottom-line&#34;&gt;Bottom line
&lt;/h2&gt;&lt;p&gt;If your project only needs tasks, queues, semaphores, timers, and a very small footprint, FreeRTOS remains one of the safest choices.&lt;/p&gt;
&lt;p&gt;If you mainly use Chinese MCU vendors and want ready BSPs, Chinese community support, ENV tooling, and a larger RTOS component set, RT-Thread has real advantages.&lt;/p&gt;
&lt;p&gt;If you need to reuse application code across chips, boards, and vendors, and your team can accept the learning curve of Kconfig, Devicetree, west, and Zephyr&amp;rsquo;s driver model, Zephyr is the more future-facing engineering path.&lt;/p&gt;
&lt;p&gt;This is not a simple &amp;ldquo;which one replaces which&amp;rdquo; question. They sit at different abstraction levels.&lt;/p&gt;
&lt;h2 id=&#34;freertos-small-familiar-deterministic&#34;&gt;FreeRTOS: small, familiar, deterministic
&lt;/h2&gt;&lt;p&gt;FreeRTOS is strongest when you need something small and predictable.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;FreeRTOS-Kernel&lt;/code&gt; repository focuses on the kernel, ports, and core RTOS mechanisms: scheduling, semaphores, queues, event groups, software timers, and memory allocation. In many real projects, this is exactly what teams use.&lt;/p&gt;
&lt;p&gt;Its advantages are straightforward:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Huge MCU coverage.&lt;/li&gt;
&lt;li&gt;The most examples and learning material.&lt;/li&gt;
&lt;li&gt;Easy integration into vendor SDKs.&lt;/li&gt;
&lt;li&gt;Good fit for resource-constrained systems.&lt;/li&gt;
&lt;li&gt;Short debugging paths because many teams already know it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After AWS acquired FreeRTOS, it also maintained libraries such as coreMQTT, coreHTTP, OTA, Device Shadow, Jobs, and Defender. The FreeRTOS 202406 LTS release brings kernel and IoT libraries into a long-term support line.&lt;/p&gt;
&lt;p&gt;The boundary is equally clear: FreeRTOS is not a complete OS platform. It does not define a unified cross-vendor model for GPIO, UART, I2C, boards, pin control, or HAL abstraction. Those parts come from vendor SDKs or your own architecture.&lt;/p&gt;
&lt;p&gt;That is a design choice, not a flaw. It makes FreeRTOS flexible and easy to embed, but when you change vendors or boards, application code often gets pulled into the hardware migration.&lt;/p&gt;
&lt;h2 id=&#34;rt-thread-stronger-domestic-mcu-coverage-and-components&#34;&gt;RT-Thread: stronger domestic MCU coverage and components
&lt;/h2&gt;&lt;p&gt;RT-Thread is closer to a complete RTOS than FreeRTOS.&lt;/p&gt;
&lt;p&gt;Besides the scheduler, it provides file systems, networking, device framework, USB, sensor framework, packages, and tooling. For many Chinese embedded teams, its Chinese documentation, ENV workflow, community, and BSP coverage are practical advantages.&lt;/p&gt;
&lt;p&gt;It is especially useful for long-tail domestic MCUs such as AT32, HC32, N32, APM32, HT32, Luat, HPMicro, and similar families. Many projects do not use only the biggest international vendors, and RT-Thread often gives these projects a faster starting point.&lt;/p&gt;
&lt;p&gt;RT-Thread fits when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You use many domestic MCUs.&lt;/li&gt;
&lt;li&gt;Chinese docs and community matter.&lt;/li&gt;
&lt;li&gt;You need more components than a bare FreeRTOS setup.&lt;/li&gt;
&lt;li&gt;You want file system, networking, shell, and device framework quickly.&lt;/li&gt;
&lt;li&gt;You do not want to build all board and driver abstractions yourself.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Its limitation is that many BSPs still remain board-specific and vendor-library-oriented. From the perspective of cross-vendor hardware description and application reuse, it does not have the same systematic model as Zephyr.&lt;/p&gt;
&lt;p&gt;RT-Thread is therefore best understood as a practical RTOS ecosystem above a kernel, especially strong in the Chinese MCU world, but not the same kind of full engineering platform as Zephyr.&lt;/p&gt;
&lt;h2 id=&#34;zephyr-an-embedded-system-engineering-platform&#34;&gt;Zephyr: an embedded system engineering platform
&lt;/h2&gt;&lt;p&gt;Zephyr is often described as a more complex RTOS. That is partly true, but the complexity is not random feature bloat.&lt;/p&gt;
&lt;p&gt;Zephyr tries to bring into one OS project many things that are usually scattered across vendor SDKs, BSPs, HAL code, custom drivers, configuration scripts, and application code.&lt;/p&gt;
&lt;p&gt;Its key pieces are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Kconfig for feature and build configuration.&lt;/li&gt;
&lt;li&gt;Devicetree for board-level hardware description.&lt;/li&gt;
&lt;li&gt;Unified drivers for GPIO, UART, SPI, I2C, ADC, DMA, clock, reset, pinctrl, and more.&lt;/li&gt;
&lt;li&gt;Subsystems for networking, Bluetooth, USB, file systems, input, power management, logging, and settings.&lt;/li&gt;
&lt;li&gt;west and CMake for project, module, build, flashing, and debugging workflows.&lt;/li&gt;
&lt;li&gt;Board / SoC / shield abstractions to keep hardware differences in configuration layers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Zephyr feels like an MCU-sized cousin of embedded Linux: it borrows many Linux engineering ideas, but moves expensive runtime probing into build-time generation.&lt;/p&gt;
&lt;h2 id=&#34;why-devicetree-matters&#34;&gt;Why Devicetree matters
&lt;/h2&gt;&lt;p&gt;Devicetree is central to Zephyr.&lt;/p&gt;
&lt;p&gt;In Linux, DTS is compiled into DTB, passed to the kernel, and parsed at runtime for driver matching and probing. That is reasonable for MPU-class systems, but too heavy for many MCUs.&lt;/p&gt;
&lt;p&gt;Zephyr processes DTS and overlays during the build, generates headers such as &lt;code&gt;devicetree_generated.h&lt;/code&gt;, and exposes hardware information through &lt;code&gt;DT_&lt;/code&gt; macros. Most hardware selection is settled at compile time, so runtime discovery stays light.&lt;/p&gt;
&lt;p&gt;This gives Zephyr several benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hardware description is separated from application code.&lt;/li&gt;
&lt;li&gt;Board changes mainly touch DTS / overlay files.&lt;/li&gt;
&lt;li&gt;Drivers expose unified APIs.&lt;/li&gt;
&lt;li&gt;Unused drivers and subsystems can be trimmed.&lt;/li&gt;
&lt;li&gt;Application code does not need to know every register, pin, or vendor HAL detail.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, an LED or button in a traditional FreeRTOS + vendor HAL project may involve CubeMX configuration, GPIO init, interrupts, debounce logic, callbacks, and application code. In Zephyr, much of that can live in DTS and standardized subsystems, while application code handles events.&lt;/p&gt;
&lt;h2 id=&#34;why-application-code-becomes-cleaner&#34;&gt;Why application code becomes cleaner
&lt;/h2&gt;&lt;p&gt;Traditional MCU projects often mix hardware init, pin numbers, interrupts, debounce, timers, state machines, UART redirection, event queues, and business logic in the same layer.&lt;/p&gt;
&lt;p&gt;That is fast at the beginning, but it becomes painful when there are more peripherals, boards, and product variants.&lt;/p&gt;
&lt;p&gt;Zephyr tries to separate them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hardware wiring goes into DTS / overlays.&lt;/li&gt;
&lt;li&gt;Feature switches go into Kconfig / &lt;code&gt;prj.conf&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Drivers live in Zephyr mainline or modules.&lt;/li&gt;
&lt;li&gt;Applications handle business events.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For multi-board and multi-chip projects, the ideal is to change DTS instead of changing &lt;code&gt;main.c&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;resource-cost-needs-context&#34;&gt;Resource cost needs context
&lt;/h2&gt;&lt;p&gt;Zephyr may use more Flash than a minimal FreeRTOS project because it brings drivers, subsystems, and device objects. But that is infrastructure, not just overhead.&lt;/p&gt;
&lt;p&gt;Once you add buttons, encoders, input devices, logging, or multiple drivers, that infrastructure is reused. FreeRTOS projects often start smaller, but every new peripheral may add custom state machines and glue code.&lt;/p&gt;
&lt;p&gt;RAM also depends on configuration. FreeRTOS reports may include reserved heap and stacks; Zephyr often relies more on static objects and link-time trimming. The only fair comparison is with the same feature set and realistic configuration.&lt;/p&gt;
&lt;h2 id=&#34;how-to-choose&#34;&gt;How to choose
&lt;/h2&gt;&lt;p&gt;Choose FreeRTOS when the hardware is fixed, resources are tight, the team knows the kernel well, and you only need scheduling primitives.&lt;/p&gt;
&lt;p&gt;Choose RT-Thread when you need stronger domestic MCU support, Chinese documentation, ready BSPs, and a richer component ecosystem without taking on the full Zephyr learning curve.&lt;/p&gt;
&lt;p&gt;Choose Zephyr when you need cross-board reuse, long-term maintainability, unified drivers, standardized subsystems, and a path closer to Linux-style embedded engineering.&lt;/p&gt;
&lt;h2 id=&#34;when-not-to-use-zephyr&#34;&gt;When not to use Zephyr
&lt;/h2&gt;&lt;p&gt;Zephyr is not a silver bullet.&lt;/p&gt;
&lt;p&gt;Avoid jumping into Zephyr when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The project has one fixed board and simple features.&lt;/li&gt;
&lt;li&gt;The team has no time to learn Kconfig and Devicetree.&lt;/li&gt;
&lt;li&gt;The target chip or board has weak upstream support.&lt;/li&gt;
&lt;li&gt;The product depends heavily on a vendor&amp;rsquo;s closed SDK.&lt;/li&gt;
&lt;li&gt;The project is already stable in production.&lt;/li&gt;
&lt;li&gt;The team is not ready for Zephyr&amp;rsquo;s build and debugging workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A safer path is to start with a well-supported board, run LED, UART, GPIO, input, and I2C / SPI examples, then decide whether to migrate real projects.&lt;/p&gt;
&lt;h2 id=&#34;why-reading-good-code-matters-in-the-ai-era&#34;&gt;Why reading good code matters in the AI era
&lt;/h2&gt;&lt;p&gt;AI can generate candidate code, but engineers still merge it, flash it, and ship it to customer devices.&lt;/p&gt;
&lt;p&gt;The scarce ability is not typing more code, but judgment: why this abstraction exists, whether a driver interface is maintainable, whether a generated patch is production-safe, and whether a configuration change affects other boards.&lt;/p&gt;
&lt;p&gt;Zephyr is valuable even if you do not use it immediately. Reading its subsystems, Devicetree bindings, Kconfig layout, and driver organization gives you an industrial embedded architecture reference.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;FreeRTOS, RT-Thread, and Zephyr are not three interchangeable products.&lt;/p&gt;
&lt;p&gt;FreeRTOS solves scheduling. RT-Thread adds a richer component ecosystem and strong domestic MCU support. Zephyr tries to reorganize MCU software engineering around unified subsystems, Devicetree, and application portability.&lt;/p&gt;
&lt;p&gt;For a small fixed device, FreeRTOS may be the best answer. For domestic MCU product lines, RT-Thread is practical. For multi-platform, multi-board, long-lived products, Zephyr deserves serious investment.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.aws.amazon.com/freertos/latest/userguide/freertos-architecture.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;FreeRTOS architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://aws.amazon.com/about-aws/whats-new/2024/07/freertos-long-term-support-version/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;AWS: FreeRTOS 202406 LTS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/RT-Thread/rt-thread/releases&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;RT-Thread releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.zephyrproject.org/latest/boards/index.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Zephyr supported boards&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.zephyrproject.org/latest/build/dts/index.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Zephyr Devicetree documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>How to Choose an Embedded Development Environment in 2026: Keil, STM32CubeIDE, VS Code, and AI Collaboration</title>
        <link>https://knightli.com/en/2026/04/22/embedded-development-environment-keil-vscode-ai-2026/</link>
        <pubDate>Wed, 22 Apr 2026 23:05:00 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/22/embedded-development-environment-keil-vscode-ai-2026/</guid>
        <description>&lt;p&gt;If you still work on microcontrollers or embedded systems, you will quickly run into a very practical question: in 2026, when AI-assisted coding has become increasingly common, what development environment actually makes sense?&lt;/p&gt;
&lt;p&gt;On the surface, this looks like a comparison between several IDEs. But what it really asks is something else: do you want a tool that can simply get the project running, or a workflow that balances ecosystem compatibility, coding experience, and AI collaboration?&lt;/p&gt;
&lt;p&gt;Seen from that angle, the answer is usually not to pick one out of &lt;code&gt;Keil&lt;/code&gt;, &lt;code&gt;STM32CubeIDE&lt;/code&gt;, &lt;code&gt;VS Code&lt;/code&gt;, and &lt;code&gt;CLion&lt;/code&gt;, but to recombine the parts each one does best.&lt;/p&gt;
&lt;h2 id=&#34;first-look-at-the-main-options-and-what-each-one-really-solves&#34;&gt;First look at the main options and what each one really solves
&lt;/h2&gt;&lt;p&gt;In embedded development, the familiar names are still more or less the same:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Keil&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;STM32CubeIDE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;VS Code&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CLion&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you go back even further, people will still mention &lt;code&gt;IAR&lt;/code&gt;. But for this discussion, what matters less is who has the oldest pedigree, and more who actually fits today&amp;rsquo;s development reality.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://knightli.com/2026/04/22/embedded-development-environment-keil-vscode-ai-2026/embedded-ide-comparison.svg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Comparison chart of embedded development environments&#34;
	
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;keil-strong-ecosystem-dependable-entry-point-but-clearly-outdated-editing-experience&#34;&gt;Keil: strong ecosystem, dependable entry point, but clearly outdated editing experience
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Keil&lt;/code&gt; is still hard to avoid today, and the reason is simple: it is everywhere.&lt;/p&gt;
&lt;p&gt;Whether you look at legacy company projects, online tutorials, shared examples, or older codebases, a huge amount of embedded work is still organized around &lt;code&gt;Keil&lt;/code&gt;. Its build, download, and debug workflow remains mature, and if your main goal is to get code running on a board, it is still a very short path.&lt;/p&gt;
&lt;p&gt;Its problems are just as obvious:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;dated interface&lt;/li&gt;
&lt;li&gt;average editing experience&lt;/li&gt;
&lt;li&gt;not a natural home for AI-assisted coding&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So &lt;code&gt;Keil&lt;/code&gt; feels more like a project entry point and debugging foundation than an ideal editor for a 2026 coding experience.&lt;/p&gt;
&lt;h2 id=&#34;stm32cubeide-friendly-for-stm32-but-more-of-a-learning-and-quick-start-tool&#34;&gt;STM32CubeIDE: friendly for STM32, but more of a learning and quick-start tool
&lt;/h2&gt;&lt;p&gt;If you mainly live inside the &lt;code&gt;STM32&lt;/code&gt; ecosystem, &lt;code&gt;STM32CubeIDE&lt;/code&gt; is often the first environment you touch.&lt;/p&gt;
&lt;p&gt;Its strengths are straightforward:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;beginner-friendly onboarding&lt;/li&gt;
&lt;li&gt;convenient peripheral configuration and project generation&lt;/li&gt;
&lt;li&gt;a fairly complete debug chain&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For students, beginners, and early project setup, that experience is direct and good enough.&lt;/p&gt;
&lt;p&gt;But once you move into longer-running projects, heavier collaboration, and more customized workflows, its limitations become more visible. In commercial work or more complex team environments, it may not be the most comfortable primary environment.&lt;/p&gt;
&lt;p&gt;So it fits better as a quick-start and STM32-centric all-in-one tool than as a long-term primary editor.&lt;/p&gt;
&lt;h2 id=&#34;vs-code-not-really-an-ide-but-increasingly-strong-in-the-ai-era&#34;&gt;VS Code: not really an IDE, but increasingly strong in the AI era
&lt;/h2&gt;&lt;p&gt;Strictly speaking, &lt;code&gt;VS Code&lt;/code&gt; is not a traditional IDE. More accurately, it is an extensible code editor.&lt;/p&gt;
&lt;p&gt;That gives it a built-in dual nature.&lt;/p&gt;
&lt;p&gt;Its weaknesses are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;it needs plugins and setup&lt;/li&gt;
&lt;li&gt;it is not beginner-friendly enough&lt;/li&gt;
&lt;li&gt;it cannot replace the full embedded IDE workflow out of the box&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But its real strengths come from the same place:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;strong extensibility&lt;/li&gt;
&lt;li&gt;a much more modern coding experience&lt;/li&gt;
&lt;li&gt;better highlighting, navigation, search, and refactoring&lt;/li&gt;
&lt;li&gt;stronger momentum around AI tools and agent workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At this stage, many developers no longer just want something that lets them write code. They want to know whether AI collaboration can fit naturally into the same environment. From that perspective, the advantage of &lt;code&gt;VS Code&lt;/code&gt; is hard to miss.&lt;/p&gt;
&lt;h2 id=&#34;clion-good-experience-but-not-central-enough-in-embedded-practice&#34;&gt;CLion: good experience, but not central enough in embedded practice
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;CLion&lt;/code&gt; often comes up because its C/C++ coding experience has long been considered solid.&lt;/p&gt;
&lt;p&gt;But for many embedded developers, the question is not whether it is good. The question is whether it is worth switching to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;relatively fewer people use it in embedded workflows&lt;/li&gt;
&lt;li&gt;it does not connect to existing embedded project ecosystems as directly as &lt;code&gt;Keil&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;it may not offer a more practical AI-collaboration advantage than &lt;code&gt;VS Code&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So it feels more like a &amp;ldquo;theoretically good option&amp;rdquo; than the most natural center of a mainstream embedded workflow today.&lt;/p&gt;
&lt;h2 id=&#34;a-more-practical-answer-let-keil-handle-build-and-debugging-let-vs-code-handle-coding&#34;&gt;A more practical answer: let Keil handle build and debugging, let VS Code handle coding
&lt;/h2&gt;&lt;p&gt;If you break these tools apart by role, a much more pragmatic conclusion appears:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;use &lt;code&gt;Keil&lt;/code&gt; to preserve existing project compatibility, build, flashing, and debugging&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;VS Code&lt;/code&gt; for everyday coding, search, navigation, and AI collaboration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The value of this combination is that it does not try to force one tool to do everything. Instead, it puts each tool back in the role it is best at.&lt;/p&gt;
&lt;p&gt;For many embedded projects, the &lt;code&gt;Keil&lt;/code&gt; ecosystem is simply not optional. If that is true, then instead of forcing everything back into &lt;code&gt;Keil&lt;/code&gt;, it makes more sense to treat it as the backend build-and-debug entry point, while handing the real editing experience to &lt;code&gt;VS Code&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://knightli.com/2026/04/22/embedded-development-environment-keil-vscode-ai-2026/keil-vscode-ai-workflow.svg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Workflow diagram for combining Keil and VS Code&#34;
	
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;why-this-combination-makes-more-sense-in-the-ai-era&#34;&gt;Why this combination makes more sense in the AI era
&lt;/h2&gt;&lt;p&gt;Today, the dividing line between environments is no longer just whether the editor feels smooth. It is whether AI can plug into the workflow naturally.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;VS Code&lt;/code&gt; has several very practical strengths here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;more active support for AI plugins and agents&lt;/li&gt;
&lt;li&gt;a code browsing experience better suited for AI reading and modifying projects&lt;/li&gt;
&lt;li&gt;easier integration with modern plugin ecosystems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That means some of the most painful parts of embedded development can start to be offloaded to AI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;finding functions and call chains in an existing project&lt;/li&gt;
&lt;li&gt;quickly generating initialization code&lt;/li&gt;
&lt;li&gt;adding a simple UART print&lt;/li&gt;
&lt;li&gt;explaining the structure of old projects&lt;/li&gt;
&lt;li&gt;making small, localized edits in existing files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These tasks were never impossible before. They were just awkward. The meaning of &lt;code&gt;VS Code&lt;/code&gt; is not only that it looks better. It is that it can more naturally become the workbench for AI collaboration.&lt;/p&gt;
&lt;h2 id=&#34;the-key-patch-connect-vs-code-to-keil-projects-with-plugins&#34;&gt;The key patch: connect VS Code to Keil projects with plugins
&lt;/h2&gt;&lt;p&gt;Whether this workflow works in practice depends on one thing: can you actually connect &lt;code&gt;VS Code&lt;/code&gt; to a &lt;code&gt;Keil&lt;/code&gt; project?&lt;/p&gt;
&lt;p&gt;A very practical class of plugins does exactly that by letting &lt;code&gt;VS Code&lt;/code&gt; read &lt;code&gt;Keil&lt;/code&gt; project structure and call &lt;code&gt;Keil&lt;/code&gt; backend programs from inside the editor for tasks such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;opening a project&lt;/li&gt;
&lt;li&gt;building&lt;/li&gt;
&lt;li&gt;downloading&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That way, you do not have to constantly jump between two interfaces just to write code. You only return to &lt;code&gt;Keil&lt;/code&gt; for the heavier debugging work such as stepping, breakpoints, and register inspection.&lt;/p&gt;
&lt;p&gt;The real value of these plugins is not merely saving a few window switches. It is making the workflow continuous.&lt;/p&gt;
&lt;h2 id=&#34;do-not-overlook-the-basic-cc-plugin-setup&#34;&gt;Do not overlook the basic C/C++ plugin setup
&lt;/h2&gt;&lt;p&gt;If you want to use &lt;code&gt;VS Code&lt;/code&gt; as the main embedded editor, one basic but often ignored point is this: you must set up the core C/C++ plugin and project indexing properly.&lt;/p&gt;
&lt;p&gt;Otherwise, you will run into a series of issues that seriously hurt the experience:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;jump-to-definition does not work&lt;/li&gt;
&lt;li&gt;false red underlines appear&lt;/li&gt;
&lt;li&gt;completion quality is poor&lt;/li&gt;
&lt;li&gt;header relationships become messy&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many people assume this means &lt;code&gt;VS Code&lt;/code&gt; is not suitable for embedded work. In practice, it is often just that the indexing and plugin configuration are not connected correctly.&lt;/p&gt;
&lt;p&gt;Once that layer is configured properly, &lt;code&gt;VS Code&lt;/code&gt; can actually deliver on its strengths in reading large projects, searching symbols, and using AI to assist with targeted code changes.&lt;/p&gt;
&lt;h2 id=&#34;who-this-workflow-fits-best&#34;&gt;Who this workflow fits best
&lt;/h2&gt;&lt;p&gt;I think this combination works especially well for the following groups.&lt;/p&gt;
&lt;h3 id=&#34;1-people-who-already-have-a-large-amount-of-keil-based-projects&#34;&gt;1. People who already have a large amount of Keil-based projects
&lt;/h3&gt;&lt;p&gt;If your company projects, course materials, or historical code all revolve around &lt;code&gt;Keil&lt;/code&gt;, there is no reason to throw that ecosystem away just for the sake of looking modern. Keep &lt;code&gt;Keil&lt;/code&gt;, then add &lt;code&gt;VS Code&lt;/code&gt; as the front end. That is usually the lowest-cost transition.&lt;/p&gt;
&lt;h3 id=&#34;2-people-who-want-ai-to-help-with-embedded-coding&#34;&gt;2. People who want AI to help with embedded coding
&lt;/h3&gt;&lt;p&gt;If you already like using AI to explain functions, generate boilerplate, or make local logic changes, &lt;code&gt;VS Code&lt;/code&gt; will take on that role more naturally than traditional embedded IDEs.&lt;/p&gt;
&lt;h3 id=&#34;3-people-who-want-to-balance-learning-materials-and-real-projects&#34;&gt;3. People who want to balance learning materials and real projects
&lt;/h3&gt;&lt;p&gt;Many tutorials are still built around &lt;code&gt;Keil&lt;/code&gt;, but your own workflow does not need to stay stuck in that era. Treat &lt;code&gt;Keil&lt;/code&gt; as the compatibility layer and &lt;code&gt;VS Code&lt;/code&gt; as the productivity layer, and the balance becomes much better.&lt;/p&gt;
&lt;h2 id=&#34;closing&#34;&gt;Closing
&lt;/h2&gt;&lt;p&gt;By 2026, the key question in embedded development environments is no longer just which IDE has more features. It is which combination best fits how people actually work today.&lt;/p&gt;
&lt;p&gt;If you only want to get started quickly, &lt;code&gt;STM32CubeIDE&lt;/code&gt; still has its place. If you need to inherit a large amount of existing engineering reality, &lt;code&gt;Keil&lt;/code&gt; is still unavoidable. But if you also want to bring in a modern editing experience and AI collaboration, the more practical answer is often this:&lt;/p&gt;
&lt;p&gt;let &lt;code&gt;Keil&lt;/code&gt; handle build and debugging, and let &lt;code&gt;VS Code&lt;/code&gt; handle writing code.&lt;/p&gt;
&lt;p&gt;It may not be the only answer, but it is very likely one of the least awkward answers available today.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>CH347 Resource Guide: Drivers, Tools, and SPI Flash Programming</title>
        <link>https://knightli.com/en/2026/04/03/ch347-resources-drivers-tools/</link>
        <pubDate>Fri, 03 Apr 2026 10:00:00 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/03/ch347-resources-drivers-tools/</guid>
        <description>&lt;p&gt;This post summarizes the CH347 resources I use most often, with one goal: get you from setup to debugging/programming as quickly as possible.&lt;/p&gt;
&lt;p&gt;If you are new to CH347, prepare your environment in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check the official product page first&lt;/li&gt;
&lt;li&gt;Install the correct driver for your use case&lt;/li&gt;
&lt;li&gt;Prepare an SPI Flash tool and verify connectivity&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;official-entry&#34;&gt;Official Entry
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;CH347 product page: &lt;a class=&#34;link&#34; href=&#34;https://www.wch.cn/products/CH347.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.wch.cn/products/CH347.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is best to download from the official page first, to avoid outdated or unknown-source driver packages.&lt;/p&gt;
&lt;h2 id=&#34;common-drivers&#34;&gt;Common Drivers
&lt;/h2&gt;&lt;h3 id=&#34;1-ch341parexe&#34;&gt;1) &lt;code&gt;CH341PAR.EXE&lt;/code&gt;
&lt;/h3&gt;&lt;p&gt;Purpose:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;USB-to-JTAG / SPI / I2C / Parallel / GPIO interface driver&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Typical use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multi-protocol communication and low-level interface debugging with CH347&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;2-ch343serexe&#34;&gt;2) &lt;code&gt;CH343SER.EXE&lt;/code&gt;
&lt;/h3&gt;&lt;p&gt;Purpose:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vendor Windows driver for high-speed USB-to-Serial&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Typical use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using CH347 mainly as a serial tool, especially at higher baud rates&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;spi-flash-programming-tool&#34;&gt;SPI Flash Programming Tool
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;AsProgrammer: &lt;a class=&#34;link&#34; href=&#34;https://github.com/nofeletru/UsbAsp-flash&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://github.com/nofeletru/UsbAsp-flash&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Common tasks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Detect SPI NOR Flash&lt;/li&gt;
&lt;li&gt;Read chip ID&lt;/li&gt;
&lt;li&gt;Back up original firmware&lt;/li&gt;
&lt;li&gt;Erase / write / verify firmware&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;recommended-workflow-to-avoid-common-mistakes&#34;&gt;Recommended Workflow (to avoid common mistakes)
&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;After installing drivers, replug the device and confirm detection in Device Manager.&lt;/li&gt;
&lt;li&gt;Before first write, do one full read + backup of the original contents.&lt;/li&gt;
&lt;li&gt;Always run verify after writing. Do not rely only on a &amp;ldquo;write successful&amp;rdquo; message.&lt;/li&gt;
&lt;li&gt;If the chip is not detected, check power, voltage level, and wiring before checking software settings.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;quick-troubleshooting&#34;&gt;Quick Troubleshooting
&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;Device is plugged in but not visible in tools: usually driver loading issues, or a power-only USB cable.&lt;/li&gt;
&lt;li&gt;Device is detected but read/write fails: first check wiring order, shared ground, and power stability.&lt;/li&gt;
&lt;li&gt;Unstable behavior at high speed: lower read/write speed first, then increase gradually after stability is confirmed.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;CH347 is not hard to use. The key is to get four things right: driver, tool, wiring, and verification.&lt;/p&gt;
&lt;p&gt;The resources above cover most beginner and day-to-day maintenance scenarios, and should get you to a stable workflow quickly.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
