Commit Graph

43 Commits

Author SHA1 Message Date
Andrew Tridgell 69d3264e55 StorageManager: allow for CANDNA storage on F405 boards
this allows for boards using the log structure storage with 15360
bytes of storage have a CANDNA area.

This fixes CAN support on F405 boards
2021-01-05 10:25:17 +11:00
Peter Barker 4647c6ef62 StorageManager: use pragmas to set storage layout rather than call
We don't need the flexibility to reset this, it's a waste of bytes and
something that could go wrong.  AP_Periph led the way with using
pragmas here.
2020-01-28 11:34:51 +11:00
Andrew Tridgell a733690f80 StorageManager: use hal.storage->erase() 2020-01-02 09:52:57 +11:00
Peter Barker 8469efc5aa StorageManager: use https:// scheme for ardupilot URLs 2019-12-10 07:53:46 +11:00
Siddharth Purohit 4034af6ef1 StorageManager: add storage aread for CAN Dynamic Node Alloc 2019-10-19 09:55:38 +11:00
Peter Barker f1e5c72ee9 StorageManager: add write_uint8 alias for write_byte 2019-09-28 07:58:48 +09:00
Andrew Tridgell d005f066a9 StorageManager: enable use of a single storage region 2019-08-27 10:29:56 +10:00
Andrew Tridgell b983caa97e StorageManager: allow for 15k storage
this is for F4 boards using flash storage. They were using 8k, but can
actually fit 16k. This is optimised for lots of param space as we
expect to have a lot of customised params for OSD support
2018-06-24 08:26:28 +10:00
Andrew Tridgell 7cff648f8a StorageManager: fixed build warning 2018-05-07 11:43:23 +10:00
Andrew Tridgell ba32b06c59 StorageManager: fixed header order
fixes build for revomini HAL
2018-02-10 09:14:41 +11:00
Andrew Tridgell 9cce1e0733 StorageManager: expanded bind info to 56 bytes
cc2500 needs a larger bind area
2018-02-08 17:36:33 +11:00
Andrew Tridgell ac324a3760 StorageManager: added bind info storage area 2018-02-08 17:36:33 +11:00
Pierre Kancir a6fe6024c1 StorageManager: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
murata 37a55c38a1 StorageManager: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Andrew Tridgell ca39ece6cb StorageManager: added storage region for signing keys 2016-05-21 15:25:12 +10:00
Luis Vale Gonçalves bbbb3047fa Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:40 -07:00
Luis Vale Gonçalves 4e70665f17 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:39 -07:00
Lucas De Marchi bf9cf74c38 StorageManager: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Gustavo Jose de Sousa c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa 3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa d281067bcc waf: make example binaries be placed in 'examples' dir
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Jonathan Challinger 65915bbe71 StorageManager: fix example build 2015-12-29 10:46:35 -08:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi 360855f109 StorageManager: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi cee770f5f7 StorageManager: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:44 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi bdf92e8c79 StorageManager: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Caio Marcelo de Oliveira Filho 03b0c76553 StorageManager: remove unnecessary includes from example 2015-10-21 09:16:10 +11:00
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Gustavo Jose de Sousa ce0cb248ce StorageManager: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Gustavo Jose de Sousa 0d1d960899 StorageManager: remove unnecessary calculations on addr for next area
When writting or reading a block, if the block doesn't fit the area where it begins, the next base address is always zero. Thus the calculations to define the next value of addr are unnecessary.

Here's a quick validity proof using the previous calculations:
    First: Considering the case where the block doesn't fit it's first area:
        That means that (count + addr > length), what makes:
            count = length - addr; (1)
        So the following operations:
            addr += count;
            addr -= length;
        Are the same as doing:
            addr = addr + count - length; (2)
        Using (1) and (2) we have:
            addr = addr + length - addr - length = 0

    Second: When the block fits the area where it's at:
        That means that variable count is not changed,
        thus (n -= count) evaluates to 0, which makes the loop exit.

Another change was (b += count;) being moved after the condition to break the loop, since we just need to move the block pointer when it doesn't fit the first area.
2015-08-07 20:52:20 +10:00
Andrew Tridgell 81e6d88560 StorageManager: fixed hang in erase()
found by coverity
2015-06-20 15:00:57 +10:00
Andrew Tridgell 421c7e02ae StorageManager: convert example from .pde to .cpp 2015-06-01 17:07:08 +10:00
Andrew Tridgell 212e0ec002 StorageManager: fix for HAL_SITL rename 2015-05-05 09:45:57 +10:00
Randy Mackay c78068b8b8 StorageManager: fix example sketch 2015-05-01 21:03:13 +09:00
Andrew Tridgell 52cdd6394f StorageManager: cope with a wider range of storage sizes 2014-08-13 21:35:26 +10:00
Andrew Tridgell e53c872e1f StorageManager: added example sketch
note: this destroys the data
2014-08-13 18:46:43 +10:00
Andrew Tridgell 66a21c4c33 StorageManager: first version of storage management library
used to divvy up eeprom/fram and allow for expandable storage
2014-08-13 18:29:04 +10:00