Automatic Setup for Windows firmware build/flash

After following this awesome tutorial video by @seulater, I figured it would be helpful to have these steps automated.

I created a Chocolatey package to auto install all the dependencies outlined on the firmware github readme.
The package is available in the chocolatey gallery. https://chocolatey.org/packages/sparkcore-build/

TL;DR and you know chocolately. Package name is sparkcore-build.

Longer version

If you’re a windows user and you don’t know chocolatey, you’re missing out!
To install chocolatey just run this at a command prompt (their instructions) …

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

then to install all the SparkCore build dependencies…

cinst sparkcore-build

That’s it! This covers all of section 1(Download and Install Dependencies) from the instructions.
Now you can skip straight down to section 2(Download and Build Repositories).

3 Likes

There were a couple of issues with the Make and Zadig packages. All corrected now.

To update…

cup sparkcore-build
1 Like

I get choco errrors on

gcc-arm v4.8.1

Write-Error : gcc-arm did not finish successfully. Boo to
the chocolatey gods!


[ERROR] Exception calling “GetResponse” with
"0" argument(s): "The underlying c

onnection was closed: An unexpected error occurred on a
send."


At C:\Documents and Settings\All Users\Application
Data\chocolatey\chocolateyin

stall\helpers\functions\Write-ChocolateyFailure.ps1:30
char:14

  • Write-Error
    <<<< $errorMessage

CategoryInfo : NotSpecified:
(:slight_smile: [Write-Error], WriteErrorExcep

tion

+ FullyQualifiedErrorId

: Microsoft.PowerShell.Commands.WriteErrorExceptio

n,Write-Error

Write-Error : Package ‘gcc-arm v4.8.1’ did not install
successfully: Exception

calling “GetResponse” with "0"
argument(s): "The underlying connection was clos

ed: An unexpected error occurred on a send."

At C:\Documents and Settings\All Users\Application
Data\chocolatey\chocolateyin

stall\functions\Chocolatey-NuGet.ps1:90 char:28

Write-Error <<<<
"Package `’$installedPackageName v$installe

dPackageVersion`’ did not install successfully:
$($_.Exception.Message)"

+

CategoryInfo : NotSpecified:
(:slight_smile: [Write-Error], WriteErrorExcep

tion
AND

dfu-util v0.7.1

Write-Error : dfu-util did not finish successfully. Boo to
the chocolatey gods!


[ERROR] Exception calling “GetResponse” with
"0" argument(s): "The remote name

could not be resolved: ‘dfu-util.gnumonks.org’"


At C:\Documents and Settings\All Users\Application
Data\chocolatey\chocolateyin

stall\helpers\functions\Write-ChocolateyFailure.ps1:30
char:14

  • Write-Error
    <<<< $errorMessage

CategoryInfo : NotSpecified:
(:slight_smile: [Write-Error], WriteErrorExcep

tion

+

FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio

n,Write-Error

Write-Error : Package ‘dfu-util v0.7.1’ did not install
successfully: Exception

calling
"GetResponse" with “0” argument(s): "The remote name
could not be reso

lved: ‘dfu-util.gnumonks.org’"

At C:\Documents and Settings\All Users\Application
Data\chocolatey\chocolateyin

stall\functions\Chocolatey-NuGet.ps1:90 char:28

Write-Error <<<<
"Package `’$installedPackageName v$installe

dPackageVersion`’ did not install successfully:
$($_.Exception.Message)"

+

CategoryInfo : NotSpecified:
(:slight_smile: [Write-Error], WriteErrorExcep

tion