Error building firmware on Windows 7

I have installed all the required tools to build on Windows and setup my path so make and the compiler are available. When I run make, I get the following error:

Building core-common-lib
Building file: ../CC3000_Host_Driver/cc3000_common.c
Invoking: ARM GCC C Compiler
mkdir -p obj/CC3000_Host_Driver/
The syntax of the command is incorrect.
make[1]: *** [obj/CC3000_Host_Driver/cc3000_common.o] Error 1
make: *** [check_external_deps] Error 2

I believe the problem is with the following lines of the makefile

RM = rm -f
MKDIR = mkdir -p

I tried changing these lines to use windows commands instead of linux commands, but ran into issues with path separators. Are there any makefiles for building locally on windows?

I found a stack overflow post with instructions on how to create platform independent makefiles. If need be I can do some research and submit a pull request with my findings.

I am using the following lines in the makefile

RM = rm -f
MKDIR = C:\Program Files (x86)\GnuWin32\bin\mkdir -p

The building process is started by a batch script placed in the source folder:

@echo off
cd /d "%~dp0"
set SRCROOT=%cd%
set MAKEBIN=C:\Program Files (x86)\GnuWin32\bin\make.exe
set GNUARM=C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4\bin
set DFU-UTIL=C:\Program Files (x86)\dfu-util-0.7\dfu-util.exe
set path=%path%;%GNUARM%
cd "%SRCROOT%"\core-firmware\build
"%MAKEBIN%" 
pause

The solution to the problem is, to add the GNU Tools path to the “path” environment variable.
If you like to contine with flashing the core you can add this to your batch file:

set FirmwareBin="%cd%"
echo Close Window to abort flashing
echo.
pause
echo Hold MODE Button and tap RESET button once. Release the MODE button when RGB LED is flashing yellow
echo.
pause
echo.
echo Now Flashing begins
cd "%FirmwareBin%"
"%DFU-UTIL%" -d 1d50:607f -a 0 -s 0x08005000:leave -D core-firmware.bin
echo.
echo finished
pause

I hope this will help you.

I’m currently encountering the same issue. I’ve tried the same approach that @Roadrunner suggested with the batch file, but I still have the same error. All the dependencies listed seem to be installed and the paths are correct.

The issue still seems to be the using the “/” instead of the “” when defining the folder path in the make files. I’m guessing that I am missing some dependency required for windows systems.

Did anyone figure this out?

Thanks for your help,
-Brent

I am having the exact same problem and tried Roadrunner’s approach with no luck. I check the syntax for mkdir and under windows, mkdir -p is incorrect as there is no such extension. Even after removing the -p from all makefiles with it, I still get an error. It comes down to the fact that windows will not use “/” as a directory seperator and thus the error. Furthermore, I found that creating a compound directory like obj\CC3000… does not work. In this case, the obj directory must first exist in order for the sub-directory to be created.

So either the make file is not compatible with the windows environment or like missleboy, I am missing something entirely.

Help me obi wan!

I discovered that if you run make from inside GitBash, everything works.

I solved the problem by modifying the makefiles to point to git versions of the rm and mkdir commands. See the Local toolchain with Windows [SOLVED] topic in the Firmware category.

In case someone else encounters this, I wrote up a bit more detail on opening a Git-aware command prompt/shell in the Local toolchain topic mentioned above:

As @deltahat suggests, GitHub for Windows sets up everything necessary to open a Cmd, Git Bash or PowerShell shell that recognizes commands like rm and mkdir.

Quick way to use it:

  • Tap the Windows key
  • Type “git shell” - just “git sh” should be enough - then press <Enter>

Bam! You’re now in a Git-aware shell. The above works for Windows 7 and Windows 8.x.

If you don’t like the type of Git shell that opened, change the default by going into the GitHub for Windows app - aka GitHub - and selecting tools then Options… where you can change the default shell to something else.