# How to flash CubeOrangePlus using STM32CubeIDE

**URL:** <https://discuss.cubepilot.org/t/how-to-flash-cubeorangeplus-using-stm32cubeide/15250>\
**Category:** Cube Autopilot\
**Created:** [20 May 2025 06:17 UTC](https://discuss.cubepilot.org/t/how-to-flash-cubeorangeplus-using-stm32cubeide/15250 "2025-05-20T06:17:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/victor/32/8854_2.png) [@Victor](https://discuss.cubepilot.org/u/Victor)\
**Post date:** [20 May 2025 06:17 UTC](https://discuss.cubepilot.org/t/how-to-flash-cubeorangeplus-using-stm32cubeide/15250/1 "2025-05-20T06:17:33Z")

</div>

Greetings, esteemed community. I need help. I am a beginner working with this microcontroller. All I found was the standard way to flash the cube through Mission Planner. But I have my own code, my own firmware on STM32CubeIDE. How can I flash the Cube with my firmware using this development environment? I also have an ST-Link v2 available, but I also need help on how to connect these 4 cables (the board set up is HannStar K MV-4 with Type-A connector). …

---

<div class="post-metadata">

**Author:** ![CraigElder](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/craigelder/32/21_2.png) [@CraigElder](https://discuss.cubepilot.org/u/CraigElder)\
**Post date:** [21 May 2025 15:05 UTC](https://discuss.cubepilot.org/t/how-to-flash-cubeorangeplus-using-stm32cubeide/15250/2 "2025-05-21T15:05:07Z")

</div>

> [@How to activate DFU Mode on Cube Orange+](https://discuss.cubepilot.org/t/how-to-activate-dfu-mode-on-cube-orange/12704/5):
>
> With @sidbh’s help I was able to rewrite the standard bootloader (and then upload ArduPilot) to an autopilot so I’d like to share how it was done. Purchase an STLinkv2 ([search on amazon](https://www.amazon.com/s?k=STLinkv2&crid=2NZ96UDD87WGC)) Ensure you have an [ArduPilot build environment setup](https://ardupilot.org/dev/docs/building-the-code.html) If using Windows PC running WSL2 (and VSCode) as I do then you will need to download and install [WSL USB Manager](https://gitlab.com/alelec/wsl-usb-gui/-/releases) to allow WSL2 to access the PC’s USB ports Open the Cube’s carrier board and connect to the STLink as shown below [stlink-cube-wiring-corrected] …
