Block Device driver uses a buffer so we need to ensure data is written or read to the device and not to the buffer so we can be sure if the device works properly
To define an N way split this define the following:
#define BOARD_HAS_MTD_PARTITION_OVERRIDE {"/fs/mtd_params", "/fs/mtd_waypoints","/fs/equal_part" }
OR
To define a percentage split this define the following:
#define BOARD_HAS_MTD_PARTITION_OVERRIDE {"/fs/mtd_params", "/fs/mtd_waypoints","/fs/tiny" }
#define BOARD_MTD_PARTITION_TABLE_SIZES {50.0f, 49.0f, 1.0f}
and remove the px4_ prefix, except for px4_config.h.
command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done
Transitional headers for submodules are added (px4_{defines,log,time}.h)
A board_config may define BOARD_HAS_MTD_PARTITION_OVERRIDE to
uses it's own number of partitions and names.
If a BOARD_HAS_MTD_PARTITION_OVERRIDE is not defined
the hardcoded original values of fs/mtd_params &
/fs/mtd_waypoints are used.
on an mtd device.
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
Since mtd already checks whether CONFIG_MTD_RAMTRON is set in
defconfig use this define to check whether to call ramtron_attach()
or at24xxx_attach() in the main function, instead of checking
CONFIG_ARCH_BOARD_PX4FMU-V1.
Also instead of using #ifdef CONFIG_ARCH_BOARD_AEROCORE to determine
whether to start mtd on spi 2 or 4, rather use a new board define
PX4_SPI_BUS_RAMTRON in the board_config.h file.
Based on the work of Andrew Smith [1], add board configuration and device
drivers to support the Gumstix AeroCore (previously Aerodroid) board [2]. The
AeroCore is an autopilot board based on a STM32F427 similar to the FMUv2.
[1] https://github.com/smithandrewc/Firmware
[2] https://store.gumstix.com/index.php/products/585/
Signed-off-by: Ash Charles <ashcharles@gmail.com>