diff options
Diffstat (limited to 'puzzle/dummy')
-rw-r--r-- | puzzle/dummy/CMakeLists.txt | 14 | ||||
-rw-r--r-- | puzzle/dummy/FreeRTOSConfig.h | 4 | ||||
-rw-r--r-- | puzzle/dummy/index.dox | 9 | ||||
-rw-r--r-- | puzzle/dummy/makefile | 16 |
4 files changed, 20 insertions, 23 deletions
diff --git a/puzzle/dummy/CMakeLists.txt b/puzzle/dummy/CMakeLists.txt index 6acc4c8..7edce2b 100644 --- a/puzzle/dummy/CMakeLists.txt +++ b/puzzle/dummy/CMakeLists.txt @@ -11,14 +11,13 @@ add_compile_definitions(DEBUG) # arduino set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/lib/Arduino-CMake-Toolchain/Arduino-toolchain.cmake) -# set(ARDUINO_BOARD "Arduino Uno [avr.uno]") -set(ARDUINO_BOARD "Arduino Mega or Mega 2560 [avr.mega]") +set(ARDUINO_BOARD "Arduino Uno [avr.uno]") +# set(ARDUINO_BOARD "Arduino Mega or Mega 2560 [avr.mega]") -# freertos +# freertos (used for memory management only) add_library(freertos_config INTERFACE) target_include_directories(freertos_config SYSTEM INTERFACE .) -# set(FREERTOS_PORT GCC_ATMEGA) # Arduino Uno -set(FREERTOS_PORT GCC_ATMEGA) # Arduino Uno +set(FREERTOS_PORT GCC_ATMEGA) set(FREERTOS_HEAP 4) # used for testing @@ -29,6 +28,7 @@ set(FREERTOS_HEAP 4) project(pb_mod_dummy C CXX) add_subdirectory(lib/pbdrv) +include(lib/pbdrv/ext/freertos/include.cmake) add_subdirectory(lib/FreeRTOS-Kernel) add_executable(main @@ -36,10 +36,10 @@ add_executable(main mod.c ) -target_link_libraries(main +target_link_libraries(main PUBLIC pbdrv-mod ) -target_link_arduino_libraries(main +target_link_arduino_libraries(main PUBLIC core Wire ) diff --git a/puzzle/dummy/FreeRTOSConfig.h b/puzzle/dummy/FreeRTOSConfig.h index 1cfdd71..1d98f78 100644 --- a/puzzle/dummy/FreeRTOSConfig.h +++ b/puzzle/dummy/FreeRTOSConfig.h @@ -17,8 +17,8 @@ #define configSTACK_DEPTH_TYPE uint16_t #define configSUPPORT_STATIC_ALLOCATION 0 #define configSUPPORT_DYNAMIC_ALLOCATION 1 -// #define configTOTAL_HEAP_SIZE (1024) -#define configTOTAL_HEAP_SIZE (7 * 1024) +#define configTOTAL_HEAP_SIZE (1024) +// #define configTOTAL_HEAP_SIZE (7 * 1024) #define configCHECK_FOR_STACK_OVERFLOW 0 #define configUSE_MALLOC_FAILED_HOOK 0 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0 diff --git a/puzzle/dummy/index.dox b/puzzle/dummy/index.dox new file mode 100644 index 0000000..918bf7f --- /dev/null +++ b/puzzle/dummy/index.dox @@ -0,0 +1,9 @@ +// vim:ft=doxygen +/** +\ingroup puz +\defgroup puz_dummy Dummy +\brief Demo puzzle module + +The dummy puzzle module consists of an empty Arduino sketch, and can be used as +a starting point for developing new puzzle modules. +*/ diff --git a/puzzle/dummy/makefile b/puzzle/dummy/makefile index 509d8e3..6b8341b 100644 --- a/puzzle/dummy/makefile +++ b/puzzle/dummy/makefile @@ -3,18 +3,6 @@ TARGET = $(BUILD_DIR)/main.elf include ../../lazy.mk export SERIAL_PORT ?= /dev/ttyACM0 -flash: upload-main; -upload-main: $(TARGET) - -test: test_a test_b; - -test_a: - $(MAKE) -C . clean - $(MAKE) -E CMFLAGS+=-D\ CMAKE_CXX_FLAGS=-DTEST_A -C . - $(MAKE) -E SERIAL_PORT=/dev/ttyACM0 -C . flash - -test_b: - $(MAKE) -C . clean - $(MAKE) -E CMFLAGS+=-D\ CMAKE_CXX_FLAGS=-DTEST_B -C . - $(MAKE) -E SERIAL_PORT=/dev/ttyACM1 -C . flash +flash: upload; +upload: $(TARGET) |