Skip to content
Snippets Groups Projects
Commit 07921c9f authored by José Roberto de Souza's avatar José Roberto de Souza Committed by Lorenz Meier
Browse files

aerofc: Use ram_flash dataman backend

parent e2aae04c
No related branches found
No related tags found
No related merge requests found
......@@ -406,7 +406,7 @@ then
set DATAMAN_OPT ""
if ver hwcmp AEROFC_V1
then
set DATAMAN_OPT -r
set DATAMAN_OPT -i
fi
# waypoint storage
# REBOOTWORK this needs to start in parallel
......
......@@ -67,6 +67,8 @@
#include <drivers/drv_hrt.h>
#include <drivers/drv_led.h>
#include <dataman/dataman.h>
#include <systemlib/px4_macros.h>
#include <systemlib/cpuload.h>
#include <systemlib/err.h>
......@@ -335,28 +337,32 @@ __EXPORT int board_app_initialize(uintptr_t arg)
led_off(LED_AMBER);
led_off(LED_BLUE);
#if defined(FLASH_BASED_PARAMS)
/*
* Bootloader(sector 0):
* start: 0x08000000, len: 16K, end: 0x08003E80
*
* FlashFS(sector 1 and 2):
* start: 0x08004000, len: 32K, end: 0x0800C000
* start: 0x08004000, len: 32K, end: 0x0800BFFF
*
* Firmware(sector 3 to 11):
* start: 0x0800C000, len: 976K, end: 0x080FA480
* start: 0x0800C000, len: 976K, end: 0x080FFFFF
*
* First 1MB memory bank complete.
* Second 1MB memory bank is reserved for future use.
* Dataman(sector 23):
* start: 0x081E0000, len: 128K, end: 0x08200000
*
* First 1MB memory bank complete assigned.
* Second 1MB memory bank is mostly empty.
*/
static sector_descriptor_t sector_map[] = {
#if defined(FLASH_BASED_PARAMS)
static sector_descriptor_t params_sector_map[] = {
{1, 16 * 1024, 0x08004000},
{2, 16 * 1024, 0x08008000},
{0, 0, 0},
};
/* Initialize the flashfs layer to use heap allocated memory */
result = parameter_flashfs_init(sector_map, NULL, 0);
result = parameter_flashfs_init(params_sector_map, NULL, 0);
if (result != OK) {
message("[boot] FAILED to init params in FLASH %d\n", result);
......@@ -366,6 +372,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
#endif
#if defined(FLASH_BASED_DATAMAN)
static dm_sector_descriptor_t dm_sector_map = {23, 128 * 1024, 0x081E0000};
dm_flash_sector_description_set(&dm_sector_map);
#endif
return OK;
}
......
......@@ -134,6 +134,7 @@
#define BOARD_NAME "AEROFC_V1"
#define FLASH_BASED_PARAMS
#define FLASH_BASED_DATAMAN
/*
* The following defined is a workaround and replaces CONFIG_ARCH_BOARD_AEROFC_V1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment