Re: about IDEs and dev boards

2020-12-09 Thread Disruptive Solutions
VSCode (normal use) and Eclipse (Hard faults).

STM32 stack (nucleos, blackboards, etc) and own reference board(s).

Hardware as extra tools (logic analyzer, scope, seggers, st link, etc)

And just having fun to use NuttX and the results one can achieve. Still
mind blowing!!!

Ben

Op wo 9 dec. 2020 8:39 a.m. schreef Marc Rosen :

>
> Am 04.12.2020 um 02:54 schrieb Matias N.:
> > Hi,
> > I was wondering what IDEs do you use with NuttX and what is your
> preferred dev board (can be more than one).
> > I'm curious since I have used QtCreator for long time now and generally
> works well, but it has some quirks.
> Jetbrains CLion is the IDE i use. It is not that great with Makefile
> projects and debugging but it is getting better.
> And it works well if you also use some of their other dev tools and ides.
> > And on hardware side I always favored STM32 boards (with embedded
> debugger) but after getting into nRF52 I found
> > it to be much easier to work with and seems a very well designed SoC
> from the users perspective. The "mux (almost) any peripheral to any pin" is
> great (any other chip does that?).
> >
> > Best,
> > Matias
> Mostly AVRs here, the ones too small for Nuttx, and STM32. Usually
> custom boards.
>
> regards,
> Marc
>
>


Re: ssd1306 oled help

2020-12-09 Thread Alan Carvalho de Assis
Kudos Matt !

You are welcome!

BR,

Alan

On 12/8/20, Matt DeWall  wrote:
> Thank you everyone, such a helpful community!I was able to get the
> i2ctool working and it found my screen.
>
> I'm off to my next steps.  :)
>
> Matt
>
> On Tue, Dec 8, 2020 at 1:44 PM  wrote:
>
>> Hello Matt,
>>
>> You have 2 enable i2ctool in make menuconfig (also see blog Alan):
>>
>> https://acassis.wordpress.com/2019/01/19/how-to-use-nuttx-i2c-scan-features/
>>
>> And then on the prompt in NuttX you can do the command say:
>> i2c dev -b 1 0x00 0x7f
>>
>> It will show you the used I2C addresses.
>>
>> Hope this will help you!
>>
>> With kind regards,
>> Ben
>> nuttx.nl
>>
>>
>> -Oorspronkelijk bericht-
>> Van: Matt DeWall 
>> Verzonden: dinsdag 8 december 2020 21:17
>> Aan: dev@nuttx.apache.org
>> Onderwerp: Re: ssd1306 oled help
>>
>> Thanks everyone - apologies for the delay, some other priorities blocked
>> me.
>>
>> Looks like I was getting bit by cygwin and "make clean_context all" got
>> me
>> sorted out and actually reflected my changes.
>>
>> However, I'd like to understand how to get the i2ctool working.  I was
>> able to add it and see it in nsh, though it reports that no buses are
>> found.
>>
>> I added this to my stm32_bringup.c (ripped it from the stm32f4discovery):
>>
>>
>> -
>> #if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) static void
>> stm32_i2c_register(int bus) {
>>   FAR struct i2c_master_s *i2c;
>>   int ret;
>>
>>   i2c = stm32_i2cbus_initialize(bus);
>>   if (i2c == NULL)
>> {
>>   syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus);
>> }
>>   else
>> {
>>   ret = i2c_register(i2c, bus);
>>   if (ret < 0)
>> {
>>   syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n",
>>  bus, ret);
>>   stm32_i2cbus_uninitialize(i2c);
>> }
>> }
>> }
>> #endif
>>
>>
>> /
>>  * Name: stm32_i2ctool
>>  *
>>  * Description:
>>  *   Register I2C drivers for the I2C tool.
>>  *
>>
>>
>> /
>>
>> #if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) static void
>> stm32_i2ctool(void) {
>>   stm32_i2c_register(1);
>> #if 0
>>   stm32_i2c_register(1);
>>   stm32_i2c_register(2);
>> #endif
>> }
>> #else
>> #  define stm32_i2ctool()
>> #endif
>>
>> --
>>
>> Yet when I run the i2ctool from nsh I get this:
>>
>> nsh> i2c bus
>>  BUS   EXISTS?
>> Bus 0: NO
>> Bus 1: NO
>> Bus 2: NO
>> Bus 3: NO
>> Bus 4: NO
>> Bus 5: NO
>>
>> I'd like to understand how to get this tool running as I'll probably be
>> needing it in the future.  :)
>>
>> Thanks everyone!
>>
>> Matt
>>
>> On Sun, Dec 6, 2020 at 5:56 AM Alan Carvalho de Assis 
>> wrote:
>>
>> > Hi Matt,
>> >
>> > Sorry my delay to reply.
>> >
>> > As Mr. Greg pointed the issue is related to your OLED display I2C
>> address.
>> >
>> > Normally these OLED display has an Address Select using a 0R resistor
>> > to 0x78 or 0x7A.
>> >
>> > You need to setup the CONFIG_SSD1306_I2CADDR with the right address.
>> >
>> > Also as Mr. Ben suggested, using the i2ctool you can scan your I2C bus
>> > and find the I2C address that your display is using.
>> >
>> > Any issue, please let us to know.
>> >
>> > BR,
>> >
>> > Alan
>> >
>> > On 12/4/20, Matt DeWall  wrote:
>> > > Didn't know about that one, thanks!  Found one of Alan's articles
>> > > for
>> > that
>> > > and gonna give that a shot.
>> > >
>> > > Matt
>> > >
>> > > On Fri, Dec 4, 2020 at 5:01 PM Disruptive Solutions <
>> > > disruptivesolution...@gmail.com> wrote:
>> > >
>> > >> Did you try the i2c tool?
>> > >>
>> > >> Op za 5 dec. 2020 1:58 a.m. schreef Matt DeWall :
>> > >>
>> > >> > Got it.  Ok - looks like my 116 errors were from my later
>> > >> > experimenting.
>> > >> > If I completely disconnect or try other i2c pins, I get 116, so
>> > >> > that
>> > >> makes
>> > >> > sense.
>> > >> >
>> > >> > So it looks like when I connect the pins correctly I'm getting
>> > >> > the 6
>> > >> error.
>> > >> >
>> > >> > I'm wondering if that just means somehow my device has an i2c
>> > >> > address
>> > >> that
>> > >> > isn't the default that the driver is looking for?
>> > >> >
>> > >> > Mat
>> > >> >
>> > >> > On Fri, Dec 4, 2020 at 4:25 PM Gregory Nutt 
>> > >> > wrote:
>> > >> >
>> > >> > > Should have mentioned that the error code 6 is defined in
>> > >> > include/errno.h:
>> > >> > >
>> > >> > > #define ENXIO   6
>> > >> > > #define ENXIO_STR   "No such device or address"
>> > >> > >
>> > >> > > And errcode code 116 is:
>> > >> > >
>> > >> > > #define ETIMEDOUT   116
>> > >> > > #define ETIMEDOUT_STR   "Connection timed out"
>> > >> > >
>> > >> > > Which is also reported by as an I2C failure by
>> stm32_i2c_transfer():
>> > >> > >
>> > >> > >if (stm32_i2c_sem_waitdone(priv

[OT] Could be useful for someone porting NuttX to STM32MP1

2020-12-09 Thread Alan Carvalho de Assis
I just saw a post about it:

https://werwolv.net/blog/mp1os


[ANNOUNCE] Apache NuttX (incubating) 10.0.1 and 9.1.1 Release

2020-12-09 Thread Brennan Ashton
The Apache NuttX (incubating) project team is proud to announce
Apache NuttX 10.0.1 and 9.1.1 have been released.

The release artifacts and Release Notes can be found (shortly) at:
https://nuttx.apache.org/download/
https://nuttx.apache.org/releases/10.0.1/
https://nuttx.apache.org/releases/9.1.1/

These are patch releases that include two important TCP/IP security
fixes. A follow-on email will share details of these.

Thanks,
Brennan Ashton
on behalf of Apache NuttX PPMC


signature.asc
Description: This is a digitally signed message part


CVE-2020-17528: Apache NuttX (incubating) Out of Bound Write from invalid TCP Urgent length

2020-12-09 Thread Brennan Ashton
Description:
Out-of-bounds Write vulnerability in TCP stack of Apache Software
Foundation Apache NuttX (incubating) allows attacker to corrupt memory
by supplying arbitrary urgent data pointer offsets within TCP packets
including beyond the length of the packet.

This issue affects:
Apache Software Foundation Apache NuttX (incubating) versions prior to
9.1.1 AND 10.0.0.

This issue is also known as AMNESIA:33 CVE-2020-17437

Credit:
Apache NuttX would like to thank Forescout for reporting the issue

Thanks you,
Brennan Ashton


signature.asc
Description: This is a digitally signed message part


CVE-2020-17529: Apache NuttX (incubating) Out of Bound Write from invalid fragmentation offset value specified in the IP header

2020-12-09 Thread Brennan Ashton
Description:
Out-of-bounds Write vulnerability in TCP Stack of Apache Software
Foundation Apache NuttX (incubating) allows attacker to corrupt memory
by supplying and invalid fragmentation offset value specified in the IP
header.  This is only impacts builds with both CONFIG_EXPERIMENTAL and
CONFIG_NET_TCP_REASSEMBLY build flags enabled.

This issue affects:
Apache Software Foundation Apache NuttX (incubating) versions prior to
9.1.1 AND 10.0.0.

This issue is also known as AMNESIA:33 CVE-2020-17438

Credit:
Apache NuttX would like to thank Forescout for reporting the issue

Thanks you,
Brennan Ashton


signature.asc
Description: This is a digitally signed message part


Re: about IDEs and dev boards

2020-12-09 Thread Marlar Chan
Dear Ben,
   Is there any setup guideline for Nuttx debuggig with VSCode (normal use) and 
Eclipse (Hard faults)?

Best Regards,
Marlar

From: Disruptive Solutions 
Sent: Wednesday, December 9, 2020 6:16 PM
To: dev@nuttx.apache.org 
Subject: Re: about IDEs and dev boards

VSCode (normal use) and Eclipse (Hard faults).

STM32 stack (nucleos, blackboards, etc) and own reference board(s).

Hardware as extra tools (logic analyzer, scope, seggers, st link, etc)

And just having fun to use NuttX and the results one can achieve. Still
mind blowing!!!

Ben

Op wo 9 dec. 2020 8:39 a.m. schreef Marc Rosen :

>
> Am 04.12.2020 um 02:54 schrieb Matias N.:
> > Hi,
> > I was wondering what IDEs do you use with NuttX and what is your
> preferred dev board (can be more than one).
> > I'm curious since I have used QtCreator for long time now and generally
> works well, but it has some quirks.
> Jetbrains CLion is the IDE i use. It is not that great with Makefile
> projects and debugging but it is getting better.
> And it works well if you also use some of their other dev tools and ides.
> > And on hardware side I always favored STM32 boards (with embedded
> debugger) but after getting into nRF52 I found
> > it to be much easier to work with and seems a very well designed SoC
> from the users perspective. The "mux (almost) any peripheral to any pin" is
> great (any other chip does that?).
> >
> > Best,
> > Matias
> Mostly AVRs here, the ones too small for Nuttx, and STM32. Usually
> custom boards.
>
> regards,
> Marc
>
>


CONFIDENTIALITY: This email is intended solely for the person(s) named and may 
be confidential and/or privileged. If you are not the intended recipient, 
please delete it, notify us and do not copy, use, or disclose its contents.
Towards a sustainable earth: Print only when necessary. Thank you.


Re: about IDEs and dev boards

2020-12-09 Thread Brennan Ashton
Marlar
With the plugin that I linked you should be able to nice debugging without
having to use two different environments. Just don't use the native vscode
debugger from the c++ it has long standing issues with remote targets.

Ben is there a reason you don't use it for hardfaults? I'm not sure I quite
understand what you would run into with that.

--Brennan

On Wed, Dec 9, 2020, 5:30 PM Marlar Chan  wrote:

> Dear Ben,
>Is there any setup guideline for Nuttx debuggig with VSCode (normal
> use) and Eclipse (Hard faults)?
>
> Best Regards,
> Marlar
> 
> From: Disruptive Solutions 
> Sent: Wednesday, December 9, 2020 6:16 PM
> To: dev@nuttx.apache.org 
> Subject: Re: about IDEs and dev boards
>
> VSCode (normal use) and Eclipse (Hard faults).
>
> STM32 stack (nucleos, blackboards, etc) and own reference board(s).
>
> Hardware as extra tools (logic analyzer, scope, seggers, st link, etc)
>
> And just having fun to use NuttX and the results one can achieve. Still
> mind blowing!!!
>
> Ben
>
> Op wo 9 dec. 2020 8:39 a.m. schreef Marc Rosen :
>
> >
> > Am 04.12.2020 um 02:54 schrieb Matias N.:
> > > Hi,
> > > I was wondering what IDEs do you use with NuttX and what is your
> > preferred dev board (can be more than one).
> > > I'm curious since I have used QtCreator for long time now and generally
> > works well, but it has some quirks.
> > Jetbrains CLion is the IDE i use. It is not that great with Makefile
> > projects and debugging but it is getting better.
> > And it works well if you also use some of their other dev tools and ides.
> > > And on hardware side I always favored STM32 boards (with embedded
> > debugger) but after getting into nRF52 I found
> > > it to be much easier to work with and seems a very well designed SoC
> > from the users perspective. The "mux (almost) any peripheral to any pin"
> is
> > great (any other chip does that?).
> > >
> > > Best,
> > > Matias
> > Mostly AVRs here, the ones too small for Nuttx, and STM32. Usually
> > custom boards.
> >
> > regards,
> > Marc
> >
> >
> 
>
> CONFIDENTIALITY: This email is intended solely for the person(s) named and
> may be confidential and/or privileged. If you are not the intended
> recipient, please delete it, notify us and do not copy, use, or disclose
> its contents.
> Towards a sustainable earth: Print only when necessary. Thank you.
>


Re: about IDEs and dev boards

2020-12-09 Thread Matias N.
Brennan,
what do you use to pick up the project files in VSCode? Do you use a 
compilation database?
That's what I use with QtCreator.

Matias

On Wed, Dec 9, 2020, at 22:59, Brennan Ashton wrote:
> Marlar
> With the plugin that I linked you should be able to nice debugging without
> having to use two different environments. Just don't use the native vscode
> debugger from the c++ it has long standing issues with remote targets.
> 
> Ben is there a reason you don't use it for hardfaults? I'm not sure I quite
> understand what you would run into with that.
> 
> --Brennan
> 
> On Wed, Dec 9, 2020, 5:30 PM Marlar Chan  wrote:
> 
> > Dear Ben,
> >Is there any setup guideline for Nuttx debuggig with VSCode (normal
> > use) and Eclipse (Hard faults)?
> >
> > Best Regards,
> > Marlar
> > 
> > From: Disruptive Solutions 
> > Sent: Wednesday, December 9, 2020 6:16 PM
> > To: dev@nuttx.apache.org 
> > Subject: Re: about IDEs and dev boards
> >
> > VSCode (normal use) and Eclipse (Hard faults).
> >
> > STM32 stack (nucleos, blackboards, etc) and own reference board(s).
> >
> > Hardware as extra tools (logic analyzer, scope, seggers, st link, etc)
> >
> > And just having fun to use NuttX and the results one can achieve. Still
> > mind blowing!!!
> >
> > Ben
> >
> > Op wo 9 dec. 2020 8:39 a.m. schreef Marc Rosen :
> >
> > >
> > > Am 04.12.2020 um 02:54 schrieb Matias N.:
> > > > Hi,
> > > > I was wondering what IDEs do you use with NuttX and what is your
> > > preferred dev board (can be more than one).
> > > > I'm curious since I have used QtCreator for long time now and generally
> > > works well, but it has some quirks.
> > > Jetbrains CLion is the IDE i use. It is not that great with Makefile
> > > projects and debugging but it is getting better.
> > > And it works well if you also use some of their other dev tools and ides.
> > > > And on hardware side I always favored STM32 boards (with embedded
> > > debugger) but after getting into nRF52 I found
> > > > it to be much easier to work with and seems a very well designed SoC
> > > from the users perspective. The "mux (almost) any peripheral to any pin"
> > is
> > > great (any other chip does that?).
> > > >
> > > > Best,
> > > > Matias
> > > Mostly AVRs here, the ones too small for Nuttx, and STM32. Usually
> > > custom boards.
> > >
> > > regards,
> > > Marc
> > >
> > >
> > 
> >
> > CONFIDENTIALITY: This email is intended solely for the person(s) named and
> > may be confidential and/or privileged. If you are not the intended
> > recipient, please delete it, notify us and do not copy, use, or disclose
> > its contents.
> > Towards a sustainable earth: Print only when necessary. Thank you.
> >
> 


STM32L5 and TrustedFirmware-M

2020-12-09 Thread Michael Jung
Hello,

I recently bought an STM32L52E-DK development kit and I am playing around
with ST's port of ARM's TrustedFirmware-M (see ST's UM2671).  I would like
to basically leave this untouched, but replace ST's 'non-secure'
demo-application with a NuttX image.  It would be nice if you could give me
some advice before I start coding:

1.) The STM32L5 is an armv8-m architecture chip, which since recently
(thanks!) seems to be supported by NuttX.
  1.1.) Is armv8-m support already mature? Or do you expect considerable
effort in getting this working?
  1.2.) With TrustedFirmware-M (TFM) the complete 'secure' domain is owned
by TFM. NuttX will only manage the 'non-secure' domain. Is there anything
inherent in NuttX's armv8-m support that requires access to the 'secure
domain'?
2.) To my understanding there currently is no support for STM32L5 devices
in NuttX.
  2.1.) Is anybody out there already working on STM32L5?
  2.2.) Given that STM32L5 is armv8-m based all hardware macros have been
extended for 'secure domain' support. For example many registers are
present twice for access control from 'secure' and 'non-secure' contexts. I
think this would warrant (yet another) 'arch/arm/src/stm32l5' directory. Do
you agree?

Thanks!
Michael