Re: NuttX seminar online 1th April 2020 14:30 European time

2020-04-01 Thread Alan Carvalho de Assis
Hi Ben,

I think this is a good idea.

I'm fine, thank you.

BR,

Alan

On 3/31/20, Disruptive Solutions  wrote:
> In these Corona days I have the idea to make a online seminar “Getting
> started with Nuttx”. I also made a VirtualBox image for the participants. I
> am still learning Nuttx myself, but you learn the most when you teach
> right?
>
> https://us04web.zoom.us/j/361350421?pwd=RGlhUkcxOG5XOUhDYVdINks5eFVrZz09
>
> https://www.dropbox.com/sh/n51ficlngwpn6l7/AADaqVA-B0bICxNZp1ZskQXLa?dl=0
>
> Maybe I will see you there? I have never used this platform before and it
> can handle 100 participants. So I hope all goes well. I have tested it with
> a few people.
>
> Thanks.
>
> @Alan
> I have tried to reach you and thought something was wrong. But I heared you
> are fine. I am glad!!
>
> Ben
>
> Verstuurd vanaf mijn iPhone


Fail checks no new warnings?

2020-04-01 Thread Gregory Nutt

Hi, list,

This is something that I wanted to add to the incubator-nuttx-testing, 
but it appears that no issues are supported in that repository.  That is 
a problem; issues should be enabled for the testing repository as well.


Anyway...

I was looking at some successful logs from recent checks of one of my 
PRs and saw undetected errors.  These were not declared as "errors" by 
GCC, but only as "warnings" so they did not cause the build the fail.  
This leads me think that we should fail the check if there are new 
warnings introduced by build.


Detecting new warnings might be tricky, however.  I did this manually 
when I ran the build tests myself:  I just kept the last good test log 
and diff'ed the current test log with that known good log.  Any new 
warnings would show up in the diffs.  The tricky part is that there is a 
lot of other kruft that shows up in the diffs too like data differences 
and line number differences.


So I don't know if this would be worth the effort.  The benefits would be:

1) We could find undetected  errors that currently only manifest as a 
warnings.


2)  We have too many warnings now and we should not permit new warnings 
to creep into the build.  I would like to be able to someday trick all 
warnings as errors.  This would lead to higher quality code.  The number 
of unique warnings is really rather small now (and most generated by 
explicit #warning commands).  If we keep the number of new warnings 
down, then getting to zero warnings could be achievable.


Greg




Re: Fail checks no new warnings?

2020-04-01 Thread Gregory Nutt



  I did this manually when I ran the build tests myself:  I just 
kept the last good test log and diff'ed the current test log with that 
known good log.  Any new warnings would show up in the diffs.  The 
tricky part is that there is a lot of other kruft that shows up in the 
diffs too like data differences and line number differences


Perhaps you could use grep -c ": warning:" and if the count is larger in 
the new log, then there are new warnings?





RE: Fail checks no new warnings?

2020-04-01 Thread David Sidrane
Hi Greg,

I was able to do this once before:

#if !defined(TODO)
#  if !defined(NO_PRINT_TODOS)
#   define DO_PRAGMA(x) _Pragma (#x)
#   define TODO(x) DO_PRAGMA(message ("TODO - " #x))
# else
#   define TODO(x)
# endif
#endif

IIRC it allowed me to print compiler output that was not treated as warnings
then add -Werror= and treat all warnings as errors.

David

-Original Message-
From: Gregory Nutt [mailto:spudan...@gmail.com]
Sent: Wednesday, April 01, 2020 9:50 AM
To: dev@nuttx.apache.org
Subject: Fail checks no new warnings?

Hi, list,

This is something that I wanted to add to the incubator-nuttx-testing,
but it appears that no issues are supported in that repository.  That is
a problem; issues should be enabled for the testing repository as well.

Anyway...

I was looking at some successful logs from recent checks of one of my
PRs and saw undetected errors.  These were not declared as "errors" by
GCC, but only as "warnings" so they did not cause the build the fail.
This leads me think that we should fail the check if there are new
warnings introduced by build.

Detecting new warnings might be tricky, however.  I did this manually
when I ran the build tests myself:  I just kept the last good test log
and diff'ed the current test log with that known good log.  Any new
warnings would show up in the diffs.  The tricky part is that there is a
lot of other kruft that shows up in the diffs too like data differences
and line number differences.

So I don't know if this would be worth the effort.  The benefits would be:

1) We could find undetected  errors that currently only manifest as a
warnings.

2)  We have too many warnings now and we should not permit new warnings
to creep into the build.  I would like to be able to someday trick all
warnings as errors.  This would lead to higher quality code.  The number
of unique warnings is really rather small now (and most generated by
explicit #warning commands).  If we keep the number of new warnings
down, then getting to zero warnings could be achievable.

Greg


Re: Fail checks no new warnings?

2020-04-01 Thread Gregory Nutt



I was able to do this once before:

#if !defined(TODO)
#  if !defined(NO_PRINT_TODOS)
#   define DO_PRAGMA(x) _Pragma (#x)
#   define TODO(x) DO_PRAGMA(message ("TODO - " #x))
# else
#   define TODO(x)
# endif
#endif

IIRC it allowed me to print compiler output that was not treated as warnings
then add -Werror= and treat all warnings as errors.


This is a little different topic.  You are talking about conditionally 
disabling some of the warnings?


I was asking a different question about checking for new warnings in the 
PR check builds.  Let me give the specific example.  I had this error in 
the code:


   ret - nxsem_wait(&sem);
   if (ret < 0)
  {
    ...
  }

The warning was that the computed value was not used in the line before 
the test annd then that 'ret' was not initialized in the test.  Both 
were warnings and the code passed the PR check build successfully.  But 
it is clearly wrong; that should have been '=' and not '-' in the line 
before the test;.  If we were to detect new warnings in the builds, then 
this could have been caught.


If we had no warnings in the system other than those generated by 
#warning, then your suggestion would a good one and maybe we will need 
to do that down the road.


There are many places with REVISIT in the comments.  It would nice if 
those could be made visible as well.  REVISIT is the key word for 
flagging issues in the code (although I am sure some people may have 
used TODO as well).


Greg




Re: Fail checks no new warnings?

2020-04-01 Thread Xiang Xiao
On Thu, Apr 2, 2020 at 1:25 AM Gregory Nutt  wrote:
>
>
> > I was able to do this once before:
> >
> > #if !defined(TODO)
> > #  if !defined(NO_PRINT_TODOS)
> > #   define DO_PRAGMA(x) _Pragma (#x)
> > #   define TODO(x) DO_PRAGMA(message ("TODO - " #x))
> > # else
> > #   define TODO(x)
> > # endif
> > #endif
> >
> > IIRC it allowed me to print compiler output that was not treated as warnings
> > then add -Werror= and treat all warnings as errors.
>
> This is a little different topic.  You are talking about conditionally
> disabling some of the warnings?
>
> I was asking a different question about checking for new warnings in the
> PR check builds.  Let me give the specific example.  I had this error in
> the code:
>
> ret - nxsem_wait(&sem);
> if (ret < 0)
>{
>  ...
>}
>
> The warning was that the computed value was not used in the line before
> the test annd then that 'ret' was not initialized in the test.  Both
> were warnings and the code passed the PR check build successfully.  But
> it is clearly wrong; that should have been '=' and not '-' in the line
> before the test;.  If we were to detect new warnings in the builds, then
> this could have been caught.
>
> If we had no warnings in the system other than those generated by
> #warning, then your suggestion would a good one and maybe we will need
> to do that down the road.
>
> There are many places with REVISIT in the comments.  It would nice if
> those could be made visible as well.  REVISIT is the key word for
> flagging issues in the code (although I am sure some people may have
> used TODO as well).
>

Almost warning come from #warning, we can:
1.Add -Wno-cpp to disable #warning for precheck/nightly build:
   
https://stackoverflow.com/questions/9793293/how-do-i-disable-warning-message-in-gcc
2.Fix the remaining real warnning
3.Enable -Werror for precheck/nightly build

The suggestion from David is also valuable option for item 1, since
too much warning also block the developer find the real issue in daily
work. It is always good to enable people find the bug as early as
possible.

> Greg
>
>


Re: Fail checks no new warnings?

2020-04-01 Thread Alan Carvalho de Assis
Hi Xiang,

Yes, since there are few warnings it is better to fix them.

BR,

Alan

On 4/1/20, Xiang Xiao  wrote:
> On Thu, Apr 2, 2020 at 1:25 AM Gregory Nutt  wrote:
>>
>>
>> > I was able to do this once before:
>> >
>> > #if !defined(TODO)
>> > #  if !defined(NO_PRINT_TODOS)
>> > #   define DO_PRAGMA(x) _Pragma (#x)
>> > #   define TODO(x) DO_PRAGMA(message ("TODO - " #x))
>> > # else
>> > #   define TODO(x)
>> > # endif
>> > #endif
>> >
>> > IIRC it allowed me to print compiler output that was not treated as
>> > warnings
>> > then add -Werror= and treat all warnings as errors.
>>
>> This is a little different topic.  You are talking about conditionally
>> disabling some of the warnings?
>>
>> I was asking a different question about checking for new warnings in the
>> PR check builds.  Let me give the specific example.  I had this error in
>> the code:
>>
>> ret - nxsem_wait(&sem);
>> if (ret < 0)
>>{
>>  ...
>>}
>>
>> The warning was that the computed value was not used in the line before
>> the test annd then that 'ret' was not initialized in the test.  Both
>> were warnings and the code passed the PR check build successfully.  But
>> it is clearly wrong; that should have been '=' and not '-' in the line
>> before the test;.  If we were to detect new warnings in the builds, then
>> this could have been caught.
>>
>> If we had no warnings in the system other than those generated by
>> #warning, then your suggestion would a good one and maybe we will need
>> to do that down the road.
>>
>> There are many places with REVISIT in the comments.  It would nice if
>> those could be made visible as well.  REVISIT is the key word for
>> flagging issues in the code (although I am sure some people may have
>> used TODO as well).
>>
>
> Almost warning come from #warning, we can:
> 1.Add -Wno-cpp to disable #warning for precheck/nightly build:
>
> https://stackoverflow.com/questions/9793293/how-do-i-disable-warning-message-in-gcc
> 2.Fix the remaining real warnning
> 3.Enable -Werror for precheck/nightly build
>
> The suggestion from David is also valuable option for item 1, since
> too much warning also block the developer find the real issue in daily
> work. It is always good to enable people find the bug as early as
> possible.
>
>> Greg
>>
>>
>


Re: Fail checks no new warnings?

2020-04-01 Thread Gregory Nutt




Almost warning come from #warning, we can:
1.Add -Wno-cpp to disable #warning for precheck/nightly build:

https://stackoverflow.com/questions/9793293/how-do-i-disable-warning-message-in-gcc
2.Fix the remaining real warnning
3.Enable -Werror for precheck/nightly build

The suggestion from David is also valuable option for item 1, since
too much warning also block the developer find the real issue in daily
work. It is always good to enable people find the bug as early as
possible.

Sounds good to me.


Re: SAMA5D27 SDMMC support branch

2020-04-01 Thread Adam Feuer
Takeyoshi,

I did some work on the SDMCC driver today, it compiles now and I pushed the
code to the branch. I will try it and let you know how it goes. I am still
not sure everything is right, for instance why do I have to specify
SDMMC0_SIZE? The sama5d2x_memorymap.c file seems to need it. But it should
not be operating in memory-mapped mode, so I'm confused.

Here are the config settings I used:

#
# 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 defconfig file
that includes your
# modifications.
#
# CONFIG_AUDIO_FORMAT_MP3 is not set
# CONFIG_DISABLE_OS_API is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_CMDPARMS is not set
# CONFIG_SAMA5_UART0 is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="sama5d2-xult"
CONFIG_ARCH_BOARD_SAMA5D2_XULT=y
CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP="sama5"
CONFIG_ARCH_CHIP_ATSAMA5D27=y
CONFIG_ARCH_CHIP_SAMA5=y
CONFIG_ARCH_CHIP_SAMA5D2=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_IRQBUTTONS=y
CONFIG_ARCH_LOWVECTORS=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_AUDIO=y
CONFIG_AUDIO_NUM_BUFFERS=8
CONFIG_BOARD_LOOPSPERMSEC=65775
CONFIG_BOOT_RUNFROMSDRAM=y
CONFIG_BUILTIN=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_LOOP=y
CONFIG_DEV_ZERO=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_PARTITION=y
CONFIG_EXAMPLES_TCPBLASTER=y
CONFIG_EXAMPLES_TCPECHO=y
CONFIG_EXAMPLES_WGET=y
CONFIG_EXAMPLES_WGET_URL="http://10.0.0.1/";
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FS_FAT=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_EXCLUDE_VERSION=y
CONFIG_FS_ROMFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_HIDKBD_POLLUSEC=8
CONFIG_I2S=y
CONFIG_INTELHEX_BINARY=y
CONFIG_IOB_NBUFFERS=72
CONFIG_IOB_THROTTLE=16
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_NETINIT_NETLOCAL=y
CONFIG_NETINIT_NOMAC=y
CONFIG_NETUTILS_NETLIB_GENERICURLPARSER=y
CONFIG_NETUTILS_TELNETC=y
CONFIG_NETUTILS_WEBCLIENT=y
CONFIG_NET_ARP_IPIN=y
CONFIG_NET_ARP_SEND=y
CONFIG_NET_BROADCAST=y
CONFIG_NET_CDCECM=y
CONFIG_NET_ETH_PKTSIZE=1514
CONFIG_NET_ICMP=y
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_ROUTE=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_TCP=y
CONFIG_NET_TCPBACKLOG=y
CONFIG_NET_TCP_NOTIFIER=y
CONFIG_NET_TCP_WRITE_BUFFERS=y
CONFIG_NET_UDP=y
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_PROMPT_STRING="nsh>  "
CONFIG_NSH_QUOTE=y
CONFIG_NSH_READLINE=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sdcard"
CONFIG_NXPLAYER_INCLUDE_SYSTEM_RESET=y
CONFIG_NXPLAYER_RECURSIVE_MEDIA_SEARCH=y
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_PREALLOC_TIMERS=4
CONFIG_PREALLOC_WDOGS=16
CONFIG_RAMLOG=y
CONFIG_RAMLOG_BUFSIZE=16384
CONFIG_RAMLOG_SYSLOG=y
CONFIG_RAM_SIZE=268435456
CONFIG_RAM_START=0x2000
CONFIG_RAM_VSTART=0x2000
CONFIG_RAW_BINARY=y
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_READLINE_CMD_HISTORY_LEN=100
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_RR_INTERVAL=200
CONFIG_SAMA5D2XULT_528MHZ=y
CONFIG_SAMA5D2XULT_USBHOST_STACKSIZE=2048
CONFIG_SAMA5_BOOT_SDRAM=y
CONFIG_SAMA5_DDRCS_HEAP_END=0x2fa0
CONFIG_SAMA5_DDRCS_RESERVE=y
CONFIG_SAMA5_EHCI=y
CONFIG_SAMA5_HSMC=y
CONFIG_SAMA5_OHCI=y
CONFIG_SAMA5_PIOA_IRQ=y
CONFIG_SAMA5_PIOB_IRQ=y
CONFIG_SAMA5_PIOC_IRQ=y
CONFIG_SAMA5_PIO_IRQ=y
CONFIG_SAMA5_RTC=y
CONFIG_SAMA5_SDMMC0=y
CONFIG_SAMA5_TRNG=y
CONFIG_SAMA5_UART1=y
CONFIG_SAMA5_UDPHS=y
CONFIG_SAMA5_UHPHS=y
CONFIG_SCHED_HPWORKPRIORITY=192
CONFIG_SCHED_LPNTHREADS=2
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_SERIAL_TERMIOS=y
CONFIG_SIG_DEFAULT=y
CONFIG_SIG_EVTHREAD=y
CONFIG_START_DAY=31
CONFIG_START_MONTH=7
CONFIG_START_YEAR=2014
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSLOG_TIMESTAMP=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_NSH_CXXINITIALIZE=y
CONFIG_SYSTEM_NXPLAYER=y
CONFIG_SYSTEM_PING=y
CONFIG_SYSTEM_VI=y
CONFIG_TTY_SIGINT=y
CONFIG_TTY_SIGSTP=y
CONFIG_UART1_SERIAL_CONSOLE=y
CONFIG_USBDEV=y
CONFIG_USBDEV_DMA=y
CONFIG_USBDEV_DUALSPEED=y
CONFIG_USBDEV_TRACE=y
CONFIG_USBDEV_TRACE_NRECORDS=512
CONFIG_USBHOST_HIDKBD=y
CONFIG_USBHOST_MSC=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_WDOG_INTRESERVE=2

-adam

On Mon, Mar 16, 2020 at 7:33 PM Adam Feuer  wrote:

> Takeyoshi,
>
> I pushed some more files to the SDMMC branch— changing the IMXRT_HSDC to
> SAMA5_SDMMC throughout. It probably doesn't compile. I'll work on the
> registers and other problems tomorrow.
>
> -adam
>
> On Sat, Mar 7, 2020 at 6:19 PM Adam Feuer  wrote:
>
>> Cool. I'll see if I can work on the imxrt file then, in the branch I
>> linked to above.
>>
>> cheers
>> adam
>>
>> On Sat, Mar 7, 2020 at 6:15 PM Takeyoshi Kikuchi <
>> kiku...@centurysys.co.jp> wrote:
>>
>>> Adam,
>>>
>>> Since standards are determined by SD assotication, I think that the
>>> number of implementations according to the specifications has increased
>>> 

Build failed in Jenkins: NuttX-Nightly-Build #83

2020-04-01 Thread Apache Jenkins Server
See 

Changes:


--
[...truncated 565.45 KB...]

  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Building NuttX...


Configuration/Tool: sim/bas

  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Building NuttX...

In file included from bas.c:84:0:
bas.c: In function 'bas_interpreter':
bas_error.h:110:37: warning: left-hand operand of comma expression has no 
effect [-Wunused-value]
 #define NOSUCHLINE STATIC+40, _("No such line")
 ^
bas.c:2425:52: note: in expansion of macro 'NOSUCHLINE'
   FS_putChars(STDCHANNEL, (NOSUCHLINE));
^~
bas_fs.c:107:22: warning: 'g_vt100_colormap' defined but not used 
[-Wunused-const-variable=]
 static const uint8_t g_vt100_colormap[8] =
  ^~~~
:4048:16: warning: 'input' defined but not used [-Wunused-function]

Configuration/Tool: sim/mtdpart

  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Building NuttX...


Configuration/Tool: sim/spiffs

  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Building NuttX...


Configuration/Tool: sim/ustream

  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Building NuttX...

local/local_connect.c: In function 'psock_local_connect':
local/local_connect.c:292:2: warning: #warning Missing logic [-Wcpp]
 #warning Missing logic
  ^~~
netdb/lib_gethostbyaddrr.c: In function 'gethostbyaddr_r':
netdb/lib_gethostbyaddrr.c:387:20: warning: unused variable 'tmp' 
[-Wunused-variable]
   struct hostent_s tmp;
^~~

Configuration/Tool: sim/userfs

  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Building NuttX...

local/local_fifo.c: In function 'local_release_halfduplex':
local/local_fifo.c:449:4: warning: #warning Missing logic [-Wcpp]
 #  warning Missing logic
^~~
local/local_sockif.c: In function 'local_connect':
local/local_sockif.c:550:2: warning: #warning Missing logic [-Wcpp]
 #warning Missing logic
  ^~~
local/local_sockif.c: In function 'local_send':
local/local_sockif.c:695:2: warning: #warning Missing logic [-Wcpp]
 #warning Missing logic
  ^~~
local/local_connect.c: In function 'psock_local_connect':
local/local_connect.c:292:2: warning: #warning Missing logic [-Wcpp]
 #warning Missing logic
  ^~~

Skipping: sim/rpproxy

Configuration/Tool: sim/vpnkit

  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Building NuttX...

netdb/lib_gethostbyaddrr.c: In function 'gethostbyaddr_r':
netdb/lib_gethostbyaddrr.c:387:20: warning: unused variable 'tmp' 
[-Wunused-variable]
   struct hostent_s tmp;
^~~
nsh_netcmds.c: In function 'cmd_ifconfig':
nsh_netcmds.c:885:2: warning: #warning Missing Logic [-Wcpp]
 #warning Missing Logic
  ^~~
local/local_fifo.c: In function 'local_release_halfduplex':
local/local