forked from Archive/PX4-Autopilot
px4_userspace_init: Fix NULL dereference for px4_spi_buses in user space
For targets that define the SPI buses via px4_spi_buses_all_hw, a call to px4_set_spi_buses_from_hw_version() is needed. Otherwise a NULL de-reference will occur when trying to access px4_spi_buses. Fixes a system crash in px4_fmu-v5_protected: up_assert: Assertion failed at file:armv7-m/arm_memfault.c line: 101 task: wq:lp_default
This commit is contained in:
parent
88bf1030b5
commit
9c204774f1
|
@ -40,6 +40,7 @@
|
|||
#include <drivers/drv_hrt.h>
|
||||
#include <lib/parameters/param.h>
|
||||
#include <px4_platform_common/px4_work_queue/WorkQueueManager.hpp>
|
||||
#include <px4_platform_common/spi.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <sys/boardctl.h>
|
||||
|
||||
|
@ -49,6 +50,8 @@ extern "C" void px4_userspace_init(void)
|
|||
{
|
||||
hrt_init();
|
||||
|
||||
px4_set_spi_buses_from_hw_version();
|
||||
|
||||
px4::WorkQueueManagerStart();
|
||||
|
||||
uorb_start();
|
||||
|
|
Loading…
Reference in New Issue