PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

MR-CANHUBK3 FMU variant revisions

Open dirksavage88 opened this issue 1 year ago • 10 comments

Fixes to mr-canhubk3 fmu to include correcting rotation on the bmm150 integrated on the ADAP board

  • [x] increase lp_default size: https://github.com/PX4/PX4-Autopilot/pull/23109
  • [x] fix to uart buffers
  • [x] uart7 dma for gps or crossfire
  • [ ] fixes to RC uart

dirksavage88 avatar Apr 03 '24 21:04 dirksavage88

Maybe it has to do with the timer output groups that get send to qgc. https://github.com/PX4/PX4-Autopilot/blob/main/Tools/module_config/output_groups_from_timer_config.py

PetervdPerk-NXP avatar Apr 04 '24 16:04 PetervdPerk-NXP

@PetervdPerk-NXP is there a way to debug that script? This is what I am seeing with build output right now:

-- PLATFORM nuttx -- TOOLCHAIN arm-none-eabi -- ARCHITECTURE cortex-m7 -- ROMFSROOT px4fmu_common -- ETHERNET y -- SERIAL_GPS1 /dev/ttyS1 -- SERIAL_GPS2 /dev/ttyS4 -- SERIAL_TEL1 /dev/ttyS2 -- SERIAL_TEL4 /dev/ttyS3 -- SERIAL_RC /dev/ttyS5 -- UAVCAN_INTERFACES 1 -- PX4 config: nxp_mr-canhubk3_fmu -- PX4 platform: nuttx -- cmake build type: MinSizeRel -- ccache enabled (export CCACHE_DISABLE=1 to disable) -- Found PythonInterp: /usr/bin/python3 (found version "3.10.12") -- Using C++11 -- Release build type: MinSizeRel /usr/bin/python3: Error while finding module specification for 'symforce.symbolic' (ModuleNotFoundError: No module named 'symforce') -- ROMFS: ROMFS/px4fmu_common -- ROMFS: Adding boards/nxp/mr-canhubk3/init/rc.board_defaults -> /etc/init.d/rc.board_defaults -- ROMFS: Adding boards/nxp/mr-canhubk3/init/rc.board_sensors -> /etc/init.d/rc.board_sensors -- ROMFS: Adding boards/nxp/mr-canhubk3/init/rc.board_mavlink -> /etc/init.d/rc.board_mavlink -- Configuring done -- Generating done -- Build files have been written to: /home/papadrew/source/Firmware/build/nxp_mr-canhubk3_fmu [282/1128] Generating nuttx/arch/arm/src/libarch.a chip/s32k3xx_emac.c: In function 's32k3xx_addmac': chip/s32k3xx_emac.c:2335:12: warning: unused variable 'crc' [-Wunused-variable] 2335 | uint32_t crc; | ^~~ chip/s32k3xx_emac.c: In function 's32k3xx_rmmac': chip/s32k3xx_emac.c:2383:12: warning: unused variable 'crc' [-Wunused-variable] 2383 | uint32_t crc; | ^~~ [1126/1128] Linking CXX executable nxp_mr-canhubk3_fmu.elf Memory region Used Size Region Size %age Used BOOT_HEADER: 256 B 4 KB 6.25% flash: 1930964 B 3997695 B 48.30% sram0_stdby: 0 GB 32 KB 0.00% sram: 57584 B 272 KB 20.67% itcm: 0 GB 64 KB 0.00% dtcm: 0 GB 128 KB 0.00%

dirksavage88 avatar Apr 04 '24 17:04 dirksavage88

In your build directory it outputs an actuators json file.

PetervdPerk-NXP avatar Apr 04 '24 17:04 PetervdPerk-NXP

Actuators.json looks good. I wonder if it's because i'm flashing the bin file which is missing some metadata? @PetervdPerk-NXP how are you flashing px4 firmware on the canhubk3 ?

dirksavage88 avatar Apr 04 '24 18:04 dirksavage88

That actuator.json eventually ends up somewhere in .rodata. I'm just flashing the bin file as well.

PetervdPerk-NXP avatar Apr 04 '24 20:04 PetervdPerk-NXP

@dagar is the bin file missing some metadata? I tracked the the issue in QGC to this error: motorunfail

dirksavage88 avatar Apr 04 '24 20:04 dirksavage88

FMU version details canub_ver

dirksavage88 avatar Apr 09 '24 15:04 dirksavage88

The issue of the actuators tab not populating is a separate problem that can be addressed in a different PR, for now I was able to get actuators tab and geometries to come up over the ( T1 converter)UDP mavlink connection.

dirksavage88 avatar Apr 11 '24 15:04 dirksavage88

For anyone wanting to get crosfire to work on this board, I have a patch until this PR gets updated and goes through. I was unable to get SBUS to work over the ADAP rc port so resorted to crosfire on the ADAP board GPS port. crsf_canhub.tar.gz

dirksavage88 avatar Apr 14 '24 00:04 dirksavage88

https://review.px4.io/plot_app?log=d6e0a7c1-7fcf-4383-bf57-9b624416c011

https://review.px4.io/plot_app?log=370a4be3-5c26-4678-a4e7-40d1c9dd3fa6

dirksavage88 avatar May 06 '24 13:05 dirksavage88