Quantcast
Channel: MultiTech Developer Resources » All Posts
Viewing all articles
Browse latest Browse all 7111

Reply To: Storing Data on mDot Internal Flash using MBED Flash API.

$
0
0

I had to add component “FlashIAP” and also device has “Flash” capability in mbed_app.json in order to even attempt to use the FlashIAP Driver. However I ran into error when compiling the “flash_api.c” under the folder “\mbed-os\targets\TARGET_STM\TARGET_STM32F4″. Its looking for a header file called “flash_data.h”, which is present under the “TARGET_MTS_DRAGONFLY_F411RE” target, but not present for the target “TARGET_MTS_MDOT_F411RE”. So the contents of the file flash_data.h is as given below. How do I modify this file to work for the MDot target?

#ifndef MBED_FLASH_DATA_H
#define MBED_FLASH_DATA_H

#include "device.h"
#include <stdint.h>

#if DEVICE_FLASH

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* FLASH SIZE */
#define FLASH_SIZE      (uint32_t) 0x80000

/* Base address of the Flash sectors Bank 1 */
#define ADDR_FLASH_SECTOR_0     ((uint32_t)0x08000000) /* Base @ of Sector 0, 16 Kbytes */
#define ADDR_FLASH_SECTOR_1     ((uint32_t)0x08004000) /* Base @ of Sector 1, 16 Kbytes */
#define ADDR_FLASH_SECTOR_2     ((uint32_t)0x08008000) /* Base @ of Sector 2, 16 Kbytes */
#define ADDR_FLASH_SECTOR_3     ((uint32_t)0x0800C000) /* Base @ of Sector 3, 16 Kbytes */
#define ADDR_FLASH_SECTOR_4     ((uint32_t)0x08010000) /* Base @ of Sector 4, 64 Kbytes */
#define ADDR_FLASH_SECTOR_5     ((uint32_t)0x08020000) /* Base @ of Sector 5, 128 Kbytes */
#define ADDR_FLASH_SECTOR_6     ((uint32_t)0x08040000) /* Base @ of Sector 6, 128 Kbytes */
#define ADDR_FLASH_SECTOR_7     ((uint32_t)0x08060000) /* Base @ of Sector 7, 128 Kbytes */

#endif
#endif

Thanks,
Ajay


Viewing all articles
Browse latest Browse all 7111

Trending Articles