POSIX: Added PX4_ROOTFSDIR to file paths

Set a default path relative to current dir for the posix target.

Running make posixrun will create the required directoroes and then run
mainapp from its build location.

PX4_ROOTFSDIR is set to nothing for nuttx.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-06-11 21:36:13 -07:00
parent 0c43803ec7
commit 4d1ae6269b
10 changed files with 25 additions and 14 deletions
+12 -1
View File
@@ -92,6 +92,8 @@ typedef param_t px4_param_t;
*/
#if defined(__PX4_NUTTX)
#define PX4_ROOTFSDIR
/* XXX this is a hack to resolve conflicts with NuttX headers */
#if !defined(__PX4_TESTS)
#define isspace(c) \
@@ -136,6 +138,12 @@ __END_DECLS
#define px4_statfs_buf_f_bavail_t unsigned long
#if defined(__PX4_QURT)
#define PX4_ROOTFSDIR
#else
#define PX4_ROOTFSDIR "rootfs"
#endif
#endif
@@ -198,6 +206,10 @@ __END_DECLS
#endif
#if defined(__PX4_QURT)
#define PX4_ROOTFSDIR
#define DEFAULT_PARAM_FILE "/fs/eeprom/parameters"
#define SIOCDEVPRIVATE 999999
// Missing math.h defines
@@ -211,7 +223,6 @@ __END_DECLS
#define fminf(x, y) ((x) > (y) ? y : x)
#endif
#endif
/*