diff --git a/ROMFS/CMakeLists.txt b/ROMFS/CMakeLists.txt index eb428bf393..9630a57485 100644 --- a/ROMFS/CMakeLists.txt +++ b/ROMFS/CMakeLists.txt @@ -187,6 +187,50 @@ foreach(board_rc_file ${OPTIONAL_BOARD_RC}) endforeach() + +if(config_uavcan_peripheral_firmware) + + include(ExternalProject) + + foreach(uavcan_peripheral_config ${config_uavcan_peripheral_firmware}) + # include the px4io binary in ROMFS + message(STATUS "ROMFS: Building and including UAVCAN peripheral ${uavcan_peripheral_config}") + ExternalProject_Add(build_${uavcan_peripheral_config} + SOURCE_DIR ${CMAKE_SOURCE_DIR} + DOWNLOAD_COMMAND "" + UPDATE_COMMAND "" + CMAKE_ARGS -DCONFIG=${uavcan_peripheral_config} + INSTALL_COMMAND "" + USES_TERMINAL_BUILD true + DEPENDS git_nuttx git_nuttx_apps + BUILD_ALWAYS 1 + ) + + ExternalProject_Get_Property(build_${uavcan_peripheral_config} BINARY_DIR) + + add_custom_command( + OUTPUT + ${romfs_gen_root_dir}/uavcan/fw/org.ardupilot.cuav_gps/gps.bin + #${romfs_gen_root_dir}/uavcan/fw/org.ardupilot.cuav_gps/3.233/gps.bin + #${romfs_gen_root_dir}/uavcan/fw/${uavcan_peripheral_config} + ${uavcan_peripheral_config}.stamp + #COMMAND mkdir -p ${romfs_gen_root_dir}/uavcan/fw/org.cuav.can-gps-v1/0.1/ + #COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/*.uavcan.bin ${romfs_gen_root_dir}/uavcan/fw/org.cuav.can-gps-v1/0.1/ + COMMAND mkdir -p ${romfs_gen_root_dir}/uavcan/fw/org.ardupilot.cuav_gps/ + COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/*.uavcan.bin ${romfs_gen_root_dir}/uavcan/fw/org.ardupilot.cuav_gps/gps.bin + COMMAND ls -lsa ${romfs_gen_root_dir}/uavcan/fw/ + COMMAND ${CMAKE_COMMAND} -E touch ${uavcan_peripheral_config}.stamp + DEPENDS + build_${uavcan_peripheral_config} + COMMENT "ROMFS: copying ${uavcan_peripheral_config}" + ) + + list(APPEND extras_dependencies + ${uavcan_peripheral_config}.stamp + ) + endforeach() +endif() + list(APPEND extras_dependencies ${config_romfs_extra_dependencies} ) diff --git a/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig b/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig index fe55ba529b..bc9eac05c2 100644 --- a/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig +++ b/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig @@ -89,7 +89,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/ark/can-flow/nuttx-config/nsh/defconfig b/boards/ark/can-flow/nuttx-config/nsh/defconfig index 942264c754..cb8e62f36b 100644 --- a/boards/ark/can-flow/nuttx-config/nsh/defconfig +++ b/boards/ark/can-flow/nuttx-config/nsh/defconfig @@ -69,7 +69,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/cuav/can-gps-v1/debug.cmake b/boards/cuav/can-gps-v1/debug.cmake new file mode 100644 index 0000000000..dd8613a8f4 --- /dev/null +++ b/boards/cuav/can-gps-v1/debug.cmake @@ -0,0 +1,53 @@ + + +# UAVCAN boot loadable Module ID +set(uavcanblid_sw_version_major 0) +set(uavcanblid_sw_version_minor 1) +add_definitions( + -DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major} + -DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor} +) + +set(uavcanblid_hw_version_major 1) +set(uavcanblid_hw_version_minor 0) +set(uavcanblid_name "\"org.cuav.can-gps-v1\"") + +add_definitions( + -DHW_UAVCAN_NAME=${uavcanblid_name} + -DHW_VERSION_MAJOR=${uavcanblid_hw_version_major} + -DHW_VERSION_MINOR=${uavcanblid_hw_version_minor} +) +add_definitions(-DUSE_S_RGB_LED_DMA) + +px4_add_board( + PLATFORM nuttx + VENDOR cuav + MODEL can-gps-v1 + LABEL debug + TOOLCHAIN arm-none-eabi + ARCHITECTURE cortex-m4 + ROMFSROOT cannode + UAVCAN_INTERFACES 1 + DRIVERS + barometer/ms5611 + bootloaders + gps + lights/neopixel + magnetometer/rm3100 + safety_button + tone_alarm + uavcannode + MODULES + load_mon + SYSTEMCMDS + i2cdetect + led_control + param + perf + reboot + top + topic_listener + tune_control + ver + work_queue +) diff --git a/boards/cuav/can-gps-v1/nuttx-config/nsh/defconfig b/boards/cuav/can-gps-v1/nuttx-config/nsh/defconfig index 7059f5bbe9..8152cd2109 100644 --- a/boards/cuav/can-gps-v1/nuttx-config/nsh/defconfig +++ b/boards/cuav/can-gps-v1/nuttx-config/nsh/defconfig @@ -69,7 +69,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/cuav/nora/nuttx-config/nsh/defconfig b/boards/cuav/nora/nuttx-config/nsh/defconfig index 049c485b1c..122801f8cc 100644 --- a/boards/cuav/nora/nuttx-config/nsh/defconfig +++ b/boards/cuav/nora/nuttx-config/nsh/defconfig @@ -63,6 +63,7 @@ CONFIG_FAT_DMAMEMORY=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FAT_LFN_ALIAS_HASH=y +CONFIG_FAT_MAXFNAME=64 CONFIG_FDCLONE_STDIO=y CONFIG_FS_BINFS=y CONFIG_FS_CROMFS=y @@ -94,7 +95,7 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PROGMEM=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/cuav/nora/uavcan.cmake b/boards/cuav/nora/uavcan.cmake new file mode 100644 index 0000000000..b1394142f7 --- /dev/null +++ b/boards/cuav/nora/uavcan.cmake @@ -0,0 +1,128 @@ + +px4_add_board( + PLATFORM nuttx + VENDOR cuav + MODEL nora + LABEL uavcan + TOOLCHAIN arm-none-eabi + ARCHITECTURE cortex-m7 + ROMFSROOT px4fmu_common + #BUILD_BOOTLOADER + #TESTING + UAVCAN_INTERFACES 2 + UAVCAN_TIMER_OVERRIDE 2 + UAVCAN_PERIPHERALS + cuav_can-gps-v1_default + SERIAL_PORTS + GPS1:/dev/ttyS0 + TEL1:/dev/ttyS1 + GPS2:/dev/ttyS2 + TEL2:/dev/ttyS3 + # CONSOLE: /dev/ttyS4 + # RC: /dev/ttyS5 + DRIVERS + adc/board_adc + barometer # all available barometer drivers + batt_smbus + camera_capture + camera_trigger + differential_pressure # all available differential pressure drivers + distance_sensor # all available distance sensor drivers + dshot + gps + heater + #imu # all available imu drivers + imu/bosch/bmi088 + imu/invensense/icm20649 + imu/invensense/icm20689 + irlock + lights/blinkm + lights/rgbled + lights/rgbled_ncp5623c + lights/rgbled_pwm + magnetometer # all available magnetometer drivers + mkblctrl + optical_flow # all available optical flow drivers + #osd + pca9685 + power_monitor/ina226 + #protocol_splitter + pwm_out_sim + pwm_out + rc_input + roboclaw + safety_button + #tap_esc + telemetry # all available telemetry drivers + #test_ppm + tone_alarm + uavcan + MODULES + airspeed_selector + attitude_estimator_q + battery_status + camera_feedback + commander + dataman + ekf2 + events + flight_mode_manager + fw_att_control + fw_pos_control_l1 + land_detector + landing_target_estimator + load_mon + local_position_estimator + logger + mavlink + mc_att_control + mc_hover_thrust_estimator + mc_pos_control + mc_rate_control + navigator + rc_update + rover_pos_control + sensors + sih + temperature_compensation + vmount + vtol_att_control + SYSTEMCMDS + #bl_update + dmesg + dumpfile + esc_calib + hardfault_log + i2cdetect + led_control + mft + mixer + motor_ramp + motor_test + mtd + nshterm + param + perf + pwm + reboot + reflect + sd_bench + system_time + #tests # tests and test runner + top + topic_listener + tune_control + usb_connected + ver + work_queue + EXAMPLES + #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello + #hwtest # Hardware test + #matlab_csv_serial + #px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html + #px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html + #rover_steering_control # Rover example app + #uuv_example_app + #work_item + ) diff --git a/boards/cuav/x7pro/nuttx-config/nsh/defconfig b/boards/cuav/x7pro/nuttx-config/nsh/defconfig index cb591e76a0..33d0d27156 100644 --- a/boards/cuav/x7pro/nuttx-config/nsh/defconfig +++ b/boards/cuav/x7pro/nuttx-config/nsh/defconfig @@ -94,7 +94,7 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PROGMEM=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/cuav/x7pro/uavcan.cmake b/boards/cuav/x7pro/uavcan.cmake new file mode 100644 index 0000000000..3f61242184 --- /dev/null +++ b/boards/cuav/x7pro/uavcan.cmake @@ -0,0 +1,128 @@ + +px4_add_board( + PLATFORM nuttx + VENDOR cuav + MODEL x7pro + LABEL uavcan + TOOLCHAIN arm-none-eabi + ARCHITECTURE cortex-m7 + ROMFSROOT px4fmu_common + #BUILD_BOOTLOADER + #TESTING + UAVCAN_INTERFACES 2 + UAVCAN_TIMER_OVERRIDE 2 + UAVCAN_PERIPHERALS + cuav_can-gps-v1_default + SERIAL_PORTS + GPS1:/dev/ttyS0 + TEL1:/dev/ttyS1 + GPS2:/dev/ttyS2 + TEL2:/dev/ttyS3 + # CONSOLE: /dev/ttyS4 + # RC: /dev/ttyS5 + DRIVERS + adc/board_adc + barometer # all available barometer drivers + batt_smbus + camera_capture + camera_trigger + differential_pressure # all available differential pressure drivers + distance_sensor # all available distance sensor drivers + dshot + gps + heater + #imu # all available imu drivers + imu/bosch/bmi088 + imu/invensense/icm20649 + imu/invensense/icm20689 + irlock + lights/blinkm + lights/rgbled + lights/rgbled_ncp5623c + lights/rgbled_pwm + magnetometer # all available magnetometer drivers + mkblctrl + optical_flow # all available optical flow drivers + #osd + pca9685 + power_monitor/ina226 + #protocol_splitter + pwm_out_sim + pwm_out + rc_input + roboclaw + safety_button + #tap_esc + telemetry # all available telemetry drivers + #test_ppm + tone_alarm + uavcan + MODULES + airspeed_selector + attitude_estimator_q + battery_status + camera_feedback + commander + dataman + ekf2 + events + flight_mode_manager + fw_att_control + fw_pos_control_l1 + land_detector + landing_target_estimator + load_mon + local_position_estimator + logger + mavlink + mc_att_control + mc_hover_thrust_estimator + mc_pos_control + mc_rate_control + navigator + rc_update + rover_pos_control + sensors + sih + temperature_compensation + vmount + vtol_att_control + SYSTEMCMDS + #bl_update + dmesg + dumpfile + esc_calib + hardfault_log + i2cdetect + led_control + mft + mixer + motor_ramp + motor_test + mtd + nshterm + param + perf + pwm + reboot + reflect + sd_bench + system_time + #tests # tests and test runner + top + topic_listener + tune_control + usb_connected + ver + work_queue + EXAMPLES + #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello + #hwtest # Hardware test + #matlab_csv_serial + #px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html + #px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html + #rover_steering_control # Rover example app + #uuv_example_app + #work_item + ) diff --git a/boards/cubepilot/cubeorange/nuttx-config/console/defconfig b/boards/cubepilot/cubeorange/nuttx-config/console/defconfig index 1401c709e4..f608cf5acd 100644 --- a/boards/cubepilot/cubeorange/nuttx-config/console/defconfig +++ b/boards/cubepilot/cubeorange/nuttx-config/console/defconfig @@ -95,7 +95,7 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PROGMEM=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/cubepilot/cubeorange/nuttx-config/nsh/defconfig b/boards/cubepilot/cubeorange/nuttx-config/nsh/defconfig index 81b06012f2..3cf97428d0 100644 --- a/boards/cubepilot/cubeorange/nuttx-config/nsh/defconfig +++ b/boards/cubepilot/cubeorange/nuttx-config/nsh/defconfig @@ -96,7 +96,7 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PROGMEM=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/cubepilot/cubeyellow/nuttx-config/console/defconfig b/boards/cubepilot/cubeyellow/nuttx-config/console/defconfig index 5a6a93e127..640267ceca 100644 --- a/boards/cubepilot/cubeyellow/nuttx-config/console/defconfig +++ b/boards/cubepilot/cubeyellow/nuttx-config/console/defconfig @@ -94,7 +94,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/cubepilot/cubeyellow/nuttx-config/nsh/defconfig b/boards/cubepilot/cubeyellow/nuttx-config/nsh/defconfig index 32607f0538..0f9b50d6c3 100644 --- a/boards/cubepilot/cubeyellow/nuttx-config/nsh/defconfig +++ b/boards/cubepilot/cubeyellow/nuttx-config/nsh/defconfig @@ -95,7 +95,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig b/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig index 17470801c3..fbe9809b6d 100644 --- a/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig +++ b/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig @@ -95,7 +95,7 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PROGMEM=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig b/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig index 0c9a38350f..3daa2863ef 100644 --- a/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig +++ b/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig @@ -96,7 +96,7 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PROGMEM=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/holybro/kakutef7/nuttx-config/nsh/defconfig b/boards/holybro/kakutef7/nuttx-config/nsh/defconfig index 0e1754d532..a6cdc980e3 100644 --- a/boards/holybro/kakutef7/nuttx-config/nsh/defconfig +++ b/boards/holybro/kakutef7/nuttx-config/nsh/defconfig @@ -95,7 +95,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/holybro/pix32v5/nuttx-config/nsh/defconfig b/boards/holybro/pix32v5/nuttx-config/nsh/defconfig index b49a6e67ce..87c2d041bc 100644 --- a/boards/holybro/pix32v5/nuttx-config/nsh/defconfig +++ b/boards/holybro/pix32v5/nuttx-config/nsh/defconfig @@ -94,7 +94,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/modalai/fc-v1/nuttx-config/nsh/defconfig b/boards/modalai/fc-v1/nuttx-config/nsh/defconfig index ef73eb19bd..138dd717b5 100644 --- a/boards/modalai/fc-v1/nuttx-config/nsh/defconfig +++ b/boards/modalai/fc-v1/nuttx-config/nsh/defconfig @@ -93,7 +93,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig b/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig index 6a15a872d0..6fd91b46dd 100644 --- a/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig +++ b/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig @@ -93,7 +93,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/mro/pixracerpro/nuttx-config/nsh/defconfig b/boards/mro/pixracerpro/nuttx-config/nsh/defconfig index 74a31bd189..93572c0ce4 100644 --- a/boards/mro/pixracerpro/nuttx-config/nsh/defconfig +++ b/boards/mro/pixracerpro/nuttx-config/nsh/defconfig @@ -96,7 +96,7 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PROGMEM=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/mro/x21-777/nuttx-config/nsh/defconfig b/boards/mro/x21-777/nuttx-config/nsh/defconfig index f09e985f7a..8475cef186 100644 --- a/boards/mro/x21-777/nuttx-config/nsh/defconfig +++ b/boards/mro/x21-777/nuttx-config/nsh/defconfig @@ -93,7 +93,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/mro/x21/nuttx-config/nsh/defconfig b/boards/mro/x21/nuttx-config/nsh/defconfig index b927ff5d58..879c3e13d8 100644 --- a/boards/mro/x21/nuttx-config/nsh/defconfig +++ b/boards/mro/x21/nuttx-config/nsh/defconfig @@ -89,7 +89,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig b/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig index 03ec395887..d51595f39a 100644 --- a/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig +++ b/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig @@ -150,7 +150,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v2/nuttx-config/nsh/defconfig b/boards/px4/fmu-v2/nuttx-config/nsh/defconfig index 4b9890a553..1697e7aebb 100644 --- a/boards/px4/fmu-v2/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v2/nuttx-config/nsh/defconfig @@ -94,7 +94,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v3/nuttx-config/nsh/defconfig b/boards/px4/fmu-v3/nuttx-config/nsh/defconfig index 1016ccb99a..38b0633467 100644 --- a/boards/px4/fmu-v3/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v3/nuttx-config/nsh/defconfig @@ -89,7 +89,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig b/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig index ec3e2a4edb..112a1950d0 100644 --- a/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig +++ b/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig @@ -90,7 +90,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v4/nuttx-config/nsh/defconfig b/boards/px4/fmu-v4/nuttx-config/nsh/defconfig index d135e4dd34..4edf187646 100644 --- a/boards/px4/fmu-v4/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v4/nuttx-config/nsh/defconfig @@ -89,7 +89,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v4/nuttx-config/optimized/defconfig b/boards/px4/fmu-v4/nuttx-config/optimized/defconfig index 3a6c78bb6b..cfc7d5f8ba 100644 --- a/boards/px4/fmu-v4/nuttx-config/optimized/defconfig +++ b/boards/px4/fmu-v4/nuttx-config/optimized/defconfig @@ -90,7 +90,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig b/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig index fa0d897891..c4414b40f5 100644 --- a/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig +++ b/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig @@ -90,7 +90,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig b/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig index 8cf6f743e1..941826fa52 100644 --- a/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig @@ -89,7 +89,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig b/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig index e95158d3fd..7871566e5f 100644 --- a/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig @@ -94,7 +94,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v5/nuttx-config/debug/defconfig b/boards/px4/fmu-v5/nuttx-config/debug/defconfig index 8b6e3e8fa7..4ffbb3d266 100644 --- a/boards/px4/fmu-v5/nuttx-config/debug/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/debug/defconfig @@ -138,7 +138,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig b/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig index f11048a173..f2823eb47c 100644 --- a/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig @@ -94,7 +94,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v5/nuttx-config/nsh/defconfig b/boards/px4/fmu-v5/nuttx-config/nsh/defconfig index 202dcbbff1..9fb0684c3a 100644 --- a/boards/px4/fmu-v5/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/nsh/defconfig @@ -94,7 +94,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v5/nuttx-config/optimized/defconfig b/boards/px4/fmu-v5/nuttx-config/optimized/defconfig index 464e7dc6bf..3c0188b519 100644 --- a/boards/px4/fmu-v5/nuttx-config/optimized/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/optimized/defconfig @@ -95,7 +95,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig b/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig index 8aee4c4679..eb81361a5a 100644 --- a/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig @@ -95,7 +95,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/boards/px4/fmu-v5/uavcan.cmake b/boards/px4/fmu-v5/uavcan.cmake new file mode 100644 index 0000000000..6fd4cfbd58 --- /dev/null +++ b/boards/px4/fmu-v5/uavcan.cmake @@ -0,0 +1,138 @@ + +px4_add_board( + PLATFORM nuttx + VENDOR px4 + MODEL fmu-v5 + LABEL uavcan + TOOLCHAIN arm-none-eabi + ARCHITECTURE cortex-m7 + ROMFSROOT px4fmu_common + #BUILD_BOOTLOADER + #TESTING + UAVCAN_INTERFACES 2 + UAVCAN_PERIPHERALS + cuav_can-gps-v1_default + SERIAL_PORTS + GPS1:/dev/ttyS0 + TEL1:/dev/ttyS1 + TEL2:/dev/ttyS2 + TEL4:/dev/ttyS3 + DRIVERS + adc/board_adc + #adc/ads1115 + barometer # all available barometer drivers + batt_smbus + camera_capture + camera_trigger + differential_pressure # all available differential pressure drivers + distance_sensor # all available distance sensor drivers + dshot + gps + #heater + #imu # all available imu drivers + imu/adis16448 + imu/adis16477 + imu/adis16497 + imu/bosch/bmi055 + imu/invensense/icm20602 + imu/invensense/icm20689 + #imu/mpu6000 # legacy icm20602/icm20689 driver + irlock + lights/blinkm + lights/rgbled + lights/rgbled_ncp5623c + lights/rgbled_pwm + magnetometer # all available magnetometer drivers + mkblctrl + optical_flow # all available optical flow drivers + #osd + pca9685 + #pca9685_pwm_out + power_monitor/ina226 + #protocol_splitter + #pwm_input + pwm_out_sim + pwm_out + px4io + rc_input + roboclaw + #rpm + safety_button + #tap_esc + telemetry # all available telemetry drivers + #test_ppm + tone_alarm + uavcan + MODULES + airspeed_selector + attitude_estimator_q + battery_status + camera_feedback + commander + dataman + ekf2 + #esc_battery + events + flight_mode_manager + fw_att_control + fw_pos_control_l1 + land_detector + landing_target_estimator + load_mon + local_position_estimator + logger + mavlink + mc_att_control + mc_hover_thrust_estimator + mc_pos_control + mc_rate_control + #micrortps_bridge + navigator + rc_update + rover_pos_control + sensors + sih + temperature_compensation + #uuv_att_control + vmount + vtol_att_control + SYSTEMCMDS + #bl_update + dmesg + dumpfile + esc_calib + #gpio + hardfault_log + i2cdetect + led_control + mft + mixer + motor_ramp + motor_test + mtd + nshterm + param + perf + pwm + reboot + reflect + sd_bench + system_time + #tests # tests and test runner + top + topic_listener + tune_control + usb_connected + ver + work_queue + EXAMPLES + #fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control + #hello + #hwtest # Hardware test + #matlab_csv_serial + #px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html + #px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html + #rover_steering_control # Rover example app + #uuv_example_app + #work_item + ) diff --git a/boards/uvify/core/nuttx-config/nsh/defconfig b/boards/uvify/core/nuttx-config/nsh/defconfig index f4465b7750..72be16930c 100644 --- a/boards/uvify/core/nuttx-config/nsh/defconfig +++ b/boards/uvify/core/nuttx-config/nsh/defconfig @@ -89,7 +89,7 @@ CONFIG_MTD=y CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_RAMTRON=y -CONFIG_NAME_MAX=40 +CONFIG_NAME_MAX=64 CONFIG_NFILE_DESCRIPTORS=12 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHROMFS=y diff --git a/cmake/px4_add_board.cmake b/cmake/px4_add_board.cmake index df9a339c71..459b27b8fa 100644 --- a/cmake/px4_add_board.cmake +++ b/cmake/px4_add_board.cmake @@ -50,6 +50,7 @@ # [ IO ] # [ BOOTLOADER ] # [ UAVCAN_INTERFACES ] +# [ UAVCAN_PERIPHERALS ] # [ DRIVERS ] # [ MODULES ] # [ SYSTEMCMDS ] @@ -74,6 +75,7 @@ # IO : name of IO board to be built and included in the ROMFS (requires a valid ROMFSROOT) # BOOTLOADER : bootloader file to include for flashing via bl_update (currently NuttX only) # UAVCAN_INTERFACES : number of interfaces for UAVCAN +# UAVCAN_PERIPHERALS : list of UAVCAN peripheral firmware to build and embed # DRIVERS : list of drivers to build for this board (relative to src/drivers) # MODULES : list of modules to build for this board (relative to src/modules) # SYSTEMCMDS : list of system commands to build for this board (relative to src/systemcmds) @@ -154,6 +156,7 @@ function(px4_add_board) SYSTEMCMDS EXAMPLES SERIAL_PORTS + UAVCAN_PERIPHERALS EMBEDDED_METADATA OPTIONS BUILD_BOOTLOADER @@ -236,6 +239,10 @@ function(px4_add_board) if(IO) set(config_io_board ${IO} CACHE INTERNAL "IO" FORCE) endif() + + if(UAVCAN_PERIPHERALS) + set(config_uavcan_peripheral_firmware ${UAVCAN_PERIPHERALS} CACHE INTERNAL "UAVCAN peripheral firmware" FORCE) + endif() endif() if(UAVCAN_INTERFACES) diff --git a/src/drivers/bootloaders/CMakeLists.txt b/src/drivers/bootloaders/CMakeLists.txt index 3fca22697d..10b806e463 100644 --- a/src/drivers/bootloaders/CMakeLists.txt +++ b/src/drivers/bootloaders/CMakeLists.txt @@ -57,7 +57,7 @@ if(NOT "${PX4_BOARD_LABEL}" MATCHES "canbootloader") if ("${uavcanbl_git_desc}" STREQUAL "") set(uavcanbl_git_desc ffffffff) endif() - set(uavcan_bl_imange_name ${HWNAME}-${HW_MAJOR}.${HW_MINOR}-${SW_MAJOR}.${SW_MINOR}.${uavcanbl_git_desc}.uavcan.bin) + set(uavcan_bl_imange_name ${HWNAME}-${HW_MAJOR}.${HW_MINOR}-${SW_MAJOR}.${SW_MINOR}.uavcan.bin) message(STATUS "Generating UAVCAN Bootable as ${uavcan_bl_imange_name}") add_custom_command(OUTPUT ${uavcan_bl_imange_name} COMMAND