diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-30 17:20:01 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-30 17:20:01 -0600 |
commit | 942cded68b0097a90603cce7f1435e76432fb97c (patch) | |
tree | 52d7aa5ae91b110506808f39cddfbbc644968548 | |
parent | 60e159c7232cb5e8b45d6302479753880611fc14 (diff) | |
download | px4-nuttx-942cded68b0097a90603cce7f1435e76432fb97c.tar.gz px4-nuttx-942cded68b0097a90603cce7f1435e76432fb97c.tar.bz2 px4-nuttx-942cded68b0097a90603cce7f1435e76432fb97c.zip |
apps/platform/mikroe-stm32f4 now support platform-specific configuration data. From Ken Pettit
-rw-r--r-- | apps/ChangeLog.txt | 2 | ||||
-rw-r--r-- | apps/include/platform/configdata.h | 2 | ||||
-rw-r--r-- | apps/platform/mikroe-stm32f4/Kconfig | 38 | ||||
-rw-r--r-- | apps/platform/mikroe-stm32f4/Make.defs | 2 |
4 files changed, 42 insertions, 2 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index c0a0e7efd..f47c1b082 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -714,4 +714,6 @@ (2013-10-30). * apps/examples/cc3000: Fine tuning of memory usage from David Sidrane (2013-10-30). + * apps/platform/mikroe-stm32f4: Now supports storage of configuration + data. From Ken Pettit (2013-10-30). diff --git a/apps/include/platform/configdata.h b/apps/include/platform/configdata.h index 956464445..90b4aa7bd 100644 --- a/apps/include/platform/configdata.h +++ b/apps/include/platform/configdata.h @@ -82,7 +82,7 @@ enum config_data_e #if defined(__cplusplus) #define EXTERN extern "C" extern "C" { -#els +#else #define EXTERN extern #endif diff --git a/apps/platform/mikroe-stm32f4/Kconfig b/apps/platform/mikroe-stm32f4/Kconfig index b6672b7fb..55a1475bd 100644 --- a/apps/platform/mikroe-stm32f4/Kconfig +++ b/apps/platform/mikroe-stm32f4/Kconfig @@ -4,4 +4,42 @@ # if ARCH_BOARD_MIKROE_STM32F4 + +if PLATFORM_CONFIGDATA + +choice + prompt "Config Data save location" + default MIKROE_STM32F4_CONFIGDATA_PART + +config MIKROE_STM32F4_CONFIGDATA_PART + bool "Dedicated FLASH partition" + +config MIKROE_STM32F4_CONFIGDATA_FS + bool "File system file" + +config MIKROE_STM32F4_CONFIGDATA_ROM + bool "Program ROM (R/O)" + +endchoice + +if MIKROE_STM32F4_CONFIGDATA_FS + +config MIKROE_STM32F4_CONFIGDATA_FILENAME + string "Path of file to save config data" + ---help--- + Specifies the fully qualified filename where application configuration + data is stored on the filesystem. + +endif + +if MIKROE_STM32F4_CONFIGDATA_PART + +config MIKROE_STM32F4_CONFIGDATA_PART_SIZE + int "Size (in erase blocks) of configuration data partition" + default 2 + +endif + +endif + endif diff --git a/apps/platform/mikroe-stm32f4/Make.defs b/apps/platform/mikroe-stm32f4/Make.defs index bf0cc47ed..825df1695 100644 --- a/apps/platform/mikroe-stm32f4/Make.defs +++ b/apps/platform/mikroe-stm32f4/Make.defs @@ -36,4 +36,4 @@ # Add platform specific sources to ASRCS and CSRCS # ASRCS += xyz.S -# CSRCS += xyz.c +CSRCS += mikroe_configdata.c |