NuttX icon indicating copy to clipboard operation
NuttX copied to clipboard

Backport all CAN-related changes from upstream NuttX

Open JacobCrabill opened this issue 3 years ago • 4 comments

Summary

Extension of https://github.com/PX4/NuttX/pull/185 to include all CAN related development from upstream NuttX beyond PX4's forked 10.1.0+ version.

Open to discussion on how many of these changes we'd like to backport, and how many we'd prefer to leave out. For now, I tried to backport everything that touched PX4-supported CAN drivers or the SocketCAN layer.

Impact

Adds the following features / fixes:

  • SocketCAN drivers for arch/stm32 (bxCAN and FDCAN)
  • SocketCAN drivers arch/stm32h7 (FDCAN) (duplicated from #185)
  • Adds CAN error definitions
  • Changes to network layer around CAN connections
  • Bugfix(es) to IMXRT FlexCAN driver
  • Board updates related to various CAN drivers; example configs
  • Additional CONFIG options for net/can
  • Bug fix to STM32F7 CAN3

Testing

None yet

JacobCrabill avatar May 25 '22 16:05 JacobCrabill

You might want to backport this patch as well. https://github.com/apache/incubator-nuttx/commit/51a845ce54e38ca6ecc13c2fd7029802cb07076f It allows you to listen with multiple applications to the same CAN peripheral

We could also consider upgrading the NuttX kernel in general. I can compile Apache/NuttX master against my own PX4 branch but needs some further testing. https://github.com/petervdperk-nxp/firmware/tree/nuttx_master_10.3+_s32k3

PetervdPerk-NXP avatar Jul 29 '22 09:07 PetervdPerk-NXP

You might want to backport this patch as well. apache/incubator-nuttx@51a845c It allows you to listen with multiple applications to the same CAN peripheral

We could also consider upgrading the NuttX kernel in general. I can compile Apache/NuttX master against my own PX4 branch but needs some further testing. https://github.com/petervdperk-nxp/firmware/tree/nuttx_master_10.3+_s32k3

I have a similar branch compiling against NuttX 10.3; I'm a little concerned about that route, though, just based on the amount of churn / rapid changes to upstream NuttX.

JacobCrabill avatar Jul 30 '22 02:07 JacobCrabill

I have a similar branch compiling against NuttX 10.3; I'm a little concerned about that route, though, just based on the amount of churn / rapid changes to upstream NuttX.

I could not agree more.

davids5 avatar Jul 30 '22 12:07 davids5

I have a similar branch compiling against NuttX 10.3; I'm a little concerned about that route, though, just based on the amount of churn / rapid changes to upstream NuttX.

Although I agree with rapid changes and poor QA control in upstream NuttX. I'll prefer to still to aim to periodically (i.e. anually) base off Upstream NuttX to get also some nice features in, right now we would get things like Task-aware debugging, Tracing etc. but also to ensure that transitioning to a new kernel doesn't have a major impact each time.

Furthermore right now we can build PX4 with both upstream NuttX (10.3+) and PX4 NuttX (10.1+), which is perfect to do some A/B testing and addressing the issues we encounter to Apache/incubator-nuttx.

PetervdPerk-NXP avatar Jul 30 '22 14:07 PetervdPerk-NXP