# ESP32 開發環境建立(Win10) **作業系統:Win 10** ## 建立esp-idf的環境 1. 從[esp-idf官網](https://docs.espressif.com/projects/esp-idf/zh_CN/v4.0/get-started/windows-setup.html)下載**esp32_win32_msys2_environment_and_toolchain-20190611.zip** 2. 解壓縮到**C:\msys32** 3. 建立資料夾esp並建立相關的SDK(v4.0) ```bash= mkdir -p ~/esp cd ~/esp git clone -b release/v4.0 --recursive https://github.com/espressif/esp-idf.git ``` 4. 建立環境變數到c:\msys32\etc\prfile.d\export_idf_path.sh下 ```bash= export IDF_PATH=$HOME/esp/esp-idf ``` ## 使用範例程式測試是否環境運作可行 1. 複製esp-idf的範例程式hello_world ```bash= cp -r ~/esp/esp-idf/examples/get-started/hello_world/ ~/esp cd hello_world make menuconfig make ``` 2. 如果成功可在建立的build資料夾地下看到對應的bin檔(hello-world.bin) ## vs code 安裝esp idf 安裝來源 Github ## 參考資料 [Add IDF_PATH to User Profile (Legacy GNU Make)](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started-legacy/add-idf_path-to-profile.html) ###### tags: `esp32`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up