mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
UAVObject Init: Get rid of deprecated linker init code
This commit is contained in:
parent
c8313d7b3e
commit
9c7799dfe6
flight
CopterControl
OpenPilot
PiOS.posix/inc
PiOS.win32/inc
PiOS
STM32F10x
link_STM32103CB_CC_Rev1_BL_sections.ldlink_STM32103CB_CC_Rev1_sections.ldlink_STM3210E_INS_BL_sections.ldlink_STM3210E_INS_sections.ldlink_STM3210E_OP_BL_sections.ldlink_STM3210E_OP_sections.ld
inc
Project/OpenPilotOSX/OpenPilotOSX.xcodeproj
UAVObjects
@ -130,7 +130,6 @@ SRC += $(OPSYSTEM)/taskmonitor.c
|
|||||||
SRC += $(OPUAVTALK)/uavtalk.c
|
SRC += $(OPUAVTALK)/uavtalk.c
|
||||||
SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
||||||
SRC += $(OPUAVOBJ)/eventdispatcher.c
|
SRC += $(OPUAVOBJ)/eventdispatcher.c
|
||||||
SRC += $(OPUAVOBJ)/uavobjectsinit_linker.c
|
|
||||||
SRC += $(OPSYSTEM)/pios_usb_hid_desc.c
|
SRC += $(OPSYSTEM)/pios_usb_hid_desc.c
|
||||||
else
|
else
|
||||||
## TESTCODE
|
## TESTCODE
|
||||||
|
@ -135,7 +135,6 @@ SRC += $(OPSYSTEM)/taskmonitor.c
|
|||||||
SRC += $(OPUAVTALK)/uavtalk.c
|
SRC += $(OPUAVTALK)/uavtalk.c
|
||||||
SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
||||||
SRC += $(OPUAVOBJ)/eventdispatcher.c
|
SRC += $(OPUAVOBJ)/eventdispatcher.c
|
||||||
SRC += $(OPUAVOBJ)/uavobjectsinit_linker.c
|
|
||||||
else
|
else
|
||||||
## TESTCODE
|
## TESTCODE
|
||||||
SRC += $(OPTESTS)/test_common.c
|
SRC += $(OPTESTS)/test_common.c
|
||||||
|
@ -51,7 +51,6 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[];
|
|||||||
extern void InitModules();
|
extern void InitModules();
|
||||||
extern void StartModules();
|
extern void StartModules();
|
||||||
|
|
||||||
#define UAVOBJ_INITCALL(fn)
|
|
||||||
#define MODULE_INITCALL(ifn, sfn)
|
#define MODULE_INITCALL(ifn, sfn)
|
||||||
|
|
||||||
#define MODULE_TASKCREATE_ALL { \
|
#define MODULE_TASKCREATE_ALL { \
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
* and we cannot define a linker script for each of them atm
|
* and we cannot define a linker script for each of them atm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define UAVOBJ_INITCALL(fn)
|
|
||||||
#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags)
|
#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags)
|
||||||
|
|
||||||
#define MODULE_TASKCREATE_ALL
|
#define MODULE_TASKCREATE_ALL
|
||||||
|
@ -18,16 +18,6 @@ SECTIONS
|
|||||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
} > BL_FLASH
|
} > BL_FLASH
|
||||||
|
|
||||||
/* init sections */
|
|
||||||
.initcalluavobj.init :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_start = .;
|
|
||||||
KEEP(*(.initcalluavobj.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_end = .;
|
|
||||||
} > BL_FLASH
|
|
||||||
|
|
||||||
.ARM.extab :
|
.ARM.extab :
|
||||||
{
|
{
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
@ -22,16 +22,6 @@ SECTIONS
|
|||||||
*(.rodata .rodata* .gnu.linkonce.r.*)
|
*(.rodata .rodata* .gnu.linkonce.r.*)
|
||||||
} > FLASH
|
} > FLASH
|
||||||
|
|
||||||
/* init sections */
|
|
||||||
.initcalluavobj.init :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_start = .;
|
|
||||||
KEEP(*(.initcalluavobj.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_end = .;
|
|
||||||
} >FLASH
|
|
||||||
|
|
||||||
/* module sections */
|
/* module sections */
|
||||||
.initcallmodule.init :
|
.initcallmodule.init :
|
||||||
{
|
{
|
||||||
|
@ -207,16 +207,6 @@ SECTIONS
|
|||||||
} > BL_FLASH
|
} > BL_FLASH
|
||||||
|
|
||||||
|
|
||||||
/* init sections */
|
|
||||||
.initcalluavobj.init :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_start = .;
|
|
||||||
KEEP(*(.initcalluavobj.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_end = .;
|
|
||||||
} > BL_FLASH
|
|
||||||
|
|
||||||
/* the program code is stored in the .text section, which goes to Flash */
|
/* the program code is stored in the .text section, which goes to Flash */
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
|
@ -207,16 +207,6 @@ SECTIONS
|
|||||||
} > FLASH
|
} > FLASH
|
||||||
|
|
||||||
|
|
||||||
/* init sections */
|
|
||||||
.initcalluavobj.init :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_start = .;
|
|
||||||
KEEP(*(.initcalluavobj.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_end = .;
|
|
||||||
} > FLASH
|
|
||||||
|
|
||||||
/* the program code is stored in the .text section, which goes to Flash */
|
/* the program code is stored in the .text section, which goes to Flash */
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
|
@ -179,17 +179,6 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} > BL_FLASH
|
} > BL_FLASH
|
||||||
|
|
||||||
|
|
||||||
/* init sections */
|
|
||||||
.initcalluavobj.init :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_start = .;
|
|
||||||
KEEP(*(.initcalluavobj.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_end = .;
|
|
||||||
} > BL_FLASH
|
|
||||||
|
|
||||||
/* the program code is stored in the .text section, which goes to Flash */
|
/* the program code is stored in the .text section, which goes to Flash */
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
|
@ -182,17 +182,6 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
|
||||||
/* init sections */
|
|
||||||
.initcalluavobj.init :
|
|
||||||
{
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_start = .;
|
|
||||||
KEEP(*(.initcalluavobj.init))
|
|
||||||
. = ALIGN(4);
|
|
||||||
__uavobj_initcall_end = .;
|
|
||||||
} >FLASH
|
|
||||||
|
|
||||||
/* module sections */
|
/* module sections */
|
||||||
.initcallmodule.init :
|
.initcallmodule.init :
|
||||||
{
|
{
|
||||||
|
@ -67,7 +67,6 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[];
|
|||||||
static initmodule_t __initcall_##fn __attribute__((__used__)) \
|
static initmodule_t __initcall_##fn __attribute__((__used__)) \
|
||||||
__attribute__((__section__(".initcall" level ".init"))) = { .fn_minit = ifn, .fn_tinit = sfn };
|
__attribute__((__section__(".initcall" level ".init"))) = { .fn_minit = ifn, .fn_tinit = sfn };
|
||||||
|
|
||||||
#define UAVOBJ_INITCALL(fn) __define_initcall("uavobj",fn,1)
|
|
||||||
#define MODULE_INITCALL(ifn, sfn) __define_module_initcall("module", ifn, sfn)
|
#define MODULE_INITCALL(ifn, sfn) __define_module_initcall("module", ifn, sfn)
|
||||||
|
|
||||||
#define MODULE_INITIALISE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
#define MODULE_INITIALISE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||||
|
@ -2692,7 +2692,6 @@
|
|||||||
65C35F6812F0DC2D004811C2 /* attitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = attitude.h; sourceTree = "<group>"; };
|
65C35F6812F0DC2D004811C2 /* attitude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = attitude.h; sourceTree = "<group>"; };
|
||||||
65C9903C13A871B90082BD60 /* camerastab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = camerastab.c; sourceTree = "<group>"; };
|
65C9903C13A871B90082BD60 /* camerastab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = camerastab.c; sourceTree = "<group>"; };
|
||||||
65C9903E13A871B90082BD60 /* camerastab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = camerastab.h; sourceTree = "<group>"; };
|
65C9903E13A871B90082BD60 /* camerastab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = camerastab.h; sourceTree = "<group>"; };
|
||||||
65C9908E13AC5D8D0082BD60 /* uavobjectsinit_linker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uavobjectsinit_linker.c; sourceTree = "<group>"; };
|
|
||||||
65D2CA841248F9A400B1E7D6 /* mixersettings.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = mixersettings.xml; sourceTree = "<group>"; };
|
65D2CA841248F9A400B1E7D6 /* mixersettings.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = mixersettings.xml; sourceTree = "<group>"; };
|
||||||
65D2CA851248F9A400B1E7D6 /* mixerstatus.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = mixerstatus.xml; sourceTree = "<group>"; };
|
65D2CA851248F9A400B1E7D6 /* mixerstatus.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = mixerstatus.xml; sourceTree = "<group>"; };
|
||||||
65DEA79113F2143B00095B06 /* cameradesired.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = cameradesired.xml; sourceTree = "<group>"; };
|
65DEA79113F2143B00095B06 /* cameradesired.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = cameradesired.xml; sourceTree = "<group>"; };
|
||||||
@ -3521,7 +3520,6 @@
|
|||||||
650D8E6A12DFE17500D05CC9 /* UAVObjects */ = {
|
650D8E6A12DFE17500D05CC9 /* UAVObjects */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
65C9908E13AC5D8D0082BD60 /* uavobjectsinit_linker.c */,
|
|
||||||
65C35E9E12F0A834004811C2 /* uavobjecttemplate.c */,
|
65C35E9E12F0A834004811C2 /* uavobjecttemplate.c */,
|
||||||
65C35E9F12F0A834004811C2 /* uavobjectsinittemplate.c */,
|
65C35E9F12F0A834004811C2 /* uavobjectsinittemplate.c */,
|
||||||
65C35EA112F0A834004811C2 /* uavobjectmanager.c */,
|
65C35EA112F0A834004811C2 /* uavobjectmanager.c */,
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
*
|
|
||||||
* @file uavobjectsinit.c
|
|
||||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
||||||
* @brief Initialize all objects.
|
|
||||||
* Automatically generated by the UAVObjectGenerator.
|
|
||||||
*
|
|
||||||
* @note This is an automatically generated file.
|
|
||||||
* DO NOT modify manually.
|
|
||||||
* @see The GNU Public License (GPL) Version 3
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
/*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "openpilot.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function used to initialize the first instance of each object.
|
|
||||||
* This file is automatically updated by the UAVObjectGenerator.
|
|
||||||
*/
|
|
||||||
extern initcall_t __uavobj_initcall_start[], __uavobj_initcall_end[];
|
|
||||||
|
|
||||||
void UAVObjectsInitializeAll()
|
|
||||||
{
|
|
||||||
initcall_t *fn;
|
|
||||||
int32_t ret;
|
|
||||||
|
|
||||||
for (fn = __uavobj_initcall_start; fn < __uavobj_initcall_end; fn++)
|
|
||||||
ret = (*fn)();
|
|
||||||
}
|
|
@ -36,5 +36,7 @@ $(OBJINC)
|
|||||||
*/
|
*/
|
||||||
void UAVObjectsInitializeAll()
|
void UAVObjectsInitializeAll()
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
// This function is no longer used anyway
|
||||||
$(OBJINIT)
|
$(OBJINIT)
|
||||||
}
|
}
|
||||||
|
@ -68,8 +68,6 @@ int32_t $(NAME)Initialize(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UAVOBJ_INITCALL($(NAME)Initialize);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize object fields and metadata with the default values.
|
* Initialize object fields and metadata with the default values.
|
||||||
* If a default value is not specified the object fields
|
* If a default value is not specified the object fields
|
||||||
|
Loading…
x
Reference in New Issue
Block a user