-
Notifications
You must be signed in to change notification settings - Fork 15
how to build flash and use examples on windows Eclipse IDE
Benjamin Vernoux edited this page Nov 17, 2022
·
9 revisions
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
- 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
- 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:"
- Start
mingw64
cd ~
git clone --recursive https://github.com/hydrausb3/hydrausb3_fw.git
- 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 Projectsappears- Click on
Browsenear "Select root directory:" and choosehydrausb3_fwdirectory- Click on
Select Folder
- Click on
- Select the different project(s) you want to import (in
Projects) - Click on
Finish
- Click on
- Select
- In Import Windows choose
- 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 ProjectorBuild 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 with MSYS2/MINGW64
- Install pkg-config and libusb-1.0-0-dev
pacman -S mingw-w64-x86_64-pkgconf mingw-w64-x86_64-libusb
- Start
mingw64
cd ~
git clone --recursive https://github.com/hydrausb3/wch-ch56x-isp.git
cd wch-ch56x-isp
make
- On HydraUSB3 (disconnect any cable/power supply) and add a Jumper on
Flash Mode P3 - Connect “USB A Male to USB A male cable” to HydraUSB3 then the other side to PC(USB2 or USB3 port)
- The PC shall detect the WCH CH569W Bootloader (enumeration with USB2 HS)
- Download & Execute Zadig 2.7
- Install driver "WinUSB" with Zadig for the
USB ID 4348 55E0- Note after 10s of inactivity the bootloader exit and run the program
- You can just reset the board to re-enter in bootloader by pressing(1s) & releasing
3V3 DISABLEbutton(at left of USB3 connector)
- You can just reset the board to re-enter in bootloader by pressing(1s) & releasing
- Note after 10s of inactivity the bootloader exit and run the program
- Install driver "WinUSB" with Zadig for the
- You can check it is well recognized with windows
PowerShellwith commandGet-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB\\VID_4348' } | Format-Listwhich shall findHardwareID : {USB\VID_4348&PID_55E0&REV_2700, USB\VID_4348&PID_55E0} Manufacturer : WinChipHead PNPClass : USBDevice Present : True Service : WinUSB - Note after 10s of inactivity the bootloader exit and run the program
- You can just reset the board to re-enter in bootloader by pressing(1s) & releasing
3V3 DISABLEbutton(at left of USB3 connector)
- You can just reset the board to re-enter in bootloader by pressing(1s) & releasing
- Download & Execute Zadig 2.7
- Launch(quickly to avoid 10s timeout)
wch-ch56x-ispto flash(and verify) the hydrausb3_fw example (hereHydraUSB3_Blink_ULED)./wch-ch56x-isp -v flash ~/hydrausb3_fw/HydraUSB3_Blink_ULED/obj/HydraUSB3_Blink_ULED.bin
- On HydraUSB3 Remove the Jumper on
Flash Mode P3 - On HydraUSB3 Press(1s) & Release the
3V3 DISABLEbutton(at left of USB3 connector) to reset the board
- The HydraUSB3 board shall execute the HydraUSB3_Blink_ULED firmware example by blinking the ULED
- Note: If you press UBTN the ULED blink very fast