1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00
Commit Graph

7974 Commits

Author SHA1 Message Date
Stacey Sheldon
b3178c3966 flash_ut: fix forward declaration of init function 2013-03-03 14:33:04 +01:00
Stacey Sheldon
ea09a53adc unittest: build gtest-all and gtest_main directly
Conflicts:
	make/unittest.mk
2013-03-03 14:33:03 +01:00
Stacey Sheldon
9b94eeb745 ut: convert logfs unit test to gtest
Conflicts:
	Makefile
	make/unittest.mk
2013-03-03 14:33:03 +01:00
Stacey Sheldon
fb4a1d7b1b gtest: stop compiling gtest libraries on installation 2013-03-03 14:33:03 +01:00
Stacey Sheldon
14c5af6148 ut: convert make rules to template and add TAP file generation
Make targets changed to:
 make ut_<test>
 make ut_<test>_tap
 make ut_<test>_run
 make ut_<test>_clean
 make all_ut
 make all_ut_tap
 make all_ut_run
 make all_ut_clean

Conflicts:
	Makefile
2013-03-03 14:33:03 +01:00
Stacey Sheldon
06f805b00e ut: add googletest (gtest) install rules
See: http://code.google.com/p/googletest/
2013-03-03 14:33:03 +01:00
Stacey Sheldon
264d76382b makefile: allow arch-specific path to qmake
This will be required once we move to Qt5.
2013-03-03 14:33:03 +01:00
Stacey Sheldon
e00372a540 makefile: define ARCH before including make/tools.mk
ARCH is required in order to pick up the right versions
of the tools for each architecture.
2013-03-03 14:33:03 +01:00
Stacey Sheldon
f934ebfd4c makefile: ensure that the builds are not run as root
When running the build as root, any bugs in the Makefiles
can have disasterous results.  This will be even more
important once we start automatically running unit tests
as part of our build.

This change ensures that the builds cannot be run as root.
2013-03-03 14:33:03 +01:00
Stacey Sheldon
e05ec8ed27 ut: drop dependency on C++0x
Conflicts:
	make/unittest.mk
2013-03-03 14:33:03 +01:00
Stacey Sheldon
842b275e13 logfs: fix bugs in handling full filesystem conditions
This was caught by the logfs unit tests.
2013-03-03 14:33:02 +01:00
Stacey Sheldon
b211840104 logfs: allow loading zero length files
This was found by the logfs unit tests.

This may be useful if we want to use empty files as existence
flags in the future.  Doesn't make any sense for UAVOs but
is valid in the general sense of a filesystem.
2013-03-03 14:33:02 +01:00
Stacey Sheldon
b6eeb59b26 flash: verify JEDEC ID during flash init
Verify that the flash component on the board matches exactly
what we're expecting.  This is a simple way to verify that we
are communicating properly with the JEDEC flash chip.

Conflicts:
	flight/targets/board_hw_defs/freedom/board_hw_defs.c
	flight/targets/board_hw_defs/quanton/board_hw_defs.c
2013-03-03 14:33:02 +01:00
Stacey Sheldon
17b8696261 flash: use uintptr_t to hold opaque pointers
When storing an opaque pointer value in a uint, the
appropriate type is uintptr_t which is guaranteed to
be wide enough to hold a pointer.

This is particularly important when the code can be
compiled in a sim or unit test environment which is
intended to run on a 64-bit machine.

Conflicts:
	flight/PiOS/Common/pios_flash_jedec.c
	flight/targets/DiscoveryF4/System/pios_board.c
	flight/targets/FlyingF4/System/pios_board.c
	flight/targets/Freedom/System/pios_board.c
	flight/targets/Quanton/System/pios_board.c
2013-03-03 14:33:02 +01:00
Stacey Sheldon
dd5f4b949c logfs: use uintptr_t to hold opaque pointers
When storing an opaque pointer value in a uint, the
appropriate type is uintptr_t which is guaranteed to
be wide enough to hold a pointer.

This is particularly important when the code can be
compiled in a sim or unit test environment which is
intended to run on a 64-bit machine.

Conflicts:
	flight/targets/DiscoveryF4/System/pios_board.c
	flight/targets/FlyingF4/System/pios_board.c
	flight/targets/Freedom/System/pios_board.c
	flight/targets/Quanton/System/pios_board.c
2013-03-03 14:33:02 +01:00
Stacey Sheldon
60c06b8c4b ut: add unit test build infrastructure
New build targets:
  make ut_all
  make ut_clean

to build (or clean) all unit tests.
2013-03-03 14:33:02 +01:00
Alessio Morale
cc2d5f8eae Fixes for missing openpilot.h include, previously coming from flashfs_objlist 2013-03-03 14:33:02 +01:00
Stacey Sheldon
7f53aa422a ut: add basic unit test for logfs
Build it with:
  make ut_logfs

Create a raw flash file like this:
  dd if=/dev/zero bs=1 count=2MiB | tr '\000' '\377' > theflash.bin

Run it with:
  ./build/unit_tests/logfs/logfs.elf && echo 'all good'

Conflicts:
	Makefile
2013-03-03 14:33:02 +01:00
Stacey Sheldon
7726b9e2a9 logfs: use f3-safe slot and arena states for all chips
Filesystem magic value has been updated to deal with the
format change.

Conflicts:
	flight/targets/board_hw_defs/discoveryf4/board_hw_defs.c
	flight/targets/board_hw_defs/flyingf4/board_hw_defs.c
	flight/targets/board_hw_defs/freedom/board_hw_defs.c
	flight/targets/board_hw_defs/quanton/board_hw_defs.c
2013-03-03 14:33:01 +01:00
lilvinz
d611207789 pios_flashfs_logfs: moved modified ARENA and SLOT enums to an F3 branch
also added a detailed comment
2013-03-03 14:33:01 +01:00
lilvinz
b242f8b88c pios_flashfs: adapted flashfs to work on f3 2013-03-03 14:33:01 +01:00
Stacey Sheldon
81059c41f7 flashfs: remove API dependency on uavobjmanager types
The flashfs layer is now entirely decoupled from the UAVO
data types.  All UAVO related calls are now properly
contained within uavobjectmanager.c.

This will make the flashfs layer more portable as well as
more testable in a standalone environment.  Eventually,
this layer could be used to store arbitrary files.

Also fixed all of the doxygen headers for the flashfs API.
2013-03-03 14:33:01 +01:00
Stacey Sheldon
d2a3f254bc stmflash: add flash driver for internal flash in STM32 2013-03-03 14:33:01 +01:00
Stacey Sheldon
d89a9b1b6c objlist: remove now unused objlist flash filesystem
Conflicts:
	flight/PiOS/inc/pios_flashfs_objlist.h
2013-03-03 14:33:01 +01:00
Stacey Sheldon
bcb66764e2 logfs: use logfs on all targets that have serial flash
Conflicts:
	flight/targets/FlyingF4/Makefile
	flight/targets/FlyingF4/System/pios_board.c
	flight/targets/Freedom/Makefile
	flight/targets/Freedom/System/pios_board.c
	flight/targets/Quanton/Makefile
	flight/targets/Quanton/System/pios_board.c
	flight/targets/board_hw_defs/flyingf4/board_hw_defs.c
	flight/targets/board_hw_defs/freedom/board_hw_defs.c
	flight/targets/board_hw_defs/quanton/board_hw_defs.c
2013-03-03 14:33:01 +01:00
Stacey Sheldon
5ef0988137 logfs+flash: add log structured filesystem for PiOS
A new flash driver abstraction is also provided to allow
for future support of other types of flash device under
the filesystem.

Conflicts:
	flight/PiOS/Common/pios_flash_jedec.c
2013-03-03 14:33:01 +01:00
Stacey Sheldon
20921e48ca flashfs: define the API to the FLASHFS subsystem 2013-03-03 14:33:01 +01:00
Alessio Morale
d26aaa6f6d sim_posix Removed unused files 2013-03-03 09:50:20 +01:00
Alessio Morale
5fdaccc1fa sim_posix: unified inc files with the rest of PiOS .h, some dir moves/cleanup, fixed some compilation issues. 2013-03-03 09:50:20 +01:00
Corvus Corax
7642f44cad Merge remote branch 'origin/corvuscorax/sanity_additions' into corvus/directory_and_sanity
Conflicts:
	flight/Modules/FirmwareIAP/firmwareiap.c
	flight/Modules/ManualControl/manualcontrol.c
	flight/targets/SimPosix/Makefile
	shared/uavobjectdefinition/systemalarms.xml
2013-02-03 14:57:54 +01:00
Oleg Semyonov
396f210d07 Remove stray file in RemoteSystemsTempFiles 2013-01-28 03:02:04 +02:00
Stacey Sheldon
f500ac1e23 rename: move UAVObjects and UAVTalk directories under targets 2013-01-28 02:33:06 +02:00
Stacey Sheldon
e55519b1e2 makefile: split tool install rules into separate makefile
The rules for downloading/building/installing the various
tools were cluttering the top-level makefile.

Conflicts:

	Makefile
2013-01-28 02:29:08 +02:00
Stacey Sheldon
0fda8035c2 makefile: update to released openocd 0.6.1 2013-01-28 02:13:17 +02:00
Stacey Sheldon
2f93d983b0 makefile: update ARM toolchain to 4.6-2012-q4 2013-01-28 02:11:26 +02:00
Stacey Sheldon
dbcf440bb9 makefile: factor out paths for major flight components
Conflicts:

	flight/targets/CopterControl/Makefile
2013-01-28 02:01:39 +02:00
Stacey Sheldon
833b730870 makefile: remove duplicate definitions 2013-01-28 01:56:50 +02:00
Stacey Sheldon
69a2691bc2 rename: move board-specific dirs into flight/targets
Conflicts:

	flight/targets/Bootloaders/Revolution/Makefile
	flight/targets/CopterControl/Makefile
2013-01-28 01:52:44 +02:00
Alessio Morale
1a303aa85f Merge remote-tracking branch 'origin/next' into amorale/bigmerge 2013-01-23 19:47:32 +01:00
Alessio Morale
ad6d071e52 OP-815 Coptercontrol hang on startupd due to WDG timeout 2013-01-20 16:20:49 +01:00
Alessio Morale
f293298118 Merge remote-tracking branch 'origin/revo-fixes' into amorale/revo-merge
Conflicts:
	flight/Modules/ManualControl/manualcontrol.c
	make/scripts/version-info.py
	package/Makefile.linux
2013-01-19 20:23:48 +01:00
Alessio Morale
b317415556 OP-788 reenable transaction lock for pios_jedec_flash.c 2013-01-14 01:31:07 +01:00
Alessio Morale
de44495055 OP-796 defaults USE_PATHPLANNER to enabled 2013-01-14 01:28:33 +01:00
filnet
d1236499c1 OP-805 - removed uneeded Uploader default configuration. 2013-01-13 21:53:14 +01:00
filnet
ae9def7f11 OP-805 - fixed GCS Options page crash by removing configurations for which
an options page could not be created.
2013-01-13 18:33:07 +01:00
Alessio Morale
9a10bd85bd OP-806 fixed a compilation issue on win 2013-01-13 02:21:39 +01:00
Alessio Morale
a8b57b3e0f OP-795 check and/or revert changes for mapwidget/waypointitem.cpp 2013-01-12 17:01:52 +01:00
Alessio Morale
635b1e98e4 OP-806 Fix mapwidget/uavitem.cpp to show CAS using AirspeedActual.CalibratedAirspeed 2013-01-12 16:57:28 +01:00
Alessio Morale
da76d775f9 OP-800 Remove WayointEditor as it was supeseed by PathActionEditor 2013-01-12 16:53:48 +01:00
Alessio Morale
a89a2cfb47 OP-801 replaced GetLLA with NED2LLA_HomeLLA 2013-01-11 01:11:07 +01:00