1

How to configure codeblocks compiler and debugger with msys2 ?

I found an answer related here, but I don't find very usefull as I use windows 7, instead linux ;)

What I want to achive is integrating esp-idf embedded system in codeblocks.

Is this even possible ? Anyone ?

Cristian F.
  • 328
  • 2
  • 12

1 Answers1

1
  1. Install CodeBlocks 20.03 without the compiler (installer: codeblocks-20.03-setup.exe, about 37.5 Mb)
  2. Download and install Msys2 by following the instructions on the homepage
  3. Install the mingw-w64 toolchain (open the Msys64 shell and run the command: pacman -S git mingw-w64-x86_64-cmake make mingw-w64-x86_64-toolchain)
  4. Now you need to configure the compiler in CodeBlocks.
    Go to Settings -> Compiler...
    Settings menu

    Click on Toolchain executables tab and browse for mingw64 folder (without bin).
    Edit the executable file names as gcc.exe, g++.exe and g++.exe
    Click Ok to confirm

    Compiler setting
  5. Go to Settings -> Debugger... and configure gdb.exe as default debugger (browse for the gdb.exe file into the bin directory)

    Debugger setting

    Now the GCC compiler and the GDB debugger are configured.
    You can use pacman from the Msys2 shell, to download and install or uninstall a lot of packages.
    I don't know esp-idf but it seems to me that this sdk is not distributed as a msys2 package.
Sergio
  • 891
  • 9
  • 27