<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>ch32v307 &amp;mdash; Gerrit Niezen</title>
    <link>https://gerritniezen.com/tag:ch32v307</link>
    <description>Maker of open-source software and hardware.</description>
    <pubDate>Wed, 15 Apr 2026 22:59:18 +0000</pubDate>
    <image>
      <url>https://i.snap.as/aMPXpIot.png</url>
      <title>ch32v307 &amp;mdash; Gerrit Niezen</title>
      <link>https://gerritniezen.com/tag:ch32v307</link>
    </image>
    <item>
      <title>Getting started with RT-Thread on the CH32V307</title>
      <link>https://gerritniezen.com/getting-started-with-rt-thread-on-the-ch32v307?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I just received a WCH CH32V307 RISC-V development board as part of the Hack It! RISC-V Design Challenge. What follows is a simple tutorial in getting started with running an RT-Thread example on the CH32V307 development board.&#xA;&#xA;Installing and setting up the IDE&#xA;&#xA;Download MounRiver Studio and install it. &#xA;Download or git clone the OpenWCH CH32V7307 repo.&#xA;Load the RT-Thread project at ch32v307/EVT/EXAM/RT-thread/rt-thread into MounRiver Studio.&#xA;&#xA;Setting up the debugger&#xA;&#xA;Go to Run -  Debug Configurations..&#xA;Select GDB OpenOCD WCH Debugging / rt-thread.elf&#xA;Click on the Debugger tab&#xA;Enter the following under Config options: -f wch-riscv.cfg&#xA;Click Apply and then Debug&#xA;&#xA;Setting up debug options in MounRiver Studio&#xA;&#xA;Running the example&#xA;&#xA;Plug your development board into USB port P9&#xA;Make sure the project is selected in the left-hand pane&#xA;Click the arrow to the right of the Run button, and select Run As -  OpenOCD WCH Debug:&#xA;&#xA;Screenshot of Run As&#xA;&#xA;If all goes well, it should build and and start running the example. If not, you may need to click Project-  Rebuild. Now, open up rt-thread/user/main.c in the project, and you&#39;ll see that it is supposed to flash an LED and print to the terminal. Now you may wonder: &#34;Why am I not seeing LED1 flashing on the board?&#34; I wondered this too, and found this in the CH32V307 evaluation board manual:&#xA;&#xA;  3. LED: Controlled by connecting the extension connector J3 to the IO port of the master MCU &#xA;&#xA;What this actually means is that you need a jumper cable to connect pin LED1, which is on the extension connector J3, to pin PA0, which is on both the extension connector and the Arduino interface. If you wire this up correctly, you&#39;ll hopefully see the LED blinking:&#xA;&#xA;Blinking LED on CH32V307 dev board&#xA;&#xA;If you also want to see the RT-Thread terminal, just connect to the board using your favourite serial terminal at 115200 bps, e.g. using minicom:&#xA;&#xA;minicom -b 115200 -D /dev/ttyACM0&#xA;&#xA;RT-Thread terminal in minicom&#xA;&#xA;You don&#39;t need a separate USB-serial adapter, as the serial interface is provided by the WC-Link onboard the development board.&#xA;&#xA;Any feedback and comments are appreciated!&#xA;&#xA;#riscv #wch #electronics #ch32v307 #rtthread&#xA;&#xA;a href=&#34;https://remark.as/p/gerritniezen.com/getting-started-with-rt-thread-on-the-ch32v307&#34;Discuss.../a&#xA;&#xA;iComment on this post/i&#xD;&#xA;div id=&#34;cusdis_thread&#34;/div]]&gt;</description>
      <content:encoded><![CDATA[<p>I just received a <a href="https://www.cnx-software.com/2022/01/21/wch-ch32v307-risc-v-development-board-features-8-uart-ports-controlled-over-ethernet/">WCH CH32V307 RISC-V development board</a> as part of the <a href="https://www.hackster.io/contests/hackitriscv">Hack It! RISC-V Design Challenge</a>. What follows is a simple tutorial in getting started with running an RT-Thread example on the CH32V307 development board.</p>

<h2 id="installing-and-setting-up-the-ide" id="installing-and-setting-up-the-ide">Installing and setting up the IDE</h2>
<ul><li>Download <a href="http://www.mounriver.com/download">MounRiver Studio</a> and install it.</li>
<li>Download or <code>git clone</code> the <a href="https://github.com/openwch/ch32v307">OpenWCH CH32V7307 repo</a>.</li>
<li>Load the RT-Thread project at <code>ch32v307/EVT/EXAM/RT-thread/rt-thread</code> into MounRiver Studio.</li></ul>

<h3 id="setting-up-the-debugger" id="setting-up-the-debugger">Setting up the debugger</h3>
<ul><li>Go to Run –&gt; Debug Configurations..</li>
<li>Select GDB OpenOCD WCH Debugging / rt-thread.elf</li>
<li>Click on the Debugger tab</li>
<li>Enter the following under Config options: <code>-f wch-riscv.cfg</code></li>
<li>Click Apply and then Debug</li></ul>

<p><img src="https://i.snap.as/0PeO523j.png" alt="Setting up debug options in MounRiver Studio"/></p>

<h2 id="running-the-example" id="running-the-example">Running the example</h2>
<ul><li>Plug your development board into USB port P9</li>
<li>Make sure the project is selected in the left-hand pane</li>
<li>Click the arrow to the right of the Run button, and select Run As –&gt; OpenOCD WCH Debug:</li></ul>

<p><img src="https://i.snap.as/WRjmv1W5.png" alt="Screenshot of Run As"/></p>

<p>If all goes well, it should build and and start running the example. If not, you may need to click Project-&gt; Rebuild. Now, open up <code>rt-thread/user/main.c</code> in the project, and you&#39;ll see that it is supposed to flash an LED and print to the terminal. Now you may wonder: “Why am I not seeing LED1 flashing on the board?” I wondered this too, and found this in the <a href="https://github.com/openwch/ch32v307/blob/main/EVT/PUB/CH32V30xEVT%20Evaluation%20Board%20Manual.pdf">CH32V307 evaluation board manual</a>:</p>

<blockquote><ol><li>LED: Controlled by connecting the extension connector J3 to the IO port of the master MCU</li></ol>
</blockquote>

<p>What this actually means is that you need a jumper cable to connect pin LED1, which is on the extension connector J3, to pin PA0, which is on both the extension connector and the Arduino interface. If you wire this up correctly, you&#39;ll hopefully see the LED blinking:</p>

<p><img src="https://i.snap.as/cU2FDESk.gif" alt="Blinking LED on CH32V307 dev board"/></p>

<p>If you also want to see the RT-Thread terminal, just connect to the board using your favourite serial terminal at 115200 bps, e.g. using minicom:</p>

<p><code>minicom -b 115200 -D /dev/ttyACM0</code></p>

<p><img src="https://i.snap.as/0wHSfnRF.png" alt="RT-Thread terminal in minicom"/></p>

<p>You don&#39;t need a separate USB-serial adapter, as the serial interface is provided by the WC-Link onboard the development board.</p>

<p>Any feedback and comments are appreciated!</p>

<p><a href="https://gerritniezen.com/tag:riscv" class="hashtag"><span>#</span><span class="p-category">riscv</span></a> <a href="https://gerritniezen.com/tag:wch" class="hashtag"><span>#</span><span class="p-category">wch</span></a> <a href="https://gerritniezen.com/tag:electronics" class="hashtag"><span>#</span><span class="p-category">electronics</span></a> <a href="https://gerritniezen.com/tag:ch32v307" class="hashtag"><span>#</span><span class="p-category">ch32v307</span></a> <a href="https://gerritniezen.com/tag:rtthread" class="hashtag"><span>#</span><span class="p-category">rtthread</span></a></p>

<p><a href="https://remark.as/p/gerritniezen.com/getting-started-with-rt-thread-on-the-ch32v307">Discuss...</a></p>

<p><i>Comment on this post</i>
<div id="cusdis_thread" id="cusdis_thread"></div></p>
]]></content:encoded>
      <guid>https://gerritniezen.com/getting-started-with-rt-thread-on-the-ch32v307</guid>
      <pubDate>Tue, 14 Jun 2022 11:02:43 +0000</pubDate>
    </item>
  </channel>
</rss>