Skip to content

Commit

Permalink
[bootloader] Added bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
M4xi1m3 committed Mar 10, 2022
1 parent c635f4e commit 272797f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions bootloader/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

bootloader_src += $(addprefix bootloader/,\
main.cpp \
)

bootloader_src += $(ion_src) $(kandinsky_src) $(liba_src) $(libaxx_src)
15 changes: 15 additions & 0 deletions bootloader/main.cpp
Original file line number Diff line number Diff line change
@@ -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);
}
}
6 changes: 5 additions & 1 deletion build/targets.device.n0110.mak
Original file line number Diff line number Diff line change
@@ -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 $@"
Expand Down

0 comments on commit 272797f

Please sign in to comment.