analogdevicesinc / msdk

Software Development Kit for Analog Device's MAX-series microcontrollers
Apache License 2.0
60 stars 76 forks source link

fix(Build): Fix broken `make flash.openocd` on Windows + MSYS2 #876

Closed Jake-Carter closed 6 months ago

Jake-Carter commented 6 months ago

Description

The MSDK includes Makefile targets for flashing via a flash.mk file. This target depends on a rule for creating a .hex file. The .hex file is added as an explicit dependency of the flashing targets so that it's built before attempting the flash. On Windows + MSYS2 the file path was mal-formed. cygpath is required to correct the path, but the code that detected the availability of cygpath was not working correctly.

This PR fixes the OS auto-detection in flash.mk, which fixes make flash.openocd on Windows.

Fixes #872

Checklist Before Requesting Review