]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - README
Reorganizing CMake build system.
[kiibohd-controller.git] / README
diff --git a/README b/README
index 93a7866874cb907b80a3a3e1184bc5f9a9719884..27df1cb83e5bb35507ffea3a82bacd8bacc9e16b 100644 (file)
--- a/README
+++ b/README
@@ -15,13 +15,12 @@ Below listed are the Arch Linux pacman names, AUR packages may be required.
 
 These depend a bit on which targets you are trying to build, but the general one:
 - cmake (2.8 and higher)
-- Teensy Loader (http://pjrc.com/teensy/loader.html)
 
 
 AVR Specific (Teensy 1.0/++,2.0/++) (try to use something recent, suggested versions below)
-- avr-gcc      (4.8.0)
-- avr-binutils (2.23.2)
-- avr-libc     (1.8.0)
+- avr-gcc      (~4.8.0)
+- avr-binutils (~2.23.2)
+- avr-libc     (~1.8.0)
 
 
 ARM Specific (Teensy 3.0/3.1) (Sourcery CodeBench Lite for ARM EABI
@@ -45,10 +44,8 @@ First make sure Cygwin is installed - http://www.cygwin.com/ - 32bit or 64bit is
 - git (needed for some compilation info)
 - cmake
 - gcc-core
-- gcc-g++ or gcc-c++
-
-And make sure CMake is *NOT* installed through Cygwin. This is extremely important.
-If this is not possible, you'll have to play with your paths in Cygwin to prioritize the Windows version of CMake.
+- libusb1.0
+- libusb1.0-devel
 
 Also install the Windows version of CMake - http://cmake.org/cmake/resources/software.html
 This is in addition to the Cygwin version. This is an easier alternative to installing another C compiler.
@@ -57,6 +54,7 @@ Add the following line to your .bashrc, making sure the CMake path is correct:
 
 Next, install the compiler(s) you want.
 
+
  ---------
 | AVR GCC |
  ---------
@@ -82,85 +80,33 @@ Use the installer and make sure you add the binaries to your path within the ins
 
 
 
-----------------------
-Selecting Architecture
-----------------------
-
-This is where you choose which architecture you want to build for.
-The options are:
- - Teensy 1.0   (Not tested)
- - Teensy 1.0++ (Not tested)
- - Teensy 2.0
- - Teensy 2.0++
- - Teensy 3.0
- - Teensy 3.1
-
-Open up CMakeLists.txt in your favourite text editor.
-You are looking for:
-
-       ###
-       Compiler Family
-       #
-
-       #| Specify the compiler family to use
-       #| Currently only supports AVR and ARM
-       #| "avr"       # Teensy   1.0
-       #| "avr"       # Teensy   2.0
-       #| "avr"       # Teensy++ 1.0
-       #| "avr"       # Teensy++ 2.0
-       #| "arm"       # Teensy   3.0
-       #| "arm"       # Teensy   3.1
-
-       set( COMPILER_FAMILY "avr" )
-
-
-Just change the COMPILER_FAMILY variable to whatever you are trying to build for.
-
-NOTE: If you change this option, you will *may* to delete the build directory that is created in the Building sections below.
-
-
-
 ----------------------
 Selecting Microcontroller
 ----------------------
 
-Even if you selected the "avr" family of microcontroller architectures, you will still need to specify a target microcontroller (or once more ARM microcontrollers are supported).
+This is where you select the chip you want to compile for.
+The build system will automatically select the compiler needed to compile for your chip.
 
-Open up avr.cmake (or arm.cmake) in your favourite text editor.
+Open up CMakeLists.txt in your favourite text editor.
 You are looking for:
 
        ###
-       # Atmel Defines and Linker Options
+       # Chip Selection
        #
 
-       #| MCU Name
-       #| You _MUST_ set this to match the board you are using
-       #| type "make clean" after changing this, so all files will be rebuilt
+       #| You _MUST_ set this to match the microcontroller you are trying to compile for
+       #| You _MUST_ clean the build directory if you change this value
        #|
-       #| "at90usb162"       # Teensy   1.0
-       #| "atmega32u4"       # Teensy   2.0
-       #| "at90usb646"       # Teensy++ 1.0
-       #| "at90usb1286"      # Teensy++ 2.0
-
-       set( MCU "at90usb1286" )
+       set( CHIP
+       #       "at90usb162"       # Teensy   1.0 (avr)
+       #       "atmega32u4"       # Teensy   2.0 (avr)
+       #       "at90usb646"       # Teensy++ 1.0 (avr)
+               "at90usb1286"      # Teensy++ 2.0 (avr)
+       #       "mk20dx128"        # Teensy   3.0 (arm)
+       #       "mk20dx256"        # Teensy   3.1 (arm)
+       )
 
-*OR*
-
-       ###
-       # ARM Defines and Linker Options
-       #
-
-       #| Chip Name (Linker)
-       #| You _MUST_ set this to match the board you are using
-       #| type "make clean" after changing this, so all files will be rebuilt
-       #|
-       #| "mk20dx128"        # Teensy   3.0
-       #| "mk20dx256"        # Teensy   3.1
-
-       set( CHIP "mk20dx128" )
-
-
-Just change the CHIP variable to the microcontroller you are trying to build for.
+Just uncomment the chip you want, and comment out the old one.
 
 NOTE: If you change this option, you will *need* to delete the build directory that is created in the Building sections below.
 
@@ -203,7 +149,7 @@ The Debug Module enables various things like the Teensy LED on errors, debug ter
 
 
 
-Open up setup.cmake in your favourite text editor.
+Open up CMakeLists.txt in your favourite text editor.
 Look for:
 
        ###