Skip to content

how to build flash and use examples on windows Eclipse IDE

Benjamin Vernoux edited this page Nov 1, 2023 · 9 revisions

How to build flash and use examples on Windows with MounRiver Studio IDE

Build the firmware source code for HydraUSB3(CH569W MCU) with MounRiver Studio IDE

How to build the firmware source code for HydraUSB3(CH569 MCU) with MounRiver Studio(Eclipse based) IDE

It is recommended to use MounRiver Studio "Embedded RISC-V IDE" or "RISC-V IDE (Community)" to build the source code

  • See http://www.mounriver.com/download
  • Windows 10 x64 + MounRiver Studio Community Win V130 tested with success
    • MounRiver_Studio_Community_Win_V130.zip sha256 shall be equal to 2d0f24426841ab01d7912c0a732c74c1aca24bf77c6ad580f3ae6d6b513c53bb

Prerequisites

  • Install MSYS2/MINGW64
    • Follow all the steps including "Now MSYS2 is ready for you. You will probably want to install some tools and the mingw-w64 GCC to start compiling:"
      • pacman -S --needed base-devel mingw-w64-x86_64-toolchain git

Clone the hydrausb3_fw repository with git

  • Start mingw64
cd ~
git clone --recursive https://github.com/hydrausb3/hydrausb3_fw.git

Note: By default mingw64 directory with home/user is in C:\msys64 (if you have respected the installation using default directory for msys2)

  • To know the path from mingw64 shell to full windows path just do a right click on "mingw64 shortcut"(on your desktop) an do "Open file location" that path will corresponds to the root directory in mingw64 shell (corresponding to msys2 directory in fact which include your home, mingw64 ...)

Import examples project(s) in MounRiver Studio (it is based on Eclipse IDE)

  • Launch MounRiver Studio
    • Select a directory workspace (use the default one)
    • Select Menu File => Import...
      • In Import Windows choose General => Existing Projects into Workspace
        • Select Next >
        • A window Import Projects appears
          • Click on Browse near "Select root directory:" and choose hydrausb3_fw directory
            • Click on Select Folder
          • Select the different project(s) you want to import (in Projects)
          • Click on Finish
    • Project Explorer now show all imported projects
      • Left Click on any project (or choose multiple projects too) to highlight them
      • Right click on the highlighted project and choose Build Project or Build Projects
      • If all is ok the project shall build fine and display in Console "Build Finished. 0 errors, 0 warnings."

Flash and use hydrausb3_fw example(s) with wch-ch56x-isp

See https://github.com/hydrausb3/hydrausb3_fw/wiki/Flash-and-use-hydrausb3_fw-example-on-windows