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] Add S23K1XX and rddrone uavcan146 #14082

Closed
wants to merge 4 commits into from
Closed

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Feb 1, 2020

Untested

FYI @LorenzMeier, @igalloway

Do not MERGE!

This is built on current Nuttx master + han1raaijmakers-nxpDroneBoards pending PR to upstream.

han1raaijmakers-nxpDroneBoards PR will need to go upstream and be backported or PX4 nuttx will have to be updated.

@LorenzMeier
Copy link
Member

@dinomani Could you please give this a go Monday?

LorenzMeier
LorenzMeier previously approved these changes Feb 1, 2020
@codecov
Copy link

codecov bot commented Feb 1, 2020

Codecov Report

Merging #14082 into master will decrease coverage by 16.21%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #14082       +/-   ##
===========================================
- Coverage    52.6%   36.39%   -16.22%     
===========================================
  Files         613      545       -68     
  Lines       51634    47000     -4634     
===========================================
- Hits        27162    17105    -10057     
- Misses      24472    29895     +5423
Flag Coverage Δ
#mavsdk 36.39% <ø> (+0.23%) ⬆️
#python ?
#sitl_mission_MC_box ?
#sitl_mission_MC_offboard_att ?
#sitl_mission_MC_offboard_pos ?
#sitl_mission_Rover ?
#sitl_mission_VTOL_standard ?
#sitl_mission_VTOL_tailsitter ?
#sitl_python_FW ?
#sitl_python_MC_box ?
#sitl_python_MC_offboard_att ?
#sitl_python_MC_offboard_pos ?
#sitl_python_Rover ?
#sitl_python_VTOL_standard ?
#sitl_python_VTOL_tailsitter ?
#unittest ?
Impacted Files Coverage Δ
src/systemcmds/tests/test_bezierQuad.cpp 0% <0%> (-100%) ⬇️
src/lib/controllib/BlockLimitSym.cpp 0% <0%> (-100%) ⬇️
src/modules/navigator/mission_block.h 0% <0%> (-100%) ⬇️
src/systemcmds/tests/test_search_min.cpp 0% <0%> (-100%) ⬇️
src/systemcmds/tests/test_hrt.cpp 0% <0%> (-100%) ⬇️
...c/modules/mavlink/mavlink_tests/mavlink_ftp_test.h 0% <0%> (-100%) ⬇️
src/modules/navigator/takeoff.h 0% <0%> (-100%) ⬇️
src/modules/navigator/land.h 0% <0%> (-100%) ⬇️
...ontrollib/controllib_test/controllib_test_main.cpp 0% <0%> (-100%) ⬇️
src/systemcmds/tests/test_autodeclination.cpp 0% <0%> (-100%) ⬇️
... and 298 more

@LowOrbitIonCannon
Copy link
Contributor

I get an error building this PR:
image
I changed the Branch to Hans Nuttx branch and installed the Python extensions.

@davids5
Copy link
Member Author

davids5 commented Feb 4, 2020

@LowOrbitIonCannon - there was a python update to master PX4. Most commands to update are emitted during the the Cmake configure step on a clean build. FYI @dagar but the jinga2 one is not,

pip install jinja2

will fix it.

@LowOrbitIonCannon
Copy link
Contributor

image
Got it running. I had to setup Python3 from scratch

@davids5
Copy link
Member Author

davids5 commented Feb 4, 2020

Cool! @LowOrbitIonCannon what does `i2cdetect -b n' for n = 0,1,2,4 show?

@LowOrbitIonCannon
Copy link
Contributor

image

I connected a GPS device with Compass that is showing up at 0x1e.
Only 1 bus exists

@dk7xe
Copy link
Contributor

dk7xe commented Feb 4, 2020

GPS connected is a Drotek Sirius (M8N) with LIS3MDL magnetometer.
image

Would be cool to have the sensor data pushed to the FMU via CAN soon. Since i'm out of UART's ;)

@dk7xe
Copy link
Contributor

dk7xe commented Feb 5, 2020

i tried building code with a simple adjustment of the boards/nxp/rddrone-uavcan146/default.cmake

        SERIAL_PORTS
                GPS1:/dev/ttyS1

        DRIVERS
                gps

        MODULES

        SYSTEMCMDS
                i2cdetect
                top

But got an error during building

Memory region         Used Size  Region Size  %age Used
          vflash:         652 B         1 KB     63.67%
          pflash:         800 B         16 B    5000.00%
          dflash:      129452 B    1047536 B     12.36%
            sram:        3436 B       124 KB      2.71/home/dep00417/gcc-arm-none-eabi-7-2017-q4-major/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: nxp_rddrone-uavcan146_default.elf section `__param' will not fit in region `pflash'
/home/dep00417/gcc-arm-none-eabi-7-2017-q4-major/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: section __param LMA [0000000000000410,000000000000071f] overlaps section .text LMA [0000000000000410,000000000001fca8]
/home/dep00417/gcc-arm-none-eabi-7-2017-q4-major/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: region `pflash' overflowed by 784 bytes
src/drivers/gps/libdrivers__gps.a(gps.cpp.obj): In function `GPS::setBaudrate(unsigned int)':
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/drivers/gps/gps.cpp:483: undefined reference to `tcgetattr'
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/drivers/gps/gps.cpp:521: undefined reference to `cfsetspeed'
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/drivers/gps/gps.cpp:526: undefined reference to `cfsetspeed'
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/drivers/gps/gps.cpp:531: undefined reference to `tcsetattr'
src/systemcmds/top/libsystemcmds__top.a(top.c.obj): In function `top_main':
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/systemcmds/top/top.c:75: undefined reference to `init_print_load_s'
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/systemcmds/top/top.c:94: undefined reference to `print_load'
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/systemcmds/top/top.c:82: undefined reference to `print_load'
/home/dep00417/src/PX4-uavcan/build/nxp_rddrone-uavcan146_default/../../src/systemcmds/top/top.c:84: undefined reference to `print_load'
/home/dep00417/gcc-arm-none-eabi-7-2017-q4-major/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libm.a(lib_a-w_sqrt.o): In function `sqrt':
w_sqrt.c:(.text.sqrt+0x84): undefined reference to `__errno'
w_sqrt.c:(.text.sqrt+0xa6): undefined reference to `__errno'
collect2: error: ld returned 1 exit status
%
ninja: build stopped: subcommand failed.
Makefile:200: recipe for target 'nxp_rddrone-uavcan146' failed
make: *** [nxp_rddrone-uavcan146] Error 1

I guess the available memory configuration settings need to be adjusted according S32K146. @davids5 ?

@davids5 davids5 force-pushed the master_rddrone-uavcan146 branch from c1acd85 to fc9894d Compare February 7, 2020 13:18
@davids5
Copy link
Member Author

davids5 commented Feb 7, 2020

@dk7xe -

I have created branches

https://github.com/PX4/NuttX/tree/master_nxp_drone_boards
https://github.com/PX4/NuttX-apps/tree/master_nxp_drone_boards

These are equal to upstream NuttX what had the S32K PR (et al) merged today.

These branches will be rebased on upstream NuttX and can have the NXP commits on top. That we can submit upstream and then rebase.

This branch is pointing to master_nxp_drone_boards in the PX4 Nuttx and Apps

I will also backport the imx ,Kinetis and S32K PR to px4_firmware_nuttx-8.2

When that is done the team can work on the stable px4_firmware_nuttx-8.2 or the master_nxp_drone_boards version of nuttx.

@dagar
Copy link
Member

dagar commented Feb 12, 2020

Closing this PR as the board and architecture support have been merged to PX4 master. We can keep the branch around for a while if anyone would like to continue working with newer NuttX.

@dagar dagar closed this Feb 12, 2020
@dagar dagar deleted the master_rddrone-uavcan146 branch March 12, 2020 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants