diff --git a/Building.md b/Building.md new file mode 100644 index 0000000000..518620bd55 --- /dev/null +++ b/Building.md @@ -0,0 +1,29 @@ +Building everything requires Maven +mvn package -DembeddedJDKHome=/home/patrick/Downloads/arm-jdk1.7.0_45/ +TODO... Explain maven.... +TODO.. how to import into eclipse correctly... + +Building C++ only +------------------ + +C++ requires cmake if not run from maven, and is much faster. +Make a new directory and then run: +``` +mkdir build && cd build +cmake .. -DCMAKE_TOOLCHAIN_FILE=../arm-toolchain.cmake +make # multicore add -j(num of cpu cores + 1), so -j3 on dual core for faster compile +make install DESTDIR=/some/dir/you/want/to/put/all/headers/and/libs #optional +`` + +Alternatively, if you like IDE's, you can import it directly into QtDeveloper, or a number of other IDE's such as Code::Blocks or Eclipse. See CMake documentation for details. +Eclipse demo: +``` +cd .. +mkdir build && cd build +cmake -DCMAKE_TOOLCHAIN_FILE=../allwpilib/arm-toolchain.cmake .. -G "Eclipse CDT4 - Unix Makefiles" +``` +and then import that directory into eclipse. Eclipse will detect a CDT project and standard tools will work. + +GCC versions +------------ +Update arm-toolchain.cmake if the triplet changes (eg using Ubuntu repo arm compiler is arm-linux-gnueabi) or in a non-standard location. Currently it assumes that the compiler is on the path. diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d4db94500..2da30cb569 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8) project(All-WPILib) set(CMAKE_BUILD_TYPE Debug) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2 -Wextra -Wno-unused-parameter") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2 -Wextra -Wno-unused-parameter -fPIC -Werror") SET(CMAKE_SKIP_BUILD_RPATH TRUE) file(GLOB_RECURSE NI_LIBS ni-libraries/*.so*) diff --git a/cmake/pom.xml b/cmake/pom.xml index c0b480a84e..d1730d87ce 100644 --- a/cmake/pom.xml +++ b/cmake/pom.xml @@ -138,8 +138,8 @@ zip - ${project.build.directory}/cmake/target-root/lib/libHALAthena.so - so + ${project.build.directory}/cmake/target-root/lib/libHALAthena.a + a diff --git a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/META-INF/MANIFEST.MF b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/META-INF/MANIFEST.MF index b321588db9..343ba0b42a 100644 --- a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/META-INF/MANIFEST.MF +++ b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/META-INF/MANIFEST.MF @@ -24,7 +24,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.cdt.debug.core;bundle-version="7.2.0", org.eclipse.cdt.debug.ui;bundle-version="7.2.0", org.eclipse.cdt.launch;bundle-version="7.1.0", - org.eclipse.cdt.launch.remote;bundle-version="2.4.0" + org.eclipse.cdt.launch.remote;bundle-version="2.4.0", + org.eclipse.cdt.debug.mi.core;bundle-version="7.2.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: edu.wpi.first.wpilib.plugins.cpp, diff --git a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/plugin.xml b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/plugin.xml index 492db0c514..1aa3c2b5e6 100644 --- a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/plugin.xml +++ b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/plugin.xml @@ -150,7 +150,7 @@ description="Deploy the WPILib project to the athena board." icon="resources/icons/wpi.ico" id="edu.wpi.first.wpilib.plugins.cpp.launching.deploy" - label="WPILib Deploy" + label="WPILib Deploy Configure Builder" modes="run,debug"> diff --git a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/.cproject b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/.cproject index bfc041ab71..08aebc6031 100644 --- a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/.cproject +++ b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/.cproject @@ -5,10 +5,10 @@ - + @@ -34,15 +34,31 @@ - -