tanushreebaindur commented on issue #246:
URL: 
https://github.com/apache/incubator-nuttx-apps/issues/246#issuecomment-846504066


   @a-lunev ,
   
   The above error was my mistake. I had intentionally edited the 
nxflat/Makefile some days back while trying something and then deleted it  so 
that I could update it from upstream. But fetching and merging from upstream to 
my test branch did not get me a copy of the Makefile, so there was no Makefile 
in examples/nxflat. I corrected that problem by  cloning the repositories 
again. 
   
   After that I got the following error on building Nuttx:
   LD: nuttx
   
/home/tanushree/nuttx-code/buildroot/build_arm_nofpu/staging_dir/bin/arm-nuttx-eabi-ld:
 cannot find -lm
   Makefile:155: recipe for target 'nuttx' failed
   make[1]: *** [nuttx] Error 1
   make[1]: Leaving directory '/home/tanushree/nuttx-code/nuttx/arch/arm/src'
   tools/Makefile.unix:422: recipe for target 'nuttx' failed
   make: *** [nuttx] Error 2
   
   To fix the above error I had to enable CONFIG_LIBM using menuconfig (Library 
Routines --> Standard Math Library).  I used a 32 bit virtual machine for this 
build because I am getting multiple definition errors when building buildroot 
on the 64bit machine. But I did not have to make any other configuration 
changes due to using a 32 bit virtual machine instead of 64 bit. Adding 
CONFIG_LIBM was the only change.
   
   I was then able to reproduce this error:
   
   ../nuttx/arch/arm/src/board/libboard.a(lm_appinit.o): In function 
`board_app_initialize':
   lm_appinit.c:(.text+0x46): undefined reference to `mmcsd_spislotinitialize'
   make[1]: *** [Makefile:156: nuttx] Error 1
   
   To fix this error I isolated the call to mmcsd_spislotinitialize  by 
conditional compilation as you have suggested above. The code now builds 
successfully.
   
   I  will submit a PR so the changes can be evaluated
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to