Re: Build environment using cmake, c++ and NuttX as a library

2021-01-10 Thread Flavio Castro Alves Filho
Hello Matt, I'm sorry for the long delay. I'm still trying to find a way to work more time with Nuttx. Here the link for my cmake base hellocpp for Nuttx: https://github.com/Phi-Innovations/nuttx-apps/tree/main/hellocpp Hope it is still useful for you. Best regards, Flavio Em sáb., 12 de de

Re: Build environment using cmake, c++ and NuttX as a library

2020-12-12 Thread Matt DeWall
Hi Flavio, I'm looking to do something similar and have been putting the cmake stuff on the back-burner. Is your cmake config something you'd be willing to share? No problem if not, just looking to save some headaches on my end. Thanks! Matt On Fri, Dec 11, 2020 at 10:07 AM Flavio Castro Alve

Re: Build environment using cmake, c++ and NuttX as a library

2020-12-11 Thread Flavio Castro Alves Filho
Hello Marc, Thank you for your response. In fact, it was a little more than that: I didn't set the library group in cmake and also didn't set the correct linker. Solving these issues, I could have it working and running. Thank you very much. Best regards, Flavio Em sex., 11 de dez. de 2020

Re: Build environment using cmake, c++ and NuttX as a library

2020-12-11 Thread Marc Rosen
Hi Flavio, well I think there are two problems: 1. it seems either you are missing libarch.a or you have a library order problem. Because ld can not find up_exit etc. those are arch specific functions. 2. I would recommend you to add the flag -nostdlib. At least it is going to avoid newlib sy

Build environment using cmake, c++ and NuttX as a library

2020-12-11 Thread Flavio Castro Alves Filho
Hello, Has anybody here used NuttX as a library and a C++ project with cmake? I tried to create a project (using hellocxx example) with this setup, but I was not successful. I can build, but I cannot link. My link errors are the following: [ 33%] Linking CXX executable hellocpp /usr/lib/gcc/a