* Boot: switch to DFU routines. Implements #132 part 1 of 2. * Boot: boot to DFU shortcut, hard reset USB on each boot. Implements #132 part 2 of 2. * Deploy scripts: fix path for deploy dfu. * Bootloader: initial version. Target_f2: rebase, update deployment scripts. * Bootloader: cleanup, refactor switch2 proc. Readme,wiki: document bootloader. * Wiki: deploy symlinks as files, bootloader info. * Target_f2: valid flash size in linker script. * Github CI: bootloader build and artifacts. * Bootloader: rename platforms to targets. * Bootloader: change dfu/os colors. * disable set -e * lint code * add bootloader testing page Co-authored-by: Aleksandr Kutuzov <aku@plooks.com> Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
14
bootloader/src/main.c
Normal file
14
bootloader/src/main.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "target.h"
|
||||
|
||||
int main() {
|
||||
// Initialize hardware
|
||||
target_init();
|
||||
// Check if dfu requested
|
||||
if(target_is_dfu_requested()) {
|
||||
target_switch2dfu();
|
||||
}
|
||||
// Switch to OS
|
||||
target_switch2os();
|
||||
// Never should get here
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user