-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
KakuteF7 board support #12440
KakuteF7 board support #12440
Conversation
The timing could be awkward (the toolchain is needed early), but we might be able to use NuttX CONFIG_ARCH_DPFPU. |
f249337
to
ad645b7
Compare
That works indeed but I'm not sure if it's good to depend on NuttX config at this place. |
Yes that's what I meant by awkward, but I think in this case we can get away with it. We already reconstitute the full defconfig and parse the config flags at cmake configure time to allow using NuttX variables in the build system. The other idea is splitting the m7 platform toolchain (https://github.com/PX4/Firmware/blob/master/platforms/nuttx/cmake/Platform/Generic-arm-none-eabi-gcc-cortex-m7.cmake). It's simply using whatever is set in the board which then sets |
Can you add to Jenkins "Compile All Boards"? https://github.com/PX4/Firmware/blob/321c2c03925fad9f4286b895fbcef8155705dc06/.ci/Jenkinsfile-compile#L41 |
Ok let's try this then.
Done. |
e9f2e8e
to
db73833
Compare
@PX4/testflights could you test this PR on a pixhawk 4 mini? A quick test flight should be sufficient. Mainly checking the RC changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkueng - See inline comments.
@PX4/testflights -
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkueng - thank you for the changes.
On the LED stuff you may save some code space with removing the table
g_ledmap[led] - > GPIO_nLED_BLUE and dump xlat and CONFIG_ARCH_LEDS
#ifdef CONFIG_ARCH_LEDS
static bool nuttx_owns_leds = true;
// B R S G
// 0 1 2 3
static const uint8_t xlatpx4[] = {1, 2, 4, 0};
# define xlat(p) xlatpx4[(p)]
static uint32_t g_ledmap[] = {
GPIO_nLED_BLUE, // Indexed by BOARD_LED_BLUE
};
#else
...
Tested on Pixhawk 4 mini v5Modes Tested
Test Notes Log |
Tested on Pixhawk 4 v5 Bench test with RC taranis qx7: Tested on Pixhawk 4 mini v5 Tested on CUAV:Nano mini v5 Tested on CUAV:v5+ Tested on RDDRONEK66 Tested on pixhawk1 v2 Tested on pixracer v4 @davids5 I will do the remainder FC tomorrow morning. Let us know if you need any additional information. |
On all of these boards '$USE_IO = no' will hold.
A board only needs to define: #define RC_SERIAL_PORT "/dev/ttyS4" Then it can optionally define one or more of the following: #define RC_SERIAL_SWAP_RXTX #define RC_SERIAL_SINGLEWIRE #define RC_INVERT_INPUT(_invert_true) px4_arch_gpiowrite(GPIO_SBUS_INV, _invert_true)
The parameter will only be available if the board defines an 'RC' serial port in SERIAL_PORTS (in default.cmake).
The 'if [ $LOG_FILE = /dev/null ]' block can be removed, because STARTUP_TUNE is already set in that case.
…config Not all m7 boards support double, as for example the STM32F745.
The combination of 'if mycmd' and a logical expression is not supported in NuttX.
Thanks for the reviews and testing. |
@bkueng - did you test the tunes case for params on SD card and a mount fail? |
I tested the mount failure with the different settings for |
Do you have any idea make this support local_position_estimator? Thanks! |
LPE is deprecated, you can use EKF2 if you add a mag. |
This brings support for the Holybro KakuteF7 board.
Validated:
Not working:
Not tested:
Flash space: we're really tight, I needed to disable ekf2, which would overflow by 91KB.
Other changes
Buzzer
The buzzer works a bit differently on the KakuteF7: it is only binary. The startup sound sounds more like something is wrong on that, so I added an option to disable it.
I also reduced the missing SD card tone from infinitely to 2 repetitions.
RC Port
The board RC port is simplified by using NuttX ioctl's. This removes the need for
RC_UXART_BASE
, and allows for runtime-configurable RC port (disabled by default, a board needs to define anRC
serial port for it to become configurable).A board can still configure its default RC port with one or more of the following options:
Goes together with PX4/PX4-Bootloader#138.
Important: the last commit (13f97e5) disables double fp for the m7 toolchain, since not all m7 boards have the hw-support (such as the STM32F745 used here). This needs to be resolved before merging this PR.I'll do a follow-up with a Kopis 2 airframe config.