From 272797f31f352c4e4cf41c82172fad8d665177d5 Mon Sep 17 00:00:00 2001 From: M4x1m3 Date: Fri, 25 Feb 2022 16:17:38 +0100 Subject: [PATCH] [bootloader] Added bootloader --- Makefile | 1 + bootloader/Makefile | 6 ++++++ bootloader/main.cpp | 15 +++++++++++++++ build/targets.device.n0110.mak | 6 +++++- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 bootloader/Makefile create mode 100644 bootloader/main.cpp diff --git a/Makefile b/Makefile index 48d3d1df5..80cb6fcd0 100644 --- a/Makefile +++ b/Makefile @@ -114,6 +114,7 @@ include poincare/Makefile include python/Makefile include escher/Makefile # Executable Makefiles +include bootloader/Makefile include apps/Makefile include build/struct_layout/Makefile include build/scenario/Makefile diff --git a/bootloader/Makefile b/bootloader/Makefile new file mode 100644 index 000000000..c1b39faf4 --- /dev/null +++ b/bootloader/Makefile @@ -0,0 +1,6 @@ + +bootloader_src += $(addprefix bootloader/,\ + main.cpp \ +) + +bootloader_src += $(ion_src) $(kandinsky_src) $(liba_src) $(libaxx_src) diff --git a/bootloader/main.cpp b/bootloader/main.cpp new file mode 100644 index 000000000..0147279bb --- /dev/null +++ b/bootloader/main.cpp @@ -0,0 +1,15 @@ + +#include +#include +#include + +void ion_main(int argc, const char * const argv[]) { + // Initialize the backlight + Ion::Backlight::init(); + while (1) { + Ion::Display::pushRectUniform(KDRect(0,0,10,10), KDColorRed); + Ion::Timing::msleep(100); + Ion::Display::pushRectUniform(KDRect(0,0,10,10), KDColorBlue); + Ion::Timing::msleep(100); + } +} diff --git a/build/targets.device.n0110.mak b/build/targets.device.n0110.mak index c0da7d7bb..87508eac2 100644 --- a/build/targets.device.n0110.mak +++ b/build/targets.device.n0110.mak @@ -1,10 +1,14 @@ -HANDY_TARGETS += test.external_flash.write test.external_flash.read +HANDY_TARGETS += test.external_flash.write test.external_flash.read bootloader $(BUILD_DIR)/test.external_flash.%.$(EXE): LDSCRIPT = ion/test/device/n0110/external_flash_tests.ld test_external_flash_src = $(ion_src) $(liba_src) $(libaxx_src) $(kandinsky_src) $(poincare_src) $(ion_device_dfu_relogated_src) $(runner_src) $(BUILD_DIR)/test.external_flash.read.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_read_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_read_src)) $(BUILD_DIR)/test.external_flash.write.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_write_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_write_src)) + +$(BUILD_DIR)/bootloader.$(EXE): $(call flavored_object_for,$(bootloader_src)) +$(BUILD_DIR)/bootloader.$(EXE): LDSCRIPT = ion/test/device/n0110/external_flash_tests.ld + .PHONY: %_flash %_flash: $(BUILD_DIR)/%.dfu @echo "DFU $@"