[bootloader] Added bootloader

This commit is contained in:
M4x1m3
2022-02-25 16:17:38 +01:00
parent c635f4e2b9
commit 272797f31f
4 changed files with 27 additions and 1 deletions

View File

@@ -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

6
bootloader/Makefile Normal file
View File

@@ -0,0 +1,6 @@
bootloader_src += $(addprefix bootloader/,\
main.cpp \
)
bootloader_src += $(ion_src) $(kandinsky_src) $(liba_src) $(libaxx_src)

15
bootloader/main.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include <ion/backlight.h>
#include <ion/display.h>
#include <ion/timing.h>
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);
}
}

View File

@@ -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 $@"