Re: Using C++ STL in Nuttx

2021-03-16 Thread Flavio Castro Alves Filho
Xiang, I believe the problem was related to something on my branch. I was using a quite old version, based on release 10 branch. Now using master as branch, the testlibcxx compiled correctly. Tomorrow I will try my experiments and report here. Best regards, Flavio Em ter., 16 de mar. de 2021

Re: Oneshot implementation Doubt

2021-03-16 Thread Sara da Cunha Monteiro de Souza
I got it Mr Nutt, thanks for the detailed explanation! Em ter., 16 de mar. de 2021 às 16:04, Gregory Nutt escreveu: > The oneshot and free-running OS timers have value even without tickless > mode. But they are not required by the OS. I think you have a complete > BSP without them. > > The si

Re: Using C++ STL in Nuttx

2021-03-16 Thread Xiang Xiao
Try to remove CONFIG_ARCH_FLOAT_H On Tue, Mar 16, 2021 at 12:15 PM Flavio Castro Alves Filho < flavio.al...@gmail.com> wrote: > Hello Xiang, > > It is still not working. The error persists. > > Here is my defconfig file: > > # > # This file is autogenerated: PLEASE DO NOT EDIT IT. > # > # You can

Re: Using C++ STL in Nuttx

2021-03-16 Thread Flavio Castro Alves Filho
Hello Xiang, It is still not working. The error persists. Here is my defconfig file: # # 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 defconfi

Re: Oneshot implementation Doubt

2021-03-16 Thread Gregory Nutt
The oneshot and free-running OS timers have value even without tickless mode.  But they are not required by the OS.  I think you have a complete BSP without them. The single timer approach is a lot more difficult.  The free-running and oneshot timers are very easy to program.  the first is jus

Re: Oneshot implementation Doubt

2021-03-16 Thread Sara da Cunha Monteiro de Souza
Hummm.. I see. For the tickless implementation with 2 timers it's interesting to have the _oneshot.c to help implement the System Interfaces along with the _freerun.c. The 2 timers approach is intended to keep one timer to track time and the another to drive the events? What would be the hardware

Re: Using C++ STL in Nuttx

2021-03-16 Thread Xiang Xiao
>> >> Again, the coding standard does currently require the .cxx extension: >> >> https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#cplusplus >> >> I would consider that up for discussion and subject to community >> concurrence. Which ever is selected, the extension should be used

Re: Oneshot implementation Doubt

2021-03-16 Thread Gregory Nutt
Most architectures support a timer library.  The _oneshot.c file is a wrapper around the library that creates an internal one shot driver.  That oneshot does not depend on the onshot driver and can be used anywhere in the OS architecture-specific code where you need a oneshot.  The _lowerhalf.c

Re: Using C++ STL in Nuttx

2021-03-16 Thread Xiang Xiao
On Tue, Mar 16, 2021 at 10:20 AM Flavio Castro Alves Filho < flavio.al...@gmail.com> wrote: > Hello Xiang, > > Em ter., 16 de mar. de 2021 às 14:01, Xiang Xiao > escreveu: > > > > On Tu > > > > > This project use the modern C++ feature, so you must enable llvm > > ibc++(CONFIG_LIBCXX=y) > > I tri

Re: Using C++ STL in Nuttx

2021-03-16 Thread Flavio Castro Alves Filho
Hello Xiang, Em ter., 16 de mar. de 2021 às 14:01, Xiang Xiao escreveu: > > On Tu > > > This project use the modern C++ feature, so you must enable llvm > ibc++(CONFIG_LIBCXX=y) I tried a new build, executing: $ make distclean $ ./tools/configure.sh -l stm32f4discovery:testlibcxx $ make I can

Oneshot implementation Doubt

2021-03-16 Thread Sara da Cunha Monteiro de Souza
Hi all, I've been working on the oneshot driver implementation for ESP32 and I've noticed that other chips split the implementation into 2 files: - _oneshot_lowerhalf.c - _oneshot.c The second file is not used at all besides the lowerhalf. And the lowerhalf file seems more like a wrap

Re: Using C++ STL in Nuttx

2021-03-16 Thread Xiang Xiao
On Tue, Mar 16, 2021 at 9:12 AM Flavio Castro Alves Filho < flavio.al...@gmail.com> wrote: > Concerning cxx or cpp ... I have to tell you that I was not used for > cxx ... but it is not a problem anyway. > > What is disturbing me now is that there are problems regarding newlib > c++ and uClib++. >

Re: Using C++ STL in Nuttx

2021-03-16 Thread Flavio Castro Alves Filho
Concerning cxx or cpp ... I have to tell you that I was not used for cxx ... but it is not a problem anyway. What is disturbing me now is that there are problems regarding newlib c++ and uClib++. I tried to add this json project: https://github.com/nlohmann/json, in single header mode. I am faci

Re: Using C++ STL in Nuttx

2021-03-16 Thread Xiang Xiao
On Tue, Mar 16, 2021 at 11:24 PM Gregory Nutt wrote: > > >> I had to change my file names, from cpp to cxx. Is it mandatory to > >> change the file extension to use C++? > >> > > No, .cxx is just the default extension. You can change the default value > in > > Makefile like this: > > CXXEXT=.cpp

Re: Using C++ STL in Nuttx

2021-03-16 Thread Alan Carvalho de Assis
On 3/16/21, Gregory Nutt wrote: > >>> I had to change my file names, from cpp to cxx. Is it mandatory to >>> change the file extension to use C++? >>> >> No, .cxx is just the default extension. You can change the default value >> in >> Makefile like this: >> CXXEXT=.cpp >> But this feature just ex

Re: Using C++ STL in Nuttx

2021-03-16 Thread Gregory Nutt
I had to change my file names, from cpp to cxx. Is it mandatory to change the file extension to use C++? No, .cxx is just the default extension. You can change the default value in Makefile like this: CXXEXT=.cpp But this feature just exists in Makefile under the apps folder. Again, the cod

Re: Using C++ STL in Nuttx

2021-03-16 Thread Gregory Nutt
I had to change my file names, from cpp to cxx. Is it mandatory to change the file extension to use C++? Currently, the .cxx extension is specified in the coding standard: *https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#cplusplus*

Re: Using C++ STL in Nuttx

2021-03-16 Thread Xiang Xiao
On Tue, Mar 16, 2021 at 10:37 PM Flavio Castro Alves Filho < flavio.al...@gmail.com> wrote: > Hello Xiang, > > I could execute my example inside the NuttX infrastructure. > > I had to change my file names, from cpp to cxx. Is it mandatory to > change the file extension to use C++? > > No, .cxx is

Re: Using C++ STL in Nuttx

2021-03-16 Thread Flavio Castro Alves Filho
Hello Xiang, I could execute my example inside the NuttX infrastructure. I had to change my file names, from cpp to cxx. Is it mandatory to change the file extension to use C++? Reviewing my cmake file, it seems that it is not using uClibc++ to build, but newlib ... probably that's the reason fo