Skip to content

Commit

Permalink
NuttX and apps update 7.29
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Jul 4, 2019
1 parent 9b46c1d commit edebc2d
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
url = https://github.com/PX4/NuttX.git
branch = px4_firmware_nuttx-7.28+
branch = px4_firmware_nuttx-7.29+
[submodule "platforms/nuttx/NuttX/apps"]
path = platforms/nuttx/NuttX/apps
url = https://github.com/PX4/NuttX-apps.git
branch = px4_firmware_nuttx-7.28+
branch = px4_firmware_nuttx-7.29+
[submodule "cmake/configs/uavcan_board_ident"]
path = cmake/configs/uavcan_board_ident
url = https://github.com/PX4/uavcan_board_ident.git
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ set(package-contact "[email protected]")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
2 changes: 1 addition & 1 deletion boards/av/x-v1/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ px4_add_board(
wind_estimator

SYSTEMCMDS
bl_update
#bl_update
config
dmesg
dumpfile
Expand Down
20 changes: 13 additions & 7 deletions boards/av/x-v1/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
Expand Down Expand Up @@ -50,7 +57,7 @@ CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BOARDCTL_FINALINIT=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_CRASHDUMP=y
CONFIG_BOARD_LOOPSPERMSEC=43103
CONFIG_BOARD_LOOPSPERMSEC=22114
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_BUILTIN=y
CONFIG_C99_BOOL8=y
Expand All @@ -73,7 +80,10 @@ CONFIG_FS_CROMFS=y
CONFIG_FS_FAT=y
CONFIG_FS_FATTIME=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
CONFIG_FS_PROCFS_EXCLUDE_BLOCKS=y
CONFIG_FS_PROCFS_EXCLUDE_MOUNT=y
CONFIG_FS_PROCFS_EXCLUDE_MOUNTS=y
CONFIG_FS_PROCFS_EXCLUDE_USAGE=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_FS_ROMFS=y
CONFIG_GRAN=y
Expand Down Expand Up @@ -105,7 +115,6 @@ CONFIG_NETUTILS_TELNETD=y
CONFIG_NET_ARP_IPIN=y
CONFIG_NET_ARP_SEND=y
CONFIG_NET_BROADCAST=y
CONFIG_NET_HOSTNAME="px4"
CONFIG_NET_ICMP=y
CONFIG_NET_ROUTE=y
CONFIG_NET_SOCKOPTS=y
Expand All @@ -124,14 +133,11 @@ CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_PSSTACKUSAGE=y
CONFIG_NSH_DRIPADDR=0xc0a85601
CONFIG_NSH_IPADDR=0xc0a8560c
CONFIG_NSH_LINELEN=128
CONFIG_NSH_LOGIN_PASSWORD="px4"
CONFIG_NSH_LOGIN_USERNAME="px4"
CONFIG_NSH_MAXARGUMENTS=12
CONFIG_NSH_NESTDEPTH=8
CONFIG_NSH_NETINIT_THREAD=y
CONFIG_NSH_QUOTE=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ROMFSSECTSIZE=128
Expand All @@ -146,7 +152,7 @@ CONFIG_PREALLOC_WDOGS=50
CONFIG_PRIORITY_INHERITANCE=y
CONFIG_PTHREAD_MUTEX_ROBUST=y
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAM_SIZE=376832
CONFIG_RAM_SIZE=245760
CONFIG_RAM_START=0x20010000
CONFIG_RAW_BINARY=y
CONFIG_RTC_DATETIME=y
Expand Down
7 changes: 7 additions & 0 deletions boards/omnibus/f4sd/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DEV_CONSOLE is not set
# CONFIG_DISABLE_OS_API is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
Expand Down
7 changes: 7 additions & 0 deletions boards/px4/fmu-v2/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
Expand Down
7 changes: 7 additions & 0 deletions boards/px4/fmu-v3/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
Expand Down
7 changes: 7 additions & 0 deletions boards/px4/fmu-v4/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
Expand Down
7 changes: 7 additions & 0 deletions boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
Expand Down
7 changes: 7 additions & 0 deletions boards/px4/fmu-v5/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
Expand Down
12 changes: 9 additions & 3 deletions boards/px4/fmu-v5x/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
Expand Down Expand Up @@ -143,7 +150,6 @@ CONFIG_SCHED_LPWORKPRIORITY=50
CONFIG_SCHED_LPWORKSTACKSIZE=1800
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_SDMMC1_SDIO_MODE=y
CONFIG_SEM_NNESTPRIO=8
CONFIG_SEM_PREALLOCHOLDERS=0
CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS=y
Expand Down Expand Up @@ -222,8 +228,8 @@ CONFIG_UART7_RXDMA=y
CONFIG_UART7_TXBUFSIZE=3000
CONFIG_UART8_BAUD=57600
CONFIG_UART8_RXBUFSIZE=600
CONFIG_UART8_TXBUFSIZE=1500
CONFIG_UART8_RXDMA=y
CONFIG_UART8_TXBUFSIZE=1500
CONFIG_USART1_BAUD=57600
CONFIG_USART1_RXBUFSIZE=600
CONFIG_USART1_TXBUFSIZE=1500
Expand All @@ -232,9 +238,9 @@ CONFIG_USART2_IFLOWCONTROL=y
CONFIG_USART2_OFLOWCONTROL=y
CONFIG_USART2_RXBUFSIZE=600
CONFIG_USART2_TXBUFSIZE=3000
CONFIG_USART3_SERIAL_CONSOLE=y
CONFIG_USART3_BAUD=57600
CONFIG_USART3_RXBUFSIZE=180
CONFIG_USART3_SERIAL_CONSOLE=y
CONFIG_USART3_TXBUFSIZE=1500
CONFIG_USART6_BAUD=57600
CONFIG_USART6_RXBUFSIZE=600
Expand Down
7 changes: 7 additions & 0 deletions boards/px4/io-v2/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DEV_NULL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
Expand Down
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/Make.defs.in
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ifeq ($(CONFIG_ARMV7M_STACKCHECK),y)
endif

CFLAGS = $(ARCHINCLUDES) \
-std=gnu99 \
-std=gnu11 \
${CMAKE_C_FLAGS} \
$(FLAGS) \
-Wno-bad-function-cast \
Expand Down
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/apps
Submodule apps updated 206 files
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/nuttx
Submodule nuttx updated 2385 files
3 changes: 0 additions & 3 deletions platforms/nuttx/cmake/px4_impl_os.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ function(px4_os_add_flags)
${PX4_BINARY_DIR}/NuttX/apps/include
)

# NuttX's disables inline below C99 (comiler.h), but __STDC_VERSION__ isn't set for C++
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-D__STDC_VERSION__=199901L>)

# prevent using the toolchain's std c++ library
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)

Expand Down
14 changes: 7 additions & 7 deletions src/drivers/boards/common/board_dcache_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <stdbool.h>

#include "nvic.h"
#include "cache.h"
#include <nuttx/cache.h>
#include "up_arch.h"

#include <parameters/param.h>
Expand Down Expand Up @@ -93,7 +93,7 @@ void board_configure_dcache(int stage)
/* On boot we should default to disabled on effected HW */

if (erratta && stage == 0) {
arch_disable_dcache();
up_disable_dcache();
return;
}

Expand All @@ -106,15 +106,15 @@ void board_configure_dcache(int stage)
switch (dcache) {
default:
case 0:
erratta ? arch_disable_dcache() : arch_enable_dcache();
erratta ? up_disable_dcache() : up_enable_dcache();
break;

case 1:
arch_disable_dcache();
up_disable_dcache();
break;

case 2:
arch_enable_dcache();
up_enable_dcache();
break;
return;
}
Expand Down Expand Up @@ -157,11 +157,11 @@ int board_dcache_info(int action, char **pmesg, bool *pstate)
}

if (action == 0) {
arch_disable_dcache();
up_disable_dcache();
}

if (action == 1) {
arch_enable_dcache();
up_enable_dcache();
}

if (pmesg) {
Expand Down
10 changes: 5 additions & 5 deletions src/drivers/px4io/px4io_serial_f7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#ifdef PX4IO_INTERFACE_F7

#include "stm32_uart.h"
#include "cache.h"
#include <nuttx/cache.h>

/* serial register accessors */
#define REG(_x) (*(volatile uint32_t *)(PX4IO_SERIAL_BASE + (_x)))
Expand Down Expand Up @@ -288,8 +288,8 @@ PX4IO_serial_f7::_bus_exchange(IOPacket *_packet)
stm32_dmastart(_rx_dma, _dma_callback, this, false);

/* Clean _current_packet, so DMA can see the data */
arch_clean_dcache((uintptr_t)_current_packet,
(uintptr_t)_current_packet + ALIGNED_IO_BUFFER_SIZE);
up_clean_dcache((uintptr_t)_current_packet,
(uintptr_t)_current_packet + ALIGNED_IO_BUFFER_SIZE);

/* start TX DMA - no callback if we also expect a reply */
/* DMA setup time ~3µs */
Expand Down Expand Up @@ -458,8 +458,8 @@ PX4IO_serial_f7::_do_interrupt()
/* if there is DMA reception going on, this is a short packet */
if (_rx_dma_status == _dma_status_waiting) {
/* Invalidate _current_packet, so we get fresh data from RAM */
arch_invalidate_dcache((uintptr_t)_current_packet,
(uintptr_t)_current_packet + ALIGNED_IO_BUFFER_SIZE);
up_invalidate_dcache((uintptr_t)_current_packet,
(uintptr_t)_current_packet + ALIGNED_IO_BUFFER_SIZE);

/* verify that the received packet is complete */
size_t length = sizeof(*_current_packet) - stm32_dmaresidual(_rx_dma);
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/stm32/armv7-m_dcache/armv7-m_dcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include <parameters/param.h>

#include "cache.h"
#include <nuttx/cache.h>

#if defined(CONFIG_ARMV7M_DCACHE) && defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH)

Expand Down
4 changes: 2 additions & 2 deletions src/lib/systemlib/print_load_nuttx.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void print_load_buffer(uint64_t t, char *buffer, int buffer_length, print_load_c
print_state->interval_time_ms_inv = 1.f / ((float)((print_state->new_time - print_state->interval_start_time) / 1000));

/* header for task list */
snprintf(buffer, buffer_length, "%4s %*-s %8s %6s %11s %10s %-5s %2s",
snprintf(buffer, buffer_length, "%4s %-*s %8s %6s %11s %10s %-5s %2s",
"PID",
CONFIG_TASK_NAME_SIZE, "COMMAND",
"CPU(ms)",
Expand Down Expand Up @@ -282,7 +282,7 @@ void print_load_buffer(uint64_t t, char *buffer, int buffer_length, print_load_c
}

// print output
int print_len = snprintf(buffer, buffer_length, "%4d %*-s %8d %2d.%03d %5u/%5u %3u (%3u) ",
int print_len = snprintf(buffer, buffer_length, "%4d %-*s %8d %2d.%03d %5u/%5u %3u (%3u) ",
tcb_pid,
CONFIG_TASK_NAME_SIZE, tcb_name,
total_runtime[i],
Expand Down

0 comments on commit edebc2d

Please sign in to comment.