Config and log from my M1:

——————————————

#
# 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_NSH_CMDOPT_HEXDUMP is not set
CONFIG_ARCH="sim"
CONFIG_ARCH_BOARD="sim"
CONFIG_ARCH_BOARD_SIM=y
CONFIG_ARCH_CHIP="sim"
CONFIG_ARCH_SIM=y
CONFIG_BOARDCTL_APP_SYMTAB=y
CONFIG_BOARDCTL_POWEROFF=y
CONFIG_BOARD_LOOPSPERMSEC=0
CONFIG_BOOT_RUNFROMEXTSRAM=y
CONFIG_BUILTIN=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_GPIO=y
CONFIG_DEV_LOOP=y
CONFIG_DEV_ZERO=y
CONFIG_EXAMPLES_GPIO=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FSUTILS_PASSWD=y
CONFIG_FSUTILS_PASSWD_READONLY=y
CONFIG_FS_BINFS=y
CONFIG_FS_FAT=y
CONFIG_FS_PROCFS=y
CONFIG_FS_RAMMAP=y
CONFIG_FS_ROMFS=y
CONFIG_GPIO_LOWER_HALF=y
CONFIG_HOST_ARM=y
CONFIG_HOST_MACOS=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_IOEXPANDER=y
CONFIG_IOEXPANDER_DUMMY=y
CONFIG_LIBC_ENVPATH=y
CONFIG_LIBC_EXECFUNCS=y
CONFIG_LIBC_LOCALE=y
CONFIG_LIBC_LOCALE_CATALOG=y
CONFIG_LIBC_LOCALE_GETTEXT=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CONSOLE_LOGIN=y
CONFIG_NSH_FATDEVNO=2
CONFIG_NSH_FILE_APPS=y
CONFIG_NSH_MOTD=y
CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator"
CONFIG_NSH_READLINE=y
CONFIG_NSH_ROMFSDEVNO=1
CONFIG_NSH_ROMFSETC=y
CONFIG_PATH_INITIAL="/bin"
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=2048
CONFIG_PSEUDOFS_ATTRIBUTES=y
CONFIG_PSEUDOFS_SOFTLINKS=y
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_SCHED_HAVE_PARENT=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_ONEXIT=y
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_START_MONTH=6
CONFIG_START_YEAR=2008
CONFIG_SYSTEM_NSH=y

——————————————

for dir in  /Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps sched 
drivers boards arch/sim/src fs binfmt libs/libc mm ; do \
          /Applications/Xcode.app/Contents/Developer/usr/bin/make -C $dir 
EXTRAFLAGS="-D__KERNEL__ " depend || exit; \
     done
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/builtin depend 
APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/examples/gpio 
depend APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/examples/hello 
depend APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/fsutils/mkfatfs 
depend APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/fsutils/passwd 
depend APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/nshlib depend 
APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/platform depend 
APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/system/nsh depend 
APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C 
/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps/system/readline 
depend APPDIR="/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/apps"
make[2]: Nothing to be done for `depend'.
touch .depend
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C sched libsched.a 
EXTRAFLAGS="-D__KERNEL__ "
make[1]: `libsched.a' is up to date.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C drivers libdrivers.a 
EXTRAFLAGS="-D__KERNEL__ "
make[1]: `libdrivers.a' is up to date.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C boards libboards.a 
EXTRAFLAGS="-D__KERNEL__ "
make[1]: `libboards.a' is up to date.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C libs/libc libc.a 
EXTRAFLAGS=""
AS:  machine/sim/arch_setjmp_arm.S
cc -c -Wall -Wstrict-prototypes -Wshadow -Wundef -g -fno-builtin 
-fvisibility=hidden -fno-common -isystem 
"/Users/piet/Projects/NuttX/feature-sim-macos-m1-support/nuttx/include" 
-D__NuttX__ -U_AIX -U_WIN32 -U__APPLE__ -U__FreeBSD__ -U__NetBSD__ -U__linux__ 
-U__sun__ -U__unix__ -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__  -pipe 
-D__ASSEMBLY__  machine/sim/arch_setjmp_arm.S  -o  bin/arch_setjmp_arm.o
machine/sim/arch_setjmp_arm.S:38:1: error: unknown directive
.syntax unified
^
machine/sim/arch_setjmp_arm.S:40:1: error: unknown directive
.type setjmp,%function
^
machine/sim/arch_setjmp_arm.S:42:6: error: invalid operand for instruction
 mov ip,r0
     ^
machine/sim/arch_setjmp_arm.S:43:31: error: vector register expected
 stmia ip!,{v1,v2,v3,v4,v5,v6,sl,fp}
                              ^
machine/sim/arch_setjmp_arm.S:44:6: error: invalid operand for instruction
 mov r2,sp
     ^
machine/sim/arch_setjmp_arm.S:45:13: error: vector register expected
 stmia ip!,{r2,lr}
            ^
machine/sim/arch_setjmp_arm.S:46:6: error: invalid operand for instruction
 mov r0,#0
     ^
machine/sim/arch_setjmp_arm.S:48:4: error: unrecognized instruction mnemonic, 
did you mean: b, bcax, bl, br, sb, tbx?
3: bx lr
   ^
machine/sim/arch_setjmp_arm.S:50:1: error: unknown directive
.syntax unified
^
machine/sim/arch_setjmp_arm.S:52:1: error: unknown directive
.type longjmp,%function
^
machine/sim/arch_setjmp_arm.S:54:6: error: invalid operand for instruction
 mov ip,r0
     ^
machine/sim/arch_setjmp_arm.S:55:7: error: invalid operand for instruction
 movs r0,r1
      ^
machine/sim/arch_setjmp_arm.S:56:2: error: unrecognized instruction mnemonic, 
did you mean: mov?
 moveq r0,#1
 ^
machine/sim/arch_setjmp_arm.S:57:32: error: vector register expected
 ldmia ip!, {v1,v2,v3,v4,v5,v6,sl,fp}
                               ^
machine/sim/arch_setjmp_arm.S:58:14: error: vector register expected
 ldmia ip!, {r2,lr}
             ^
machine/sim/arch_setjmp_arm.S:59:9: error: expected compatible register or 
logical immediate
 mov sp,r2
        ^
machine/sim/arch_setjmp_arm.S:61:4: error: unrecognized instruction mnemonic, 
did you mean: b, bcax, bl, br, sb, tbx?
3: bx lr
   ^
make[1]: *** [bin/arch_setjmp_arm.o] Error 1
make: *** [libs/libc/libc.a] Error 2



> Am 29.01.2022 um 18:40 schrieb Peter Kalbus <p...@mailbox.org.INVALID>:
> 
> Hi,
> 
> I’m using NuttX on a M1 MacBook Air since a couple of months. 
> I’ve no issues to get NuttX compiled for my RP2040 based targets.
> 
> But I can confirm, that the Sim configuration sim:nsh not working.
> 
> Currently, I see there are two issues:
> 
>       /1/ M1 „Host CPU Type“ is detected as x86_64, but not as „arm“
>               Workarround for this is, to set it manually in the configuration
> 
>       /2/ At least the following files are not compilable
>               arch/sim/src/sim/up_vfork_arm.S 
> <https://github.com/ptka/incubator-nuttx#diff-fd079323b0636ac4012f50afe8c5555656d7a760b0429f46188919fe7807f8a5>
>               libs/libc/machine/sim/arch_setjmp_arm.S 
> <https://github.com/ptka/incubator-nuttx#diff-cffded10274b4845aae8c75bd91550d140214585ea17d47f2cf01dd021a16abe>
>               libs/libc/stdio/lib_libvsprintf.c 
> <https://github.com/ptka/incubator-nuttx#diff-befc8e04ddb3722f024f65ffd7648aac1cb24846d2b80fff6328e3cb5862220f>
> 
> The 2nd point could be related to a wrong compiler/assembler selected
> or the way, the compiler is invoked. In worst case, it’s there code itself.
> 
> I would be very interested helping to find a solution on this topic.
> 
> /Piet
> 
>> Am 29.01.2022 um 17:33 schrieb Tomasz CEDRO <to...@cedro.info>:
>> 
>> macOS is a BSD.. very close to FreeBSD:
>> 1. Use gmake.
>> 2. Make sure you have the right version of kconfig-frontends package
>> installed. If you installed it locally make sure path to your local
>> binary is in the first place.
>> 
>> -- 
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> 

Reply via email to