Skip to content

Commit aaad7a2

Browse files
committed
Add bootloader submenu to tmo_shell
This adds a bootloader submenu to tmo_shell. Supported commands include current, erase, images, oldest, and status. The outdated sample instance of dfu_gecko was also removed. Signed-off-by: John Lange <[email protected]>
1 parent dd7d447 commit aaad7a2

File tree

9 files changed

+284
-983
lines changed

9 files changed

+284
-983
lines changed

dfu_gecko/dfu_gecko_lib.c

Lines changed: 159 additions & 138 deletions
Large diffs are not rendered by default.

dfu_gecko/dfu_gecko_lib.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,23 @@
1616
#define DFU_SHA1_LEN 20
1717
#define DFU_URL_LEN 256
1818

19-
#define CONFIG_MCU_NAME "Pearl Gecko"
20-
21-
#define LOG_INFO printf
22-
#define LOG_DEBUG printf
23-
#define LOG_ERROR printf
24-
#define LOG_WARN printf
25-
#define ENDL ""
26-
2719
struct dfu_file_t {
2820
char desc[DFU_DESC_LEN];
2921
char lfile[DFU_FILE_LEN];
3022
char rfile[DFU_FILE_LEN];
3123
char sha1[DFU_SHA1_LEN];
3224
};
3325

34-
//const struct dfu_file_t *dfu_file;
26+
#ifdef BOOT_SLOT
3527

36-
int get_gecko_fw_version (void);
37-
int get_oldest_slot();
28+
int is_bootloader_running(void);
29+
int erase_image_slot(int slot);
30+
int get_gecko_fw_version(int boot_slot, char *version, int max_len);
31+
int print_gecko_slot_info(void);
32+
int get_current_slot(void);
33+
int get_unused_slot(void);
3834
int dfu_mcu_firmware_upgrade(int slot_to_upgrade, char *bin_file, char *sha_file);
35+
bool slot_is_safe_to_erase(int slot);
36+
#endif
3937

4038
#endif

samples/dfu_gecko/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

samples/dfu_gecko/lib/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)