mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 04:01:37 +08:00
boards: CUAV CAN GPS flash based parameters
This commit is contained in:
committed by
David Sidrane
parent
f45b67af59
commit
350ebf5a1f
@@ -73,6 +73,8 @@
|
|||||||
#define HRT_TIMER 3 /* use timer 3 for the HRT */
|
#define HRT_TIMER 3 /* use timer 3 for the HRT */
|
||||||
#define HRT_TIMER_CHANNEL 4 /* use capture/compare channel 4 */
|
#define HRT_TIMER_CHANNEL 4 /* use capture/compare channel 4 */
|
||||||
|
|
||||||
|
#define FLASH_BASED_PARAMS
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
#define BOARD_HAS_N_S_RGB_LED 8 /* Uses 8 SK6812 digital led chip */
|
#define BOARD_HAS_N_S_RGB_LED 8 /* Uses 8 SK6812 digital led chip */
|
||||||
#define BOARD_MAX_LEDS BOARD_HAS_N_S_RGB_LED
|
#define BOARD_MAX_LEDS BOARD_HAS_N_S_RGB_LED
|
||||||
|
|||||||
@@ -71,6 +71,10 @@
|
|||||||
|
|
||||||
#include <px4_platform_common/init.h>
|
#include <px4_platform_common/init.h>
|
||||||
|
|
||||||
|
# if defined(FLASH_BASED_PARAMS)
|
||||||
|
# include <parameters/flashparams/flashfs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: stm32_boardinitialize
|
* Name: stm32_boardinitialize
|
||||||
*
|
*
|
||||||
@@ -126,9 +130,24 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
|||||||
{
|
{
|
||||||
px4_platform_init();
|
px4_platform_init();
|
||||||
|
|
||||||
/* Configure the HW based on the manifest */
|
#if defined(FLASH_BASED_PARAMS)
|
||||||
|
static sector_descriptor_t params_sector_map[] = {
|
||||||
|
{2, 16 * 1024, 0x08008000},
|
||||||
|
{3, 16 * 1024, 0x0800C000},
|
||||||
|
{0, 0, 0},
|
||||||
|
};
|
||||||
|
|
||||||
px4_platform_configure();
|
/* Initialize the flashfs layer to use heap allocated memory */
|
||||||
|
int result = parameter_flashfs_init(params_sector_map, NULL, 0);
|
||||||
|
|
||||||
|
if (result != OK) {
|
||||||
|
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // FLASH_BASED_PARAMS
|
||||||
|
|
||||||
|
//px4_platform_configure();
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user