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

8220 Commits

Author SHA1 Message Date
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
Fredrik Arvidsson
9e870e6ae3 OP-856 Added enabling/disabling of required modules depending on port configuration. Added rules for port configuration. 2013-03-03 14:17:37 +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
Kevin Vertucio
4c95e5c613 fixed indentation
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 09:13:32 -05:00
Kevin Vertucio
e4d516424e fixed indentation and clean up formatting
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 09:10:26 -05:00
Kevin Vertucio
c07142fa53 fixed some grammatical errors and formatting
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 08:59:02 -05:00
Kevin Vertucio
8a59b5c07a clean up formatting from review comments
Signed-off-by: Kevin Vertucio <kevinv033@gmail.com>
2013-03-01 08:53:04 -05:00
Fredrik Arvidsson
1b5a54334c Merge branch 'next' into thread/OP-856_Revolution_HW_Settings 2013-02-28 08:16:32 +01:00
Fredrik Arvidsson
de026a13fc OP-856 Basic implementation of hardware settings page. 2013-02-28 08:13:21 +01:00
David Willis
70294ed1ad Revert last change that broke compatibility with 12.10.2 2013-02-27 21:18:23 +00:00
David Willis
dec828f9ab Update git version of last UAVObject definition change 2013-02-27 00:12:11 +00:00
David Willis
7a4fcba285 Merge branch 'next' into dwillis/OP-792
Conflicts:
	shared/uavobjectdefinition/manualcontrolsettings.xml

Merge next
2013-02-26 23:57:06 +00:00
Fredrik Arvidsson
e710f3bb91 OP-856 Basic renaming from PRO to Revolution 2013-02-26 07:37:14 +01:00
Philippe Renon
ed83f282a5 OP-834 home location related error reporting improvments and comment
cleanups
2013-02-23 18:35:07 +01:00
Philippe Renon
8bd3c09860 OP-834 fixed bad Q_ASSERT around effective code 2013-02-23 18:35:07 +01:00
Philippe Renon
538723696a OP-834 restored "dead" code that was commented out by mistake 2013-02-23 18:35:07 +01:00
Philippe Renon
6d75dd0c6f OP-834 added FIXME comment for bad Q_ASSERT around effective code and
commented out a bunch of dead code (that dead code includes the suspicious
Q_ASSERT uses)
2013-02-23 18:35:07 +01:00
Philippe Renon
43786badfa OP-834 fixed bad Q_ASSERT around effective code 2013-02-23 18:35:07 +01:00
Philippe Renon
4350e48bfc OP-682 OP-850 fixed more uploader gadget crashes and button state issues 2013-02-21 01:34:17 +01:00
David Willis
faee9144d7 Merge branch 'dwillis/OP-792' of ssh://git.openpilot.org/OpenPilot into dwillis/OP-792 2013-02-19 23:45:31 +00:00
David Willis
d4ef4fb43f OP-792 Add autotune to list of excluded items for flight mode position 2013-02-19 23:43:03 +00:00
a*morale
a48395c7a0 Added the visualization of the error in BU
the error is shown as a number of slow flashes followed by 10 fast flashes.
The number of slow flashes indicate the error code:
1 - Self overwrite check failed;
2 - Board hardware revision mismatch;
3 - Flash erase failed;
4 - Flash programming failed;
The error code sequence will be shown indfinitely should a error occurs.
2013-02-19 00:48:05 +01:00
Philippe Renon
adc9c008c4 iOP-803 redid spurious commit in order to avoid undoing OP-805 (need to be
more carefull or sleep more...)
2013-02-18 22:28:09 +01:00
Fredrik Arvidsson
7c85fa5885 Removed creation of extra directory level on Windows. 2013-02-18 20:51:37 +01:00
Alessio Morale
d1c5da6c24 Move PyMite makefile entries to Libraries/PyMyte/pymite.mk to simplify boards makefile. 2013-02-17 22:28:41 +01:00
Alessio Morale
e4ebdc4802 Merge remote-tracking branch 'origin/dwillis/Android/Stabilisation' into next 2013-02-17 13:01:12 +01:00
Alessio Morale
81d056d0d5 OP-848 Added a note for the user on uavo tooltip to remember that it need board reboot for the setting to takes effect 2013-02-17 12:32:44 +01:00
Alessio Morale
3986f93e68 op-848 Splitted sample rate divider configuration for dlp and non_dlp settings (1kHz vs 8kHz sample rate).
Minor clean up, used constants in place of some hardcoded values
2013-02-17 12:20:25 +01:00
Alessio Morale
e27a07631e op-848 MPU6000 support user configurabe accel/gyro scales and filter bandwidth.
board definitions can override any of this settings for special applications.
Also include cleanup from "magic numbers" and fix for inverted ranges
2013-02-17 02:02:12 +01:00
Oleg Semyonov
aea1b4b544 Merge remote-tracking branch 'origin/os/OP-775_arm-dsplib' into next 2013-02-16 16:08:31 +02:00
Voha
6c24561ec4 * fix build error 2013-02-15 23:31:47 +01:00
Voha
8c5cded61a OP-845: *fix code style 2013-02-15 23:31:47 +01:00
Voha
e4f98b31c6 fix code style 2013-02-15 23:31:47 +01:00