Commit Graph

37 Commits

Author SHA1 Message Date
Daniel Agar 0029a75ab0 systemcmds: convert c -> c++ 2021-12-21 09:22:49 -05:00
Daniel Agar f5d9b01f5c NuttX build in place
- cmake NuttX build wrapper compile in place instead of copying source tree to build directory
    - slightly faster skipping necessary copying (depending on system)
    - allows debugging in place
    - easier to work directly in NuttX following official documentation
    - simplifies overall build which should make it easier to resolve any remaining NuttX dependency issues in the build system
 - the downside is switching back and forth between different builds always require rebuilding NuttX, but I think this is worth the improved developer experience
 - also no longer builds px4io and bootloader in every single build, for most users these rarely change and we're wasting a lot of build time
2021-11-15 18:47:38 -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
Daniel Agar 2f99857b0a systemcmds/bl_update: add CONFIG_ARCH_CHIP_STM32F7 file size limit 2021-09-01 15:16:00 -04:00
Hyungsub d089d4a6a4 fix memory bugs in replay and bl_update 2021-08-18 07:45:51 +02:00
Daniel Agar fe1eb8cd62 cmake cleanup jlink flashing helpers 2021-07-23 15:07:25 -04:00
Daniel Agar d79eea0c41 Jenkins: HIL flash bootloaders
- add new jlink_upload_bootloader helper target
2021-07-18 23:33:00 -04:00
David Sidrane 1b80018f30 systemcmds:Use inttypes 2021-06-16 17:07:47 +02:00
Daniel Agar f8eaa6e46b ROMFS handle bl_update generically
- include all available legacy bootloaders
2021-03-11 00:38:18 +01:00
David Sidrane 68703135c3 bl_update:Respect page size if it matters
Track Changes in NuttX stm32h7 flash driver:
   The STM32H7 flash driver uses up_progmem_pagesize to
   describe minimum write size to satify the block size
   requierment for ECC.

   Therefore, the image size needs to be padded to a multiple
   of up_progmem_pagesize()
2020-09-29 23:44:24 -04:00
Daniel Agar a694f0bbdd bl_update: build and include board bootloader if config available 2019-11-16 11:43:42 +01:00
David Sidrane 0f2a7ad2b7 bl_update:STM32H7 use AIXRAM 2019-11-16 11:43:42 +01:00
David Sidrane 645b6c3fbc bl_update:STM32H7 use 128K 2019-11-16 11:43:42 +01:00
David Sidrane e847698c9f PX4 System changes Supporting STM32H7
stm32:ToneAlarmInterfacePWM TIM15-TIM17 have a BDTR Register

common:board_crashdump Add H7 support

stm32/board_mcu_version:Support H7

PX4 ADC:Use 32 interface and resoution abstraction

Added PX4 stm32h7 ADC driver

stm32h7:adc fix ADC ready check

fmu: handle BOARD_HAS_PWM==5

cmake: improve error handling for NuttX olddefconfig failures

WorkQueueManager:Quiet loadmon stack warning

camera_trigger:GPIO support < 6 GPIO

Adjust stack sizes (under hw stack check)

PX4 System changes Supporting STM32H7 PX4IO Driver

aerotenna_ocpoc:ADC add px4_arch_adc_dn_fullcount

init.cmake:Track Upstream change needing Make.def at config time

PX4 System changes Supporting STM32H7

NuttX CMakeLists.txt Track upstream changes

Common board_crashdump add header and px4 config

NuttX simplify callinb make libapps

Use UINT32_MAX for error return

drivers:uavcannode NuttX chip is now hardware

drivers:uavcanesc NuttX chip is now hardware

px4io:Avoid Race on AP to PX4 IO upgrade
2019-11-16 11:43:42 +01: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
David Sidrane f96c47ae1b stm32f7 bootloader update support (#11394)
* micro_hal: F7 add flash
* micro_hal: F7 non up_progmem functions
* bl_update: Add F7 Support
2019-06-15 21:46:46 -04:00
Daniel Agar b35d048566 cmake enable -Wcast-align and disable per module 2019-03-16 11:47:15 -04:00
David Sidrane f00d633196 flashfs:Upstream renamed up_progmem_erasepage to up_progmem_eraseblock 2019-01-25 06:32:37 -08: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
Mara Bos 10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02: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 cb21aced5e PX4 System: Upstream NuttX defconfig changes
was:CONFIG_STM32_STM32F40XX is:CONFIG_STM32_STM32F4XXX
2017-09-29 10:13:51 -04:00
Beat Küng 05c3b711f3 fix bl_update: move definition of print_usage into the ifdef
fixes the compile error:
error: 'print_usage' defined but not used [-Werror=unused-function]
2017-07-14 11:57:11 +02:00
Beat Küng be25c337f9 bl_update: add documentation & do cleanup (remove err(), ...) 2017-07-14 11:57:11 +02:00
David Sidrane 7e425c8ff2 Disable bl_upload command on non F4 tartgets
Upstream nuttx needs to have the flash programing support added.
2017-02-13 21:37:38 +01:00
David Sidrane 94450eb43a Use PX4_FLASH_BASE from micro HAL 2017-02-13 21:37:38 +01:00
David Sidrane c685cdbfce Use the NuttXs progmem api to progrem flash 2017-02-12 08:57:29 +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
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
James Goppert 967e4dd127 Modified cmake to use STACK_MAX and STACK_MAIN 2016-04-14 13:36:36 -04:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Daniel Agar 8b2ce6708a format src/systemcmds/bl_update 2015-09-05 12:21:10 -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
Andrew Tridgell 8240e90d26 bl_update: fixed stat() check 2015-02-26 08:22:23 +01:00
Lorenz Meier 5c51adf5f7 bl_update: Improve bootloader error reporting 2014-12-26 14:49:18 +01:00
Lorenz Meier 574e765321 Moved all system commands to the new world 2013-04-27 11:50:10 +02:00