Quick Tutorial (from memory, not tested as a clean install):
1.) Install Atmel Studio 7 (AS7) from here: http://www.microchip.com/development-to ... l-studio-7
(I'm using build 1417 as of now, before Microchip-Atmel merge)
Next we need to be set up for a makefile build in Windows. This part is harder on Windows than on Linux. There are a few ways to set things up, this tutorial post gives the path I chose to take. Basically I installed Cygwin to get the basic build tools (like make and other Linux like binutils), and installed Atmel toolchain for Windows to get the AVR gcc compiler tools. Technically I could use the toolchain installed from AS7 but elected to install standalone version of AVR toolchain separate to mirror my Linux installs on other machined. Both Cygwin and Toolchain bin folders need to be added to your path so that they can be seen from makefile builds. Once you have this set up you should be able to build ChibiOS builds from a Windows command line, or from AS7 when the project is configured for an external makefile build.
2.) Install Cygwin. I followed the instructions from here https://github.com/cleanflight/cleanfli ... Windows.md
but only added git, make and binutils. I installed mine in C:\, and added "C:\cygwin64\bin" to my PATH so the binaries can be found from a makefile build.
3.) Install Atmel AVR 8-bit Toolchain 3.5.4 - Windows from here: http://www.atmel.com/tools/atmelavrtool ... ndows.aspx
(I installed mine in C:\ root, and added "C:\avr8-gnu-toolchain\bin" to my PATH).
4.) Download appropriate SVN version of Chibios as ZIP (as there is no git mirror of latest dev version I am aware of) and unpack in folder of choice (mine is called chibios).
5.) Create a new project folder at same level as chibios (mine is named EXT_AS). I chose to copy the testhal files from chibios\testhal\AVR\EXT into EXT_AS as a starting point, remembering to edit the makefile CHIBIOS variable to point to the correct chibios relative install location (for me this was "CHIBIOS = ../chibios"). You can test that this is working with a make clean and make at the command line from this folder location and see a successful build. If you can not build from the command line then you will not be able to build as makefile build in AS7 either as AS7 basically shells out to use the external makefile build.
6.) Start up AS7 and create a new solution with a single C project. Use the Add Existing Item... to add the relevant files to you C Project. Set the project up as a makefile build under Project, Build by right clicking on the Project in Solution Explorer. You should also try to get familiar with the other makefile build option variables such as OPT, where you can turn off optimizations to better support single stepping in debug mode.
7.) Build, clean, rebuild and debug as needed within AS7
I like to use both the AVR Simulator built into AS7 (http://www.atmel.com/webdoc/simulator/s ... ud_lc.html
) for single stepping though code to understand it, and JTAG based hardware debugging to do the same on hardware. I use an old AVR Dragon https://www.digikey.com/products/en?mpa ... AGON&v=150
for hardware JTAG debug. I'm learning how to use AS7 STIM files (http://www.atmel.com/webdoc/simulator/s ... _file.html
) when working on the simulator to be able to trigger external interrupt events in the simulator. A Saleae Logic logic analyzer https://www.saleae.com/
is also a super valuable tool for hardware/software debug of AVR and ARM based projects.