SITL: changed posix_default to posix_sitl

The SITL build is now the default posix build.

The linker script for posix was moved to makefiles/posix.
The rc.S file was moved to posix-configs/SITL/init/
The POSIXTEST board definition is now SITL

To run the SITL test run:

make sitlrun

This replaces the make posixrun target.

The build directory is now Build/posix_sitl.build/

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-06-15 09:51:07 -07:00
parent 56a8f0e604
commit 729653ba71
13 changed files with 18 additions and 17 deletions

View File

@ -324,8 +324,8 @@ else
export PX4_TARGET_OS=$@ export PX4_TARGET_OS=$@
endif endif
posixrun: sitlrun:
Tools/posix_run.sh Tools/sitl_run.sh
qurtrun: qurtrun:
make PX4_TARGET_OS=qurt sim make PX4_TARGET_OS=qurt sim

View File

@ -1,5 +0,0 @@
#!/bin/bash
mkdir -p Build/posix_default.build/rootfs/fs/microsd
mkdir -p Build/posix_default.build/rootfs/eeprom
cd Build/posix_default.build && ./mainapp ../../posix-configs/posixtest/init/rc.S

5
Tools/sitl_run.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
mkdir -p Build/posix_sitl.build/rootfs/fs/microsd
mkdir -p Build/posix_sitl.build/rootfs/eeprom
cd Build/posix_sitl.build && ./mainapp ../../posix-configs/SITL/init/rc.S

View File

@ -1,5 +1,5 @@
# #
# Makefile for the POSIXTEST *default* configuration # Makefile for the EAGLE *default* configuration
# #
# #

View File

@ -1,11 +1,12 @@
# #
# Board-specific definitions for the POSIX port of PX4 # Board-specific definitions for the POSIX port of PX4
# for use in SITL testing
# #
# #
# Configure the toolchain # Configure the toolchain
# #
CONFIG_ARCH = NATIVE CONFIG_ARCH = NATIVE
CONFIG_BOARD = POSIXTEST CONFIG_BOARD = SITL
include $(PX4_MK_DIR)/posix/toolchain_native.mk include $(PX4_MK_DIR)/posix/toolchain_native.mk

View File

@ -1,5 +1,5 @@
# #
# Makefile for the POSIXTEST *default* configuration # Makefile for the SITL configuration
# #
# #

View File

@ -262,7 +262,7 @@ AFLAGS = $(CFLAGS) -D__ASSEMBLY__ \
$(EXTRADEFINES) \ $(EXTRADEFINES) \
$(EXTRAAFLAGS) $(EXTRAAFLAGS)
LDSCRIPT = $(PX4_BASE)/posix-configs/posixtest/scripts/ld.script LDSCRIPT = $(PX4_BASE)/makefiles/posix/ld.script
# Flags we pass to the linker # Flags we pass to the linker
# #
LDFLAGS += $(EXTRALDFLAGS) \ LDFLAGS += $(EXTRALDFLAGS) \

View File

@ -114,14 +114,14 @@
/* no GPIO driver on the PX4_STM32F4DISCOVERY board */ /* no GPIO driver on the PX4_STM32F4DISCOVERY board */
#endif #endif
#ifdef CONFIG_ARCH_BOARD_POSIXTEST #ifdef CONFIG_ARCH_BOARD_SITL
/* no GPIO driver on the POSIXTEST board */ /* no GPIO driver on the SITL configuration */
#endif #endif
#if !defined(CONFIG_ARCH_BOARD_PX4IO_V1) && !defined(CONFIG_ARCH_BOARD_PX4IO_V2) && \ #if !defined(CONFIG_ARCH_BOARD_PX4IO_V1) && !defined(CONFIG_ARCH_BOARD_PX4IO_V2) && \
!defined(CONFIG_ARCH_BOARD_PX4FMU_V1) && !defined(CONFIG_ARCH_BOARD_PX4FMU_V2) && \ !defined(CONFIG_ARCH_BOARD_PX4FMU_V1) && !defined(CONFIG_ARCH_BOARD_PX4FMU_V2) && \
!defined(CONFIG_ARCH_BOARD_AEROCORE) && !defined(CONFIG_ARCH_BOARD_PX4_STM32F4DISCOVERY) && \ !defined(CONFIG_ARCH_BOARD_AEROCORE) && !defined(CONFIG_ARCH_BOARD_PX4_STM32F4DISCOVERY) && \
!defined(CONFIG_ARCH_BOARD_POSIXTEST) !defined(CONFIG_ARCH_BOARD_SITL)
# error No CONFIG_ARCH_BOARD_xxxx set # error No CONFIG_ARCH_BOARD_xxxx set
#endif #endif
/* /*

View File

@ -59,7 +59,7 @@
#define HW_ARCH "PX4_STM32F4DISCOVERY" #define HW_ARCH "PX4_STM32F4DISCOVERY"
#endif #endif
#ifdef CONFIG_ARCH_BOARD_POSIXTEST #ifdef CONFIG_ARCH_BOARD_SITL
#define HW_ARCH "LINUXTEST" #define HW_ARCH "LINUXTEST"
#endif #endif
#endif /* VERSION_H_ */ #endif /* VERSION_H_ */

View File

@ -274,7 +274,7 @@ adcsim_main(int argc, char *argv[])
int ret = 0; int ret = 0;
if (g_adc == nullptr) { if (g_adc == nullptr) {
/* XXX this hardcodes the default channel set for POSIXTEST - should be configurable */ /* FIXME - this hardcodes the default channel set for SITL - should be configurable */
g_adc = new ADCSIM((1 << 10) | (1 << 11) | (1 << 12) | (1 << 13)); g_adc = new ADCSIM((1 << 10) | (1 << 11) | (1 << 12) | (1 << 13));
if (g_adc == nullptr) { if (g_adc == nullptr) {

View File

@ -49,7 +49,7 @@
#define CONFIG_SCHED_WORKQUEUE 1 #define CONFIG_SCHED_WORKQUEUE 1
#define CONFIG_SCHED_HPWORK 1 #define CONFIG_SCHED_HPWORK 1
#define CONFIG_SCHED_LPWORK 1 #define CONFIG_SCHED_LPWORK 1
#define CONFIG_ARCH_BOARD_POSIXTEST 1 #define CONFIG_ARCH_BOARD_SITL 1
/** time in ms between checks for work in work queues **/ /** time in ms between checks for work in work queues **/
#define CONFIG_SCHED_WORKPERIOD 50000 #define CONFIG_SCHED_WORKPERIOD 50000