# Compiling MakeCode bootloader for custom STM32 boards on Ubuntu 16.04 under WSL

**URL:** <https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588>\
**Category:** Maker\
**Created:** [April 3, 2020, 3:19pm UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588 "2020-04-03T15:19:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![204maker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/204maker/32/447_2.png) [@204maker](https://forum.makecode.com/u/204maker)\
**Post date:** [April 3, 2020, 3:19pm UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588/1 "2020-04-03T15:19:13Z")

</div>

- Are there makers in the forum using Ubuntu on Windows Subsystem Linux to compile MakeCode bootloaders for STM32 devices (i.e. F030, F103, F401 etc.)?

- May I ask how did you setup the STM32 libraries for compilation?

- What is the easiest method to compile for STM32 when running on Windows 10?

---

<div class="post-metadata">

**Author:** ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)\
**Post date:** [April 3, 2020, 3:34pm UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588/2 "2020-04-03T15:34:20Z")

</div>

This is a question for @mmoskal.

---

<div class="post-metadata">

**Author:** ![mmoskal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmoskal/32/20_2.png) [@mmoskal](https://forum.makecode.com/u/mmoskal)\
**Post date:** [April 3, 2020, 3:50pm UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588/3 "2020-04-03T15:50:53Z")

</div>

I got it to work some time ago with the Ubuntu on WSL2. I don’t think there’s anything special - you just need `arm-none-eabi` in your PATH. The BMP debugger will probably not work with WSL though…

---

<div class="post-metadata">

**Author:** ![204maker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/204maker/32/447_2.png) [@204maker](https://forum.makecode.com/u/204maker)\
**Post date:** [April 7, 2020, 2:54pm UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588/4 "2020-04-07T14:54:07Z")

</div>

Are you using libopencm3 and GCC for STM32 development in MakeCode?

---

<div class="post-metadata">

**Author:** ![mmoskal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmoskal/32/20_2.png) [@mmoskal](https://forum.makecode.com/u/mmoskal)\
**Post date:** [April 7, 2020, 5:11pm UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588/5 "2020-04-07T17:11:58Z")

</div>

GCC yes, for all embedded development.

libopencm3 I only used in bootloaders, since they were based on existing bootloaders.

I usually use STM libraries. The codal is mostly using the HAL [https://github.com/lancaster-university/codal-stm32](https://github.com/lancaster-university/codal-stm32) and I’ve been working on new JACDAC implementation for STM32F0 with the LL STM drivers (which I would recommend over HAL).

---

<div class="post-metadata">

**Author:** ![gbraad](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gbraad/32/338_2.png) [@gbraad](https://forum.makecode.com/u/gbraad)\
**Post date:** [April 8, 2020, 6:00am UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588/6 "2020-04-08T06:00:27Z")

</div>

not using WSL, but WSL2. Basically I run my own distro on it, but it does not need anything special…

Note: WSL is not ideal (either run a VM or WSL2, which is technically the same).

---

<div class="post-metadata">

**Author:** ![204maker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/204maker/32/447_2.png) [@204maker](https://forum.makecode.com/u/204maker)\
**Post date:** [April 13, 2020, 4:41pm UTC](https://forum.makecode.com/t/compiling-makecode-bootloader-for-custom-stm32-boards-on-ubuntu-16-04-under-wsl/1588/7 "2020-04-13T16:41:45Z")

</div>

How did you setup your compiler toolchain?  
I need some tips here.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/11322e1997778080680e59c46766f7ca442fb1f6.jpeg)
