xidatong update to nuttx10.3

This commit is contained in:
wgzAIIT 2022-06-22 10:58:04 +08:00
parent 6bedd6272e
commit f7ba07eaea
19 changed files with 37 additions and 51 deletions

View File

@ -65,4 +65,4 @@ CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -62,4 +62,4 @@ CONFIG_ADAPTER_BLUETOOTH_HC08="hc08"
CONFIG_ADAPTER_HC08_WORK_ROLE="M"
CONFIG_ADAPTER_HC08_DRIVER_EXTUART=y
CONFIG_ADAPTER_HC08_DRIVER="/dev/extuart_dev2"
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -54,4 +54,4 @@ CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -47,7 +47,7 @@ CONFIG_READLINE_CMD_HISTORY_LEN=100
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_IMXRT_LPI2C=y
CONFIG_IMXRT_LCD=y

View File

@ -53,4 +53,4 @@ CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -62,4 +62,4 @@ CONFIG_ADAPTER_E220_DRIVER_EXTUART=y
CONFIG_ADAPTER_E220_DRIVER="/dev/extuart_dev3"
CONFIG_ADAPTER_E220_M0_PATH="/dev/gpout0"
CONFIG_ADAPTER_E220_M1_PATH="/dev/gpout1"
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -76,4 +76,4 @@ CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -51,4 +51,4 @@ CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -70,4 +70,4 @@ CONFIG_READLINE_CMD_HISTORY_LEN=100
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -69,4 +69,4 @@ CONFIG_READLINE_CMD_HISTORY_LEN=100
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -58,4 +58,4 @@ CONFIG_CONNECTION_ADAPTER_WIFI=y
CONFIG_ADAPTER_ESP07S_WIFI=y
CONFIG_ADAPTER_WIFI_ESP07S="esp07s_wifi"
CONFIG_ADAPTER_ESP07S_DRIVER="/dev/ttyS2"
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -61,4 +61,4 @@ CONFIG_ADAPTER_E18=y
CONFIG_ADAPTER_ZIGBEE_E18="e18"
CONFIG_AS_END_DEVICE_ROLE=y
CONFIG_ADAPTER_E18_DRIVER="/dev/extuart_dev1"
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_INIT_ENTRYPOINT="nsh_main"

View File

@ -22,29 +22,18 @@ include $(TOPDIR)/Make.defs
# The entry point name (if none is provided in the .config file)
CONFIG_USER_ENTRYPOINT ?= user_start
ENTRYPT = $(patsubst "%",%,$(CONFIG_USER_ENTRYPOINT))
CONFIG_INIT_ENTRYPOINT ?= user_start
ENTRYPT = $(patsubst "%",%,$(CONFIG_INIT_ENTRYPOINT))
# Get the paths to the libraries and the links script path in format that
# is appropriate for the host OS
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
# Windows-native toolchains
USER_LIBPATHS = ${shell for path in $(USERLIBS); do dir=`dirname $(TOPDIR)$(DELIM)$$path`;echo "-L\"`cygpath -w $$dir`\"";done}
USER_LDSCRIPT = -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld}"
USER_LDSCRIPT += -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)user-space.ld}"
USER_HEXFILE += "${shell cygpath -w $(TOPDIR)$(DELIM)nuttx_user.hex}"
USER_SRECFILE += "${shell cygpath -w $(TOPDIR)$(DELIM)nuttx_user.srec}"
USER_BINFILE += "${shell cygpath -w $(TOPDIR)$(DELIM)nuttx_user.bin}"
else
# Linux/Cygwin-native toolchain
USER_LIBPATHS = $(addprefix -L$(TOPDIR)$(DELIM),$(dir $(USERLIBS)))
USER_LDSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld
USER_LDSCRIPT += -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)user-space.ld
USER_HEXFILE += "$(TOPDIR)$(DELIM)nuttx_user.hex"
USER_SRECFILE += "$(TOPDIR)$(DELIM)nuttx_user.srec"
USER_BINFILE += "$(TOPDIR)$(DELIM)nuttx_user.bin"
endif
USER_LIBPATHS = $(addprefix -L,$(call CONVERT_PATH,$(addprefix $(TOPDIR)$(DELIM),$(dir $(USERLIBS)))))
USER_LDSCRIPT = -T $(call CONVERT_PATH,$(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld)
USER_LDSCRIPT += -T $(call CONVERT_PATH,$(BOARD_DIR)$(DELIM)scripts$(DELIM)user-space.ld)
USER_HEXFILE += $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx_user.hex)
USER_SRECFILE += $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx_user.srec)
USER_BINFILE += $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx_user.bin)
USER_LDFLAGS = --undefined=$(ENTRYPT) --entry=$(ENTRYPT) $(USER_LDSCRIPT)
USER_LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(USERLIBS))))

View File

@ -64,10 +64,10 @@
* They are only used meaningfully in the following way:
*
* - The linker script defines, for example, the symbol_sdata.
* - The declareion extern uint32_t _sdata; makes C happy. C will believe
* - The declaration extern uint32_t _sdata; makes C happy. C will believe
* that the value _sdata is the address of a uint32_t variable _data (it
* is not!).
* - We can recoved the linker value then by simply taking the address of
* - We can recover the linker value then by simply taking the address of
* of _data. like: uint32_t *pdata = &_sdata;
*/
@ -81,13 +81,13 @@ extern uint32_t _ebss; /* End+1 of .bss */
/* This is the user space entry point */
int CONFIG_USER_ENTRYPOINT(int argc, char *argv[]);
int CONFIG_INIT_ENTRYPOINT(int argc, char *argv[]);
const struct userspace_s userspace locate_data(".userspace") =
{
/* General memory map */
.us_entrypoint = (main_t)CONFIG_USER_ENTRYPOINT,
.us_entrypoint = (main_t)CONFIG_INIT_ENTRYPOINT,
.us_textstart = (uintptr_t)&_stext,
.us_textend = (uintptr_t)&_etext,
.us_datasource = (uintptr_t)&_eronly,

View File

@ -28,11 +28,7 @@ else
LDSCRIPT = flash-ocram.ld
endif
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
ARCHSCRIPT = -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
else
ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
endif
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
@ -42,8 +38,13 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION)
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
ARCHCFLAGS = -fno-common
ifeq ($(CONFIG_CXX_EXCEPTION),y)
ARCHCXXFLAGS = -fno-common
else
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
endif
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
@ -64,11 +65,7 @@ LDNXFLATFLAGS = -e main -s 2048
CMODULEFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
LDMODULEFLAGS = -r -e module_initialize
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}"
else
LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld
endif
LDMODULEFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/modlib/gnu-elf.ld)
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g

View File

@ -40,7 +40,7 @@
#include <nuttx/irq.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "imxrt_config.h"
#include "imxrt_irq.h"

View File

@ -55,7 +55,7 @@
#include <fcntl.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "imxrt_config.h"
#include "imxrt_irq.h"

View File

@ -40,7 +40,7 @@
#include <nuttx/spi/spi.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "chip.h"
#include "imxrt_lpspi.h"

View File

@ -41,7 +41,7 @@
#include <nuttx/spi/spi.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "imxrt_config.h"
#include "imxrt_lpspi.h"