diff --git a/src/drivers/boards/tap-v1/board_config.h b/src/drivers/boards/tap-v1/board_config.h index 654b70a45d..87291d3ad8 100644 --- a/src/drivers/boards/tap-v1/board_config.h +++ b/src/drivers/boards/tap-v1/board_config.h @@ -236,6 +236,9 @@ __BEGIN_DECLS #define KEY_AD_GPIO (GPIO_INPUT|GPIO_PULLDOWN|GPIO_EXTI|GPIO_PORTC|GPIO_PIN1) #define POWER_ON_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) #define POWER_OFF_GPIO (GPIO_INPUT|GPIO_PULLDOWN|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN4) + + +#define FLASH_BASED_PARAMS /**************************************************************************************************** * Public Types ****************************************************************************************************/ diff --git a/src/drivers/boards/tap-v1/tap_init.c b/src/drivers/boards/tap-v1/tap_init.c index 648e465beb..86773fccb5 100644 --- a/src/drivers/boards/tap-v1/tap_init.c +++ b/src/drivers/boards/tap-v1/tap_init.c @@ -57,6 +57,8 @@ #include #include + + #include "stm32.h" #include "board_config.h" #include "stm32_uart.h" @@ -68,6 +70,10 @@ #include +# if defined(FLASH_BASED_PARAMS) +# include +#endif + /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ @@ -179,6 +185,25 @@ __EXPORT int nsh_archinitialize(void) led_off(LED_AMBER); led_off(LED_BLUE); +#if defined(FLASH_BASED_PARAMS) + static sector_descriptor_t sector_map[] = { + {1, 16 * 1024, 0x08004000}, + {2, 16 * 1024, 0x08008000}, + {0, 0, 0}, + }; + + /* Initalizee the flashfs layer to use heap allocated memory */ + + result = parameter_flashfs_init(sector_map, NULL, 0); + + if (result != OK) { + message("[boot] FAILED to init params in FLASH %d\n", result); + up_ledon(LED_AMBER); + return -ENODEV; + } + +#endif + /* Init the microSD slot */ result = board_sdio_initialize();