File tree 6 files changed +79
-0
lines changed
6 files changed +79
-0
lines changed Original file line number Diff line number Diff line change
1
+ .idea
2
+ * .iml
3
+
4
+ build
5
+ build- *
6
+ cmake-build- *
7
+
8
+ target
9
+ .local
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.0)
2
+
3
+ if (NOT FIRMWARE_DIR)
4
+ set (FIRMWARE_DIR /usr/local/src/particle/firmware)
5
+ endif ()
6
+
7
+ if (NOT CROSS_COMPILER_PREFIX)
8
+ set (CROSS_COMPILER_PREFIX "/usr/local/gcc-arm" )
9
+ endif ()
10
+
11
+ set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
12
+
13
+ set (CMAKE_C_COMPILER "${CROSS_COMPILER_PREFIX} /bin/arm-none-eabi-gcc" )
14
+ set (CMAKE_CXX_COMPILER "${CROSS_COMPILER_PREFIX} /bin/arm-none-eabi-g++" )
15
+ set (CMAKE_ASM_COMPILER "${CROSS_COMPILER_PREFIX} /bin/arm-none-eabi-as" )
16
+ set (CMAKE_AR "${CROSS_COMPILER_PREFIX} /bin/arm-none-eabi-ar" CACHE FILEPATH "Archiver" )
17
+ set (CMAKE_RANLIB "${CROSS_COMPILER_PREFIX} /bin/arm-none-eabi-ranlib" )
18
+
19
+ project (feather_oled_clicker)
20
+ set (CMAKE_CXX_STANDARD 14)
21
+ set (CMAKE_VERBOSE_MAKEFILE OFF )
22
+
23
+ if (NOT EXISTS ${CMAKE_BINARY_DIR} /conanbuildinfo.cmake)
24
+ message (FATAL_ERROR "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first" )
25
+ endif ()
26
+
27
+ include (${CMAKE_BINARY_DIR} /conanbuildinfo.cmake)
28
+ conan_basic_setup(NO_OUTPUT_DIRS)
29
+ set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake ${CONAN_CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH} )
30
+
31
+ find_package (Particle)
32
+ add_particle_remote_app(src)
Original file line number Diff line number Diff line change
1
+ clicker
2
+ ===
3
+
4
+ clicks
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ if [ -z " $1 " ]; then echo " usage: $0 <platform>" ; exit 1; fi
4
+
5
+ readonly platform=" $1 "
6
+ cmake_args=(" -DPLATFORM=$platform " )
7
+
8
+ readonly builddir=" build-$platform "
9
+
10
+ readonly cross_compiler_root=${CROSS_COMPILER_ROOT:-/ usr/ local/ gcc-arm}
11
+ readonly compiler_major_version=$( " ${cross_compiler_root} /bin/arm-none-eabi-gcc" -dumpspecs | grep * version -A1 | tail -n1 | cut -d. -f1)
12
+
13
+ if [[ " $2 " != " quick" ]]; then
14
+ rm -rf " $builddir "
15
+ mkdir " $builddir "
16
+ fi
17
+
18
+ if [ ! -d " $builddir " ]; then mkdir " $builddir " ; fi
19
+
20
+ conan install . -if=" $builddir " -s compiler.version=" $compiler_major_version "
21
+ cd " $builddir "
22
+ cmake .. ${cmake_args[@]}
23
+ make -j1
Original file line number Diff line number Diff line change
1
+ [requires]
2
+ particle-common/snapshot@jw3/stable
3
+ feather-oled/snapshot@jw3/stable
4
+
5
+ [generators]
6
+ cmake
Original file line number Diff line number Diff line change
1
+ void setup () {
2
+ }
3
+
4
+ void loop () {
5
+ }
You can’t perform that action at this time.
0 commit comments