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

Nuttx rebase #773

Merged
merged 11 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tiiuae-codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
language: [c-cpp]
product: [ssrc_saluki-v2_default, ssrc_saluki-nxp93_flat]
product: [ssrc_saluki-v2_default, ssrc_saluki-nxp93_default]

container:
image: ghcr.io/tiiuae/px4-firmware-builder-base:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tiiuae-pixhawk-and-saluki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
strategy:
fail-fast: false
matrix:
product: [pixhawk, fmu-v6xrt, saluki-v2_default, saluki-v2_amp, saluki-v2_flat, saluki-pi_default, saluki-pi_amp, saluki-pi_flat, saluki-v3_default, saluki-v3_amp, saluki-v3_flat, saluki-nxp93_flat]
product: [saluki-v2_default, saluki-v2_amp, saluki-v2_flat, saluki-pi_default, saluki-pi_amp, saluki-pi_flat, saluki-v3_default, saluki-v3_amp, saluki-v3_flat, saluki-nxp93_flat, saluki-nxp93_default]
include:
- product: saluki-v2_custom_keys
keys: Tools/saluki-sec-scripts/custom_keys/saluki-v2/px4_bin_ed25519_private.pem
Expand Down
12 changes: 3 additions & 9 deletions boards/mpfs/icicle/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ CONFIG_CDCACM_VENDORID=0x16c0
CONFIG_CDCACM_VENDORSTR="SSRC"
CONFIG_CRYPTO=y
CONFIG_CRYPTO_RANDOM_POOL=y
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
Expand All @@ -43,6 +42,8 @@ CONFIG_DISABLE_MQUEUE=y
CONFIG_DISABLE_POSIX_TIMERS=y
CONFIG_EE24XX_FREQUENCY=400000
CONFIG_EEPROM=y
CONFIG_ETC_ROMFS=y
CONFIG_ETC_ROMFSSECTSIZE=128
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FDCLONE_STDIO=y
Expand All @@ -51,7 +52,6 @@ CONFIG_FS_FAT=y
CONFIG_FS_FATTIME=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_EXCLUDE_ENVIRON=y
CONFIG_FS_PROCFS_MAX_TASKS=64
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_FS_ROMFS=y
CONFIG_FS_SHMFS=y
Expand Down Expand Up @@ -105,9 +105,7 @@ CONFIG_NETINIT_MACADDR_1=0x554b4b41
CONFIG_NETINIT_MACADDR_2=0x024a
CONFIG_NETINIT_NOMAC=y
CONFIG_NET_ARP_IPIN=y
CONFIG_NET_ARP_SEND=y
CONFIG_NET_BROADCAST=y
CONFIG_NET_ICMP=y
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_TCP=y
Expand All @@ -118,15 +116,11 @@ CONFIG_NET_UDP_CHECKSUMS=y
CONFIG_NET_UDP_NOTIFIER=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CUSTOMROMFS=y
CONFIG_NSH_CUSTOMROMFS_HEADER="../../include/nsh_romfsimg.h"
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
CONFIG_NSH_NESTDEPTH=8
CONFIG_NSH_PROMPT_STRING="icicle> "
CONFIG_NSH_READLINE=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ROMFSSECTSIZE=128
CONFIG_NSH_STRERROR=y
CONFIG_NSH_VARS=y
CONFIG_PIPES=y
Expand All @@ -145,10 +139,10 @@ CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=249
CONFIG_SCHED_INSTRUMENTATION=y
CONFIG_SCHED_INSTRUMENTATION_SWITCH=y
CONFIG_SCHED_LPNTHREADS=2
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_LPWORKPRIORITY=50
CONFIG_SCHED_LPWORKSTACKSIZE=4096
CONFIG_SCHED_LPNTHREADS=2
CONFIG_SCHED_WAITPID=y
CONFIG_SEM_PREALLOCHOLDERS=32
CONFIG_SERIAL_NPOLLWAITERS=2
Expand Down
2 changes: 1 addition & 1 deletion boards/mpfs/icicle/src/mpfs_emmcsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <nuttx/mmcsd.h>
#include <nuttx/fs/partition.h>

#include "mpfs_emmcsd.h"
#include "mpfs_sdio.h"
#include "board_config.h"

/****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion boards/ssrc/saluki-nxp93
2 changes: 1 addition & 1 deletion boards/ssrc/saluki-pi
2 changes: 1 addition & 1 deletion boards/ssrc/saluki-v1
2 changes: 1 addition & 1 deletion boards/ssrc/saluki-v2
2 changes: 1 addition & 1 deletion boards/ssrc/saluki-v3
3 changes: 2 additions & 1 deletion platforms/nuttx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ endif()
if(CONFIG_OPENAMP)
list(APPEND nuttx_libs nuttx_openamp)
target_link_libraries(nuttx_drivers INTERFACE nuttx_openamp)
target_link_libraries(nuttx_openamp INTERFACE nuttx_drivers)
endif()

file(RELATIVE_PATH PX4_BINARY_DIR_REL ${CMAKE_CURRENT_BINARY_DIR} ${PX4_BINARY_DIR})
Expand Down Expand Up @@ -303,7 +304,7 @@ if (CONFIG_BUILD_KERNEL)
-fno-rtti

-Wl,--script=${LDSCRIPT}
-Wl,--entry=_start
-Wl,--entry=__start
-Wl,-r
-Wl,-Bstatic
-Wl,-Map=${PX4_CONFIG}.map
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 @@ -207,7 +207,7 @@ LDENDGROUP = --end-group
LDLIBPATH = $(foreach PATH, $(USERLIBS), $(addprefix -L, $(dir $(PATH))))
LDLIBFILES = $(foreach PATH, $(USERLIBS), $(notdir $(PATH)))
LDLIBS = $(patsubst %.a,%,$(patsubst lib%,-l%,$(LDLIBFILES)))
LDELFFLAGS = -e _start -Bstatic
LDELFFLAGS = -e __start -Bstatic
LDELFFLAGS += $(addprefix -T, $(ELFLDNAME))

ifeq ($(CONFIG_BINFMT_ELF_RELOCATABLE),y)
Expand Down
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/apps
Submodule apps updated 838 files
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/extern/pf_crypto
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/nuttx
Submodule nuttx updated 7510 files
2 changes: 1 addition & 1 deletion platforms/nuttx/src/px4/common/print_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void print_load_buffer(char *buffer, int buffer_length, print_load_callback_f cb

if (system_load.tasks[i].tcb->pid == 0) {
stack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
stack_free = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - up_check_intstack();
stack_free = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - up_check_intstack(this_cpu());

} else {
stack_free = system_load.tasks[i].tcb->adj_stack_size - up_check_tcbstack(system_load.tasks[i].tcb);
Expand Down
2 changes: 1 addition & 1 deletion platforms/nuttx/src/px4/common/tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const char *px4_get_taskname(void)
int px4_exec(const char *appname, char *const *argv, const char *redirfile, int oflags)
{
#ifdef CONFIG_BUILTIN
return exec_builtin(appname, argv, redirfile, oflags);
return exec_builtin(appname, argv, NULL, redirfile, oflags);
#else
char path[CONFIG_PATH_MAX];
posix_spawn_file_actions_t file_actions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <sys/socket.h>

#include <nuttx/can.h>
#include <netpacket/can.h>

#include "can_frame.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <sys/socket.h>

#include <nuttx/can.h>
#include <netpacket/can.h>

namespace uavcan_socketcan
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <string.h>

#include <nuttx/can.h>
#include <netpacket/can.h>

#define MODULE_NAME "UAVCAN_SOCKETCAN"

Expand Down
12 changes: 6 additions & 6 deletions src/lib/cdev/nuttx/cdev_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ unlink : nullptr
static int
cdev_open(file_t *filp)
{
if ((filp->f_inode->i_flags & FSNODEFLAG_DELETED) != 0) {
if (filp->f_inode->i_crefs <= 0) {
return -ENODEV;
}

Expand All @@ -98,7 +98,7 @@ cdev_open(file_t *filp)
static int
cdev_close(file_t *filp)
{
if ((filp->f_inode->i_flags & FSNODEFLAG_DELETED) != 0) {
if (filp->f_inode->i_crefs <= 0) {
return -ENODEV;
}

Expand All @@ -110,7 +110,7 @@ cdev_close(file_t *filp)
static ssize_t
cdev_read(file_t *filp, char *buffer, size_t buflen)
{
if ((filp->f_inode->i_flags & FSNODEFLAG_DELETED) != 0) {
if (filp->f_inode->i_crefs <= 0) {
return -ENODEV;
}

Expand All @@ -122,7 +122,7 @@ cdev_read(file_t *filp, char *buffer, size_t buflen)
static ssize_t
cdev_write(file_t *filp, const char *buffer, size_t buflen)
{
if ((filp->f_inode->i_flags & FSNODEFLAG_DELETED) != 0) {
if (filp->f_inode->i_crefs <= 0) {
return -ENODEV;
}

Expand All @@ -134,7 +134,7 @@ cdev_write(file_t *filp, const char *buffer, size_t buflen)
static off_t
cdev_seek(file_t *filp, off_t offset, int whence)
{
if ((filp->f_inode->i_flags & FSNODEFLAG_DELETED) != 0) {
if (filp->f_inode->i_crefs <= 0) {
return -ENODEV;
}

Expand All @@ -146,7 +146,7 @@ cdev_seek(file_t *filp, off_t offset, int whence)
static int
cdev_ioctl(file_t *filp, int cmd, unsigned long arg)
{
if ((filp->f_inode->i_flags & FSNODEFLAG_DELETED) != 0) {
if (filp->f_inode->i_crefs <= 0) {
return -ENODEV;
}

Expand Down
Loading