diff options
| author | Damien George | 2018-04-11 16:52:22 +1000 |
|---|---|---|
| committer | Damien George | 2018-04-11 16:52:22 +1000 |
| commit | 3d5d76fb7384cd6c0bcd62f6a6799261b73f786d (patch) | |
| tree | ef74e66239dce90ad06cc1dde831fe56e37c8a56 | |
| parent | cf9fc7346d91d729e5f6248d4bbbe5cb199cc772 (diff) | |
stm32/main: Allow a board to configure the label of the flash FS.
To change the default label a board should define:
#define MICROPY_HW_FLASH_FS_LABEL "label"
| -rw-r--r-- | ports/stm32/main.c | 2 | ||||
| -rw-r--r-- | ports/stm32/mpconfigboard_common.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ports/stm32/main.c b/ports/stm32/main.c index 120ab5b67..4d0e7434b 100644 --- a/ports/stm32/main.c +++ b/ports/stm32/main.c @@ -192,7 +192,7 @@ MP_NOINLINE STATIC bool init_flash_fs(uint reset_mode) { } // set label - f_setlabel(&vfs_fat->fatfs, "pybflash"); + f_setlabel(&vfs_fat->fatfs, MICROPY_HW_FLASH_FS_LABEL); // create empty main.py FIL fp; diff --git a/ports/stm32/mpconfigboard_common.h b/ports/stm32/mpconfigboard_common.h index 857457fdb..97c21d022 100644 --- a/ports/stm32/mpconfigboard_common.h +++ b/ports/stm32/mpconfigboard_common.h @@ -92,6 +92,11 @@ #define MICROPY_HW_HAS_LCD (0) #endif +// The volume label used when creating the flash filesystem +#ifndef MICROPY_HW_FLASH_FS_LABEL +#define MICROPY_HW_FLASH_FS_LABEL "pybflash" +#endif + /*****************************************************************************/ // General configuration |
