A demonstration of a simple bootloader with SD card. Binary folder already contains precompiled two Firmware files for Nucleo-F767ZI under MbedOS 6.15.1. These files may be placed to a SD card (It will working with https://os.mbed.com/users/JohnnyK/code/SimpleBootloader/)
Revision 0:b8b091db9767, committed 2021-12-08
- Comitter:
- JohnnyK
- Date:
- Wed Dec 08 21:16:45 2021 +0000
- Commit message:
- First release
Changed in this revision
diff -r 000000000000 -r b8b091db9767 Binary/Firm1.bin Binary file Binary/Firm1.bin has changed
diff -r 000000000000 -r b8b091db9767 Binary/Firm2.bin Binary file Binary/Firm2.bin has changed
diff -r 000000000000 -r b8b091db9767 Bootloader/SimpleBootloader.bin Binary file Bootloader/SimpleBootloader.bin has changed
diff -r 000000000000 -r b8b091db9767 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 08 21:16:45 2021 +0000 @@ -0,0 +1,33 @@ +/* + * Tested with Nudleo-F767Zi and Nudleo-F429ZI + * Builded with Mbed Studio 1.4.3 + */ + +#include "mbed.h" //MbedOS 6.15.5 + +#define DELAY 200ms + +DigitalOut myled1(LED1); +DigitalOut myled2(LED2); +DigitalOut myled3(LED3);*/ +InterruptIn iin(BUTTON1); +bool flag = false; + +void fall(){ + flag = true; +} + +int main() +{ + printf("AppStart_Firm1\n"); + iin.fall(callback(fall)); + + while (true) { + myled1 = 1; myled2 = 0; myled3 = 0; ThisThread::sleep_for(DELAY); + myled1 = 0; myled2 = 1; myled3 = 0; ThisThread::sleep_for(DELAY); + myled1 = 0; myled2 = 0; myled3 = 1; ThisThread::sleep_for(DELAY); + myled1 = 0; myled2 = 1; myled3 = 0; ThisThread::sleep_for(DELAY); + ThisThread::sleep_for(DELAY); + if(flag){printf("Restarting...\n"); ThisThread::sleep_for(1s); NVIC_SystemReset();} + } +} \ No newline at end of file
diff -r 000000000000 -r b8b091db9767 mbed-os.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Wed Dec 08 21:16:45 2021 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#2eb06e76208588afc6cb7580a8dd64c5429a10ce
diff -r 000000000000 -r b8b091db9767 mbed_app.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed_app.json Wed Dec 08 21:16:45 2021 +0000 @@ -0,0 +1,7 @@ +{ + "target_overrides": { + "*": { + "target.bootloader_img": "Bootloader/SimpleBoodtloader.bin" + } + } +} \ No newline at end of file