59 Commits

Author SHA1 Message Date
Igor Mišić
352f773ec4 systemcmds/mtd: fix rwtest - force data to/from the device
Block Device driver uses a buffer so we need to ensure data is written or read to the device and not to the buffer so we can be sure if the device works properly
2023-02-24 08:08:19 +01:00
Daniel Agar
45912066d2 fix copyright header year range 2023-01-14 09:16:16 -05:00
Igor Mišić
432b664acc px4_mtd: fix instantiation for multiple mtds 2022-07-05 09:29:26 +02:00
Jukka Laitinen
9449ed6e66 Add support for protected build in drivers, systemcmds and modules Kconfig
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-02-18 07:58:58 +01:00
Daniel Agar
0029a75ab0 systemcmds: convert c -> c++ 2021-12-21 09:22:49 -05:00
Peter van der Perk
d5e3e9a7bc [Kconfig] Decompose Kconfig, now each module has its own Kconfig
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
David Sidrane
1b80018f30 systemcmds:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
229f02a4f9 mtd:Reduce functionality on memory constrained systems 2020-12-02 20:40:23 -05:00
David Sidrane
68ab736b16 Refactor mtd to make available to board startup 2020-12-02 20:40:23 -05:00
David Sidrane
7d6f8dc882 mtd:Allow a Board to set the partition sizes.
To define an N way split this define the following:

        #define BOARD_HAS_MTD_PARTITION_OVERRIDE {"/fs/mtd_params", "/fs/mtd_waypoints","/fs/equal_part" }

	OR
        To define a percentage split this define the following:
        #define BOARD_HAS_MTD_PARTITION_OVERRIDE {"/fs/mtd_params", "/fs/mtd_waypoints","/fs/tiny" }
        #define BOARD_MTD_PARTITION_TABLE_SIZES {50.0f, 49.0f, 1.0f}
2020-10-15 17:22:50 -04:00
Beat Küng
c6cd0536d7 mtd: support multiple instances 2020-10-12 15:22:26 +02:00
Beat Küng
842f656143 mtd.cpp: remove use of PX4_I2C_BUS_ONBOARD 2020-03-24 09:46:20 -04:00
Beat Küng
971897b9ed mtd: switch to c++ and use px4_find_spi_bus 2020-03-17 23:31:17 -04:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
78ef8aab2d STACK_MAIN increase default 1024 -> 2048 2019-08-30 19:11:51 -07:00
Julian Oes
5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
David Sidrane
82576c8d4c mtd:Add margin to stack from RTT-Stack check 2018-09-14 15:37:20 -04:00
Daniel Agar
d73d20bcce systemlib delete unused systemlib.h 2018-06-12 09:06:30 +02:00
Daniel Agar
ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
David Sidrane
f4992e64f7 mtd:24xxxx_mtd add AT24C02 - AT24C16 2017-09-29 10:13:51 -04:00
David Sidrane
1af3ea322c BUGFIX:mtd hardfault in no SPI
NULL check needed to be done before SPI_XXXX calls
2017-09-29 10:13:51 -04:00
David Sidrane
25c8ceaf91 mtd:spi_dev_e is now uint32_t in NuttX
Using new type of uint32_t for spi device
2017-09-29 10:13:51 -04:00
Beat Küng
65b11d39a9 mtd: add documentation & do cleanup (remove err(), ...) 2017-07-14 11:57:11 +02:00
David Sidrane
1d4ae4c683 Allows a board config to override the number of partitions and names
A board_config may define BOARD_HAS_MTD_PARTITION_OVERRIDE to
   uses it's own number of partitions and names.

   If a BOARD_HAS_MTD_PARTITION_OVERRIDE is not defined
   the hardcoded original values of fs/mtd_params &
   /fs/mtd_waypoints are used.

on an mtd device.
2017-01-20 22:55:04 +01:00
David Sidrane
487fbdf009 Use BOARD_EEPROM_WP_CTRL signal to control EEPROM WP signal if defined
Erases and write operations will use the BOARD_EEPROM_WP_CTRL
  macro to remove the Write protection and restore it.
2017-01-20 22:55:04 +01:00
David Sidrane
dcc2d1c3d1 I2C changes for upstream NuttX per trasaction freq control 2016-12-21 08:34:20 +01:00
Julian Oes
8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Dennis Shtatnov
9c8e56401b Working motors and mtd for CF2 2016-09-04 19:12:08 +02:00
Beat Küng
8a12dee125 cmake: remove all module.mk files & cmake conversion script (#4918)
It seems these files are leftovers.
2016-06-28 09:26:36 +02:00
Lorenz Meier
7398164fcc Updated PX4 use / API of low level GPIO and other hardware-centric system facilities 2016-05-28 14:56:17 +02:00
Daniel Agar
2487dbfc92 remove Wpacked and cleanup unused warning flags 2016-05-19 21:49:34 +02:00
Karl Schwabe
48c467f602 Remove CONFIG_ARCH_BOARD #ifdef dependencies from mtd
Since mtd already checks whether CONFIG_MTD_RAMTRON is set in
defconfig use this define to check whether to call ramtron_attach()
or at24xxx_attach() in the main function, instead of checking
CONFIG_ARCH_BOARD_PX4FMU-V1.

Also instead of using #ifdef CONFIG_ARCH_BOARD_AEROCORE to determine
whether to start mtd on spi 2 or 4, rather use a new board define
PX4_SPI_BUS_RAMTRON in the board_config.h file.
2015-11-13 16:30:57 +01:00
James Goppert
1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Daniel Agar
edf010c6a9 format src/systemcmds/mtd 2015-09-05 12:21:11 -04:00
Mark Charlebois
9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Daniel Agar
5b600a815c Replace use of -Wno-error and only ignore specific warnings 2014-12-23 11:18:36 -05:00
Daniel Agar
d511e39ea7 turn on -Werror and fix resulting errors 2014-12-22 17:56:59 -05:00
Lorenz Meier
1d50af272f EEPROM driver: Do not issue warnings that result from our special case handling - this driver is only used for this one particular eeprom and out of the NuttX tree. 2014-10-09 09:29:05 +02:00
Lorenz Meier
54fc6aa678 Hotfix: Optimize shell commands for size - we do not need massive performance there 2014-08-13 10:33:46 +02:00
Lorenz Meier
e380aa3f62 AT24C: Fix warning due to missing function prototype. 2014-07-08 13:54:33 +02:00
Lorenz Meier
ee8f4dcee6 systemcmds: Warning fixes 2014-06-30 12:19:44 +02:00
Don Gagne
92adbe9216 Fix compiler warnings 2014-06-29 17:47:24 -07:00
Don Gagne
2448e2adbc More tab fixes 2014-06-29 13:55:55 -07:00
Don Gagne
d5b5dcef24 Fix bugs found through compiler warnings 2014-06-29 12:01:43 -07:00
Lorenz Meier
97e6090700 Merge pull request #937 from gumstix/aerocore
Aerocore
2014-05-15 01:31:24 -07:00
Lorenz Meier
15eaa3aed4 eeprom driver: Use less excessive perf counters on EEPROM 2014-05-14 14:00:51 +02:00
Ash Charles
e5508a1aa0 Add Gumstix AeroCore device
Based on the work of Andrew Smith [1], add board configuration and device
drivers to support the Gumstix AeroCore (previously Aerodroid) board [2]. The
AeroCore is an autopilot board based on a STM32F427 similar to the FMUv2.

[1] https://github.com/smithandrewc/Firmware
[2] https://store.gumstix.com/index.php/products/585/

Signed-off-by: Ash Charles <ashcharles@gmail.com>
2014-05-13 09:41:41 -07:00
Lorenz Meier
71d0d1c404 Make MTD startup less verbose, there are diagnostic commands to read off its state 2014-02-01 15:01:11 +01:00
Andrew Tridgell
e5ad3c31e0 mtd: added "mtd readtest" and "mtd rwtest"
this allows for verification of MTD operation on startup
2014-01-16 07:58:45 +01:00
Andrew Tridgell
ff59aa9a0f mtd: use new MTDIOC_SETSPEED ioctl
set SPI speed to 10MHz
2014-01-16 07:57:32 +01:00