up_cxxinitialize:is now automatic in task start

This commit is contained in:
David Sidrane 2020-07-01 10:43:00 -07:00 committed by Daniel Agar
parent 185ffe9e13
commit c948d41284
3 changed files with 1 additions and 33 deletions

View File

@ -51,7 +51,7 @@ if(NOT PX4_BOARD MATCHES "px4_io")
arch_board_reset
arch_board_critmon
arch_version
nuttx_apps # up_cxxinitialize
nuttx_apps
nuttx_sched
px4_work_queue
)

View File

@ -42,25 +42,8 @@
#include <fcntl.h>
#include "platform/cxxinitialize.h"
int px4_platform_init(void)
{
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
/* run C++ ctors before we go any further */
up_cxxinitialize();
# if defined(CONFIG_SYSTEM_NSH_CXXINITIALIZE)
# error CONFIG_SYSTEM_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
# endif
#else
# error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
#endif
#if !defined(CONFIG_DEV_CONSOLE) && defined(CONFIG_DEV_NULL)
/* Support running nsh on a board with out a console

View File

@ -39,7 +39,6 @@
*/
#include <px4_platform_common/px4_config.h>
#include "platform/cxxinitialize.h"
#include <stdio.h> // required for task_create
#include <stdbool.h>
@ -285,20 +284,6 @@ user_start(int argc, char *argv[])
/* configure the first 8 PWM outputs (i.e. all of them) */
up_pwm_servo_init(0xff);
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
/* run C++ ctors before we go any further */
up_cxxinitialize();
# if defined(CONFIG_SYSTEM_NSH_CXXINITIALIZE)
# error CONFIG_SYSTEM_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
# endif
#else
# error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
#endif
/* reset all to zero */
memset(&system_state, 0, sizeof(system_state));