-
Notifications
You must be signed in to change notification settings - Fork 34
NuttX Linux simulation (previous "using Qemu for simulation") #11
Comments
On 10/6/2014 3:38 PM, Víctor Mayoral Vilches wrote:
Googling "CPU you selected does not support x86-64 instruction set" brings a lot You should also be able to build a 32-bit version with -m32 in the HOSTCFLAGS. I don't know anything about Qemu, there is an i486 Qemu version in the source You know that NuttX has it own, built-in host simulation right? Try building Greg |
@NuttX thanks for sharing that NuttX includes the I tested the
I searched around and found some blog posts where you point out that it might be a matter of a bad link. I also played a bit with the |
Yes that sounds an issue with symbolic links. Look at I don't know what you did before make clean; make clean_context; make. I don't You should have done this: cd nuttx make distclean cd tools ./configure.sh sim/nsh cd - make Greg |
A better explanation is that you are still using dependencies from an old build. Greg
|
@NuttX that did it thanks. Will leave note of the importance of I read your comments about the issues with the network and the tap device (/dev/net/tun) to emulate an Ethernet NIC. I tried
Seems that something is broken in there. |
I keep forgetting that you are not using the latest code. Just last week I updated the simulation so that would build and run natively on a 64-bit machine. So up_setjmp.S does not even exists anymore; it is replaced with up_setjmp32.S and up_setjmp64.S. There are two possibilities here:
If #2 is the problem, then you can fix it by adding -m32 to the host CFLAGS. The configuration option CONFIG_SIM_M32 should accomplish that if it is supported in your Make.defs file. Greg |
@NuttX just rebased the code with the last commit at nuttx/master repository and tried it again. Here's my result: cd nuttx
make distclean
cd tools
./configure.sh sim/nsh
cd ..
make
Can you confirm that you obtain the same behaviour? |
@vmayoral "No rule to make target `/home/victor/Dropbox/OSRF/ros2_embedded_nuttx/nuttx/include/arch/irq.h"
|
@vmayoral "No rule to make target `/home/victor/Dropbox/OSRF/ros2_embedded_nuttx/nuttx/include/arch/irq.h" I just repeated your steps and the code build and executed with no problem. |
@NuttX did you repeated it with nuttx/master or with our code There's indeed something we modified that is messing up the sim. It seems that the symlink is fine: victor@frcsim:~/Dropbox/OSRF/ros2_embedded_nuttx/nuttx/include$ ll
total 384
drwxrwxr-x 9 victor victor 4096 Oct 22 14:38 ./
drwxrwxr-x 21 victor victor 4096 Oct 22 14:38 ../
-rw-rw-r-- 1 victor victor 6596 Oct 21 15:01 aio.h
lrwxrwxrwx 1 victor victor 67 Oct 22 14:38 apps -> /home/victor/Dropbox/OSRF/ros2_embedded_nuttx/nuttx/../apps/include/
lrwxrwxrwx 1 victor victor 68 Oct 22 14:38 arch -> /home/victor/Dropbox/OSRF/ros2_embedded_nuttx/nuttx/arch/sim/include/
drwxrwxr-x 2 victor victor 4096 Oct 21 15:01 arpa/
-rw-rw-r-- 1 victor victor 4778 Oct 21 15:01 assert.h
-rw-rw-r-- 1 victor victor 3072 Oct 21 15:01 crc16.h
-rw-rw-r-- 1 victor victor 3072 Oct 21 15:01 crc32.h
-rw-rw-r-- 1 victor victor 7543 Oct 21 15:01 ctype.h
drwxrwxr-x 2 victor victor 4096 Oct 21 15:01 cxx/
-rw-rw-r-- 1 victor victor 19289 Oct 21 15:01 debug.h
-rw-rw-r-- 1 victor victor 4357 Oct 21 15:01 dirent.h
-rw-rw-r-- 1 victor victor 11947 Oct 21 15:01 elf32.h
-rw-rw-r-- 1 victor victor 15907 Oct 21 15:01 errno.h
-rw-rw-r-- 1 victor victor 7595 Oct 21 15:01 fcntl.h
-rw-rw-r-- 1 victor victor 10787 Oct 21 15:01 fixedmath.h
-rw-rw-r-- 1 victor victor 66 Oct 21 15:01 .gitignore
-rw-rw-r-- 1 victor victor 5669 Oct 21 15:01 inttypes.h
-rw-rw-r-- 1 victor victor 2635 Oct 21 15:01 libgen.h
-rw-rw-r-- 1 victor victor 8065 Oct 21 15:01 limits.h
-rw-rw-r-- 1 victor victor 4295 Oct 21 15:01 mqueue.h
drwxrwxr-x 2 victor victor 4096 Oct 21 15:01 net/
drwxrwxr-x 2 victor victor 4096 Oct 22 10:37 netinet/
drwxrwxr-x 2 victor victor 4096 Oct 21 15:01 netpacket/
drwxrwxr-x 22 victor victor 4096 Oct 22 14:38 nuttx/
-rw-rw-r-- 1 victor victor 8245 Oct 21 15:01 nxflat.h
-rw-rw-r-- 1 victor victor 4812 Oct 21 15:01 poll.h
-rw-rw-r-- 1 victor victor 15037 Oct 21 15:01 pthread.h
-rw-rw-r-- 1 victor victor 4563 Oct 21 15:01 queue.h
-rw-rw-r-- 1 victor victor 5400 Oct 21 15:01 sched.h
-rw-rw-r-- 1 victor victor 5216 Oct 21 15:01 semaphore.h
-rw-rw-r-- 1 victor victor 2199 Oct 22 10:37 setjmp.h
-rw-rw-r-- 1 victor victor 10142 Oct 21 15:01 signal.h
-rw-rw-r-- 1 victor victor 9228 Oct 21 15:01 spawn.h
-rw-rw-r-- 1 victor victor 4886 Oct 21 15:01 stdbool.h
-rw-rw-r-- 1 victor victor 4277 Oct 21 15:01 stddef.h
-rw-rw-r-- 1 victor victor 8712 Oct 21 15:01 stdint.h
-rw-rw-r-- 1 victor victor 6308 Oct 21 15:01 stdio.h
-rw-rw-r-- 1 victor victor 6409 Oct 21 15:01 stdlib.h
-rw-rw-r-- 1 victor victor 4390 Oct 21 15:01 string.h
drwxrwxr-x 2 victor victor 4096 Oct 21 15:01 sys/
-rw-rw-r-- 1 victor victor 2871 Oct 21 15:01 syscall.h
-rw-rw-r-- 1 victor victor 9893 Oct 21 15:01 syslog.h
-rw-rw-r-- 1 victor victor 13745 Oct 21 15:01 termios.h
-rw-rw-r-- 1 victor victor 8650 Oct 21 15:01 threads.h
-rw-rw-r-- 1 victor victor 7014 Oct 21 15:01 time.h
-rw-rw-r-- 1 victor victor 6357 Oct 21 15:01 unistd.h
|
All right, i removed manually some dependencies from the In any case, not it seems to work. Thanks for your support @NuttX |
Although the README reports that somebody made Needs more work. |
@vmayoral Max Holtzberg is the person who claimed that it works: https://groups.yahoo.com/neo/groups/nuttx/conversations/topics/4316 |
@vmayoral I needed to remove and checkout readline to get everything build otherwise I got an error nsh_session.c:144: undefined reference to `readline' . I could not build it when switched from stm to sim just by the distclean as you mentioned already. By the way in your README one step to initialize the stlink and tinq-core as submodules is missing and therefore build will fail. As far as I can see you have only rmdir the stlink and checkouted by normal git clone which would not be required. Let me know if I have misunderstood something. Thanks. |
@CodeBot9000 in order to allow others to use our current implementation we are trying to make it work in Qemu. While using this configuration i get the following error:
@NuttX i tried activating several x86-64 options through
menuconfig
but it didn't help. Do you know if there's a way to build NuttX for Qemu on 64 bit machines?.The text was updated successfully, but these errors were encountered: