Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]: uavcannode (v1) testing branch #14518

Closed
wants to merge 7 commits into from
Closed

[WIP]: uavcannode (v1) testing branch #14518

wants to merge 7 commits into from

Conversation

dagar
Copy link
Member

@dagar dagar commented Mar 29, 2020

@dagar
Copy link
Member Author

dagar commented Mar 30, 2020

Updated NuttX, NuttX-apps, and rebased on current master.

@dagar
Copy link
Member Author

dagar commented Mar 30, 2020

Compile failure in px4_fmu-v5_default (has networking support).

[321/1334] Generating nuttx/net/libnet.a
FAILED: cd /home/dagar/git/Firmware/build/px4_fmu-v5x_default/NuttX/nuttx && find net -type f -name *.o -delete && make -C net --quiet --no-print-directory all TOPDIR=/home/dagar/git/Firmware/build/px4_fmu-v5x_default/NuttX/nuttx KERNEL=y EXTRADEFINES=-D__KERNEL__
inet/inet_sockif.c:94:19: error: static declaration of 'inet_recvfrom' follows non-static declaration
 static ssize_t    inet_recvfrom(FAR struct socket *psock, FAR void *buf,
                   ^~~~~~~~~~~~~
In file included from inet/inet_sockif.c:57:0:
./inet/inet.h:286:9: note: previous declaration of 'inet_recvfrom' was here
 ssize_t inet_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
         ^~~~~~~~~~~~~
inet/inet_sockif.c: In function 'inet_send':
inet/inet_sockif.c:1091:17: error: too many arguments to function 'psock_tcp_send'
           ret = psock_tcp_send(psock, buf, len, flags);
                 ^~~~~~~~~~~~~~
In file included from inet/inet_sockif.c:51:0:
./tcp/tcp.h:1300:9: note: declared here
 ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf,
         ^~~~~~~~~~~~~~
Makefile:103: recipe for target 'inet_sockif.o' failed
make[1]: *** [inet_sockif.o] Error 1
[321/1334] Generating nuttx/arch/arm/src/libarch.a
FAILED: cd /home/dagar/git/Firmware/build/px4_fmu-v5x_default/NuttX/nuttx && find arch/arm/src -type f -name *.o -delete && make -C arch/arm/src --quiet --no-print-directory all TOPDIR=/home/dagar/git/Firmware/build/px4_fmu-v5x_default/NuttX/nuttx KERNEL=y EXTRADEFINES=-D__KERNEL__
chip/stm32_ethernet.c: In function 'stm32_poll_work':
chip/stm32_ethernet.c:2383:34: error: passing argument 2 of 'devif_timer' makes integer from pointer without a cast [-Werror=int-conversion]
           (void)devif_timer(dev, stm32_txpoll);
                                  ^~~~~~~~~~~~
In file included from chip/stm32_ethernet.c:59:0:
/home/dagar/git/Firmware/build/px4_fmu-v5x_default/NuttX/nuttx/include/nuttx/net/netdev.h:544:5: note: expected 'int' but argument is of type 'int (*)(struct net_driver_s *)'
 int devif_timer(FAR struct net_driver_s *dev, int delay,
     ^~~~~~~~~~~
chip/stm32_ethernet.c:2383:17: error: too few arguments to function 'devif_timer'
           (void)devif_timer(dev, stm32_txpoll);
                 ^~~~~~~~~~~
In file included from chip/stm32_ethernet.c:59:0:
/home/dagar/git/Firmware/build/px4_fmu-v5x_default/NuttX/nuttx/include/nuttx/net/netdev.h:544:5: note: declared here
 int devif_timer(FAR struct net_driver_s *dev, int delay,
     ^~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:172: recipe for target 'stm32_ethernet.o' failed
make[1]: *** [stm32_ethernet.o] Error 1

@LorenzMeier LorenzMeier requested a review from dinomani April 2, 2020 15:14
@dagar dagar force-pushed the pr-cannode-v1 branch 3 times, most recently from f9d7203 to 4543ee1 Compare April 7, 2020 04:26
@dagar dagar requested a review from PetervdPerk-NXP April 7, 2020 04:26
@dagar
Copy link
Member Author

dagar commented Apr 7, 2020

Updated with merged NuttX changes and rebased on current master.

 - Fixed uavcannnode_v1 compile errors
 - Updated RDDRONE-UAVCAN146 defconfig

Added NETDEV_LATEINIT support in FMUK66

To both initialize both Ethernet & CAN on init
@dagar
Copy link
Member Author

dagar commented Apr 7, 2020

I've created a new nxp_fmuk66-v3_socketcan target for testing.

@dagar dagar added the Board: nxp-rddrone-fmuk66 NXP HoverGames FMU w/K66 processor label Apr 7, 2020
Added option to toggle between classical CAN & CAN FD
Corrected SocketCAN config for FMUK66
@PetervdPerk-NXP
Copy link
Member

Latest commit should work correctly and is publishing a string to a UAVCAN v1 topic. To test it u can use the scripts in here https://github.com/PetervdPerk-NXP/cannode-v1-tools

@PetervdPerk-NXP
Copy link
Member

We can now subscribe to the vehicle_gps_position uORB topic and publish a VehicleGPSPosition.1.0.uavcan UAVCAN v1 message.

To test this use the print_vehicle_gps_position_topic.py script to parse the output.

Re-publishing to the vehicle_gps_position uORB topic on another board is not working, because for some reason the libcanard library parser invalidates the frames I'm sending. Which has to be debugged further.

…UAVCAN msg (still no DSDL)

UAVCAN146 enabled romfs for cannode rCS startup
UAVCAN146 added PX4 fixes to linker script
UAVCAN146 enabled extendend time & termios for GPS
increased iob buffer to avoid dropped frames since we're running on a low prio (100)
TODO to make this work need PX4/NuttX #99
@dagar dagar changed the title [DO NOT MERGE]: uavcannode (v1) testing branch [WIP]: uavcannode (v1) testing branch Apr 30, 2020
@stale
Copy link

stale bot commented Jul 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Jul 29, 2020
@LorenzMeier
Copy link
Member

I'm closing this as there is a more recent PR with the same scope.

@LorenzMeier LorenzMeier deleted the pr-cannode-v1 branch January 31, 2021 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants