Re: Integrating Nuttx to a firmware project.

2020-08-02 Thread Fotis Panagiotopoulos
Thanks everyone for the help. I managed to have everything set up to my liking. As a reference for others trying to manage multiple builds, here is what I did: I created scripts for every build, using the following format: # Example contents of DEBUG.sh kconfig-tweak --enable CONFIG_DEBUG_FEATU

Re: Integrating Nuttx to a firmware project.

2020-07-25 Thread Brennan Ashton
On Sat, Jul 25, 2020 at 4:09 AM Fotis Panagiotopoulos wrote: > > Perfect! kconfig-tweak is what I was looking for. I will give it a try > later today. > > However at this point I would like to ask. How is a debug build defined for > NuttX? > Surely there are configs that can be changed. But is the

Re: Integrating Nuttx to a firmware project.

2020-07-25 Thread Adam Feuer
Fotis, The debug.h file defines a lot of debug log settings that can be set or unset to see debug logging for different functional areas within NuttX. To use the settings, you first need to set the level you are interested in, one or more of: CONFIG_DEBUG_ERROR=yCONFIG_DEBUG_WARN=yCONFIG_DEBUG_IN

Re: Integrating Nuttx to a firmware project.

2020-07-25 Thread Fotis Panagiotopoulos
Perfect! kconfig-tweak is what I was looking for. I will give it a try later today. However at this point I would like to ask. How is a debug build defined for NuttX? Surely there are configs that can be changed. But is there any system-wide debug option? Is NDEBUG defined in any case? For exampl

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Adam Feuer
I wrote up the kconfig-tweak usage here: https://nuttx-companion.readthedocs.io/en/latest/user/debugging.html#changing-debug-settings-quickly -adam On Fri, Jul 24, 2020 at 3:24 PM Matias N. wrote: > I'm thinking in implementing it in my nuttx workspace manager as well =) > > On Fri, Jul 24, 20

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Matias N.
I'm thinking in implementing it in my nuttx workspace manager as well =) On Fri, Jul 24, 2020, at 17:32, Nathan Hartman wrote: > On Fri, Jul 24, 2020 at 3:49 PM Adam Feuer wrote: > > > > On Fri, Jul 24, 2020 at 12:40 PM Gregory Nutt wrote: > > > > > a dumb script like that one Abdelatif demonstr

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Gregory Nutt
a dumb script like that one Abdelatif demonstrated will multiple calls to kconfig-tweak can be used to turn on all of the configuration options that you need. Cool! I didn't know I could do this. Now that I know, I think I'll convert my configs to work this way. It will be much more convenie

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Nathan Hartman
On Fri, Jul 24, 2020 at 3:49 PM Adam Feuer wrote: > > On Fri, Jul 24, 2020 at 12:40 PM Gregory Nutt wrote: > > > a dumb script like that one Abdelatif demonstrated > > will multiple calls to kconfig-tweak can be used to turn on all of the > > configuration options that you need. > > > > Cool! I

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Adam Feuer
On Fri, Jul 24, 2020 at 12:40 PM Gregory Nutt wrote: > a dumb script like that one Abdelatif demonstrated > will multiple calls to kconfig-tweak can be used to turn on all of the > configuration options that you need. > Cool! -adam -- Adam Feuer

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Gregory Nutt
If no tool exists for this, Yes, kconfig-tweak. kconfig-tweak will enable or disable any setting configuration setting.  The full set of debug options to enable is project-specific, but a dumb script like that one Abdelatif demonstrated will multiple calls to kconfig-tweak can be used to tur

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Adam Feuer
If no tool exists for this, we could easily write one– it could look through a file with the debug settings, and turn them on or off in a config. It would help me too. I often want to quickly turn on or off particular debug settings while doing testing. Is this something that's wanted? -adam On

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Fotis Panagiotopoulos
> I keep two config files, one for debug, one for release. Very similar > except for the kinds of debugging options you mentioned. This is exactly what I want to avoid. I will have to support 3 different boards, with maybe 3 different build types. Thus 9 configurations. This will be very difficul

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Abdelatif Guettouche
> Can kconfig-tweak be used to quickly turn on and off these kind of settings > (such as debugging)? Maybe something like: kconfig-tweak --disable (or --enable) CONFIG_DEBUG_FEATURES make oldconfig On Fri, Jul 24, 2020 at 7:57 PM Matias N. wrote: > > Can kconfig-tweak be used to quickly turn on

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Matias N.
Can kconfig-tweak be used to quickly turn on and off these kind of settings (such as debugging)? > I keep two config files, one for debug, one for release. Very similar > except for the kinds of debugging options you mentioned. > > Nathan >

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Nathan Hartman
On Fri, Jul 24, 2020 at 12:26 PM Fotis Panagiotopoulos wrote: > Hello, > > So, I have set up my workspace now, and I have NuttX running properly on my > custom board. > I have another question though, regarding how to set things up for > development. > > Usually I have at least 2 build configurat

Re: Integrating Nuttx to a firmware project.

2020-07-24 Thread Fotis Panagiotopoulos
Hello, So, I have set up my workspace now, and I have NuttX running properly on my custom board. I have another question though, regarding how to set things up for development. Usually I have at least 2 build configurations: one for debugging, one for releases etc. Debug builds have assertions e

Re: Integrating Nuttx to a firmware project.

2020-07-14 Thread Abdelatif Guettouche
> Then I tried: > cd nuttx > ./tools/configure.sh ../boards/stm32f4discovery:nsh This does not work with out-of-tree boards, you need the path to the board. > In other words, it looks like it expects a different structure for > externally defined boards, than the provided ones. Co

Re: Integrating Nuttx to a firmware project.

2020-07-14 Thread Fotis Panagiotopoulos
Hi, I am trying to configure NuttX with an external board, following your advice, but I just can't make it work... My current workspace structure is the following: ├── apps ├── boards ├── Makefile └── nuttx I copied the directory ${TOPDIR}/nuttx/boards/arm/stm32/stm32f4discovery into ${TOPDIR}/b

Re: Integrating Nuttx to a firmware project.

2020-07-14 Thread Gregory Nutt
When not yet creating a custom board, I simply copy the config file and put it somewhere inside the workspace. If you eventually create a custom board, you can then place it in the proper directory (board/configs/*/defconfig). Doing it this way also allows you to configure nuttx with my fram

Re: Integrating Nuttx to a firmware project.

2020-07-14 Thread Matias N.
When not yet creating a custom board, I simply copy the config file and put it somewhere inside the workspace. If you eventually create a custom board, you can then place it in the proper directory (board/configs/*/defconfig). Doing it this way also allows you to configure nuttx with my framewor

Re: Integrating Nuttx to a firmware project.

2020-07-14 Thread Nathan Hartman
On Tue, Jul 14, 2020 at 7:48 AM Fotis Panagiotopoulos wrote: > Another thing that I was thinking is about NuttX configuration. The file > .config is included in the .gitignore file. So the actual NuttX > configuration is not tracked. > How do you usually handle this? I manually save that file i

Re: Integrating Nuttx to a firmware project.

2020-07-14 Thread Abdelatif Guettouche
> However as I see there is no officiaL way of having an out-of-tree boards > directory, and this is my main problem. > If I understand correctly, there is no "proper" way of using NuttX on > custom hardware, without touching its source code. There is an official way to have out-of-tree boards, a

Re: Integrating Nuttx to a firmware project.

2020-07-14 Thread Fotis Panagiotopoulos
Hi, Thanks everyone for your suggestions! I have read the Wikis, and they are very helpful indeed. However as I see there is no officiaL way of having an out-of-tree boards directory, and this is my main problem. If I understand correctly, there is no "proper" way of using NuttX on custom hardwar

Re: Integrating Nuttx to a firmware project.

2020-07-13 Thread Gregory Nutt
On 7/13/2020 3:00 PM, Fotis Panagiotopoulos wrote: Hi everyone! I am new to Nuttx but I would like to use it for my next projects. For the moment I am porting one of my big projects to Nuttx (that was previously working with another RTOS). However, I am a bit confused on how I should set up our

Re: Integrating Nuttx to a firmware project.

2020-07-13 Thread Matias N.
Hello, I personally like to create a git repository where the apps and nuttx repos are added as submodules. Unless you are going to use a pre-existing board which has everything you need, you will also eventually need to modify content inside nuttx/. An alternative is to configure nuttx to use a

Re: Integrating Nuttx to a firmware project.

2020-07-13 Thread Alan Carvalho de Assis
Hi Fotis, There are other options: Create a branch on nuttx and apps repositoris and add your project there. This way you can keep it working and from time to time rebase it with the master. Other option is creating an apps/external directory and inside it create a link for your application, but

Integrating Nuttx to a firmware project.

2020-07-13 Thread Fotis Panagiotopoulos
Hi everyone! I am new to Nuttx but I would like to use it for my next projects. For the moment I am porting one of my big projects to Nuttx (that was previously working with another RTOS). However, I am a bit confused on how I should set up our development workflow. I will have to create my own a