Re: [Bug] RP2040 broken, any config&boards, ostest and apps hang

2025-04-15 Thread Sebastien Lorquet

Hello

If you are in a hurry you can use another pico as picoprobe

https://mcuoneclipse.com/2022/09/17/picoprobe-using-the-raspberry-pi-pico-as-debug-probe/

I find that quite cool.

Sebastien


On 14/04/2025 14:09, Alan C. Assis wrote:

Hi Kevin,

I will order a Pico Debug probe, it is something new for me.

In fact it seems like a heisenbug, I just compiled from mainline and after
drag and drop it worked, but this time I had to use nautilus with sudo
because the Copy option to RPI-RP2 disk wasn't working.

BR,

Alan

On Mon, Apr 14, 2025 at 8:48 AM Kevin Witteveen 
wrote:


Hi,

Thanks for the fast response.
I'm glad posting this issue to the mailing list was worth it. The github
issue got no attention.
The RP2040 support is very important to me.

There is something I want to add to this issue.

-- Flashing --

I mainly flash the firmware using the Pico Debug probe or the picotool via
USB.
I tested the drag&drop method and it actually does create ttyACMx for me.
But what concerns me is that this can be another unreliable symptom or
"heisenbug".

Best,

Kevin

Op ma 14 apr 2025 om 13:27 schreef Alan C. Assis :


Hi Kevin and Alin,

I confirmed that NuttX 12.9-RC1 is broken on Raspberry Pi Pico.

After copying the nuttx.uf2 to virtual disk RPI-RP2 the board restart by
the /dev/ttyACM0 is not created.

Please find the steps below:

alan@dev:/tmp$ cd nuttx/
alan@dev:/tmp/nuttx$ . tools/configure_completion.bash
alan@dev:/tmp/nuttx$ ./tools/configure.sh raspberrypi-pico:usbnsh

alan@dev:/tmp/nuttx$ make -j
Create version.h
LN: platform/board to /tmp/apps/platform/dummy
Register: hello
Register: nsh
Register: sh
Register: getprime
Register: ostest
CPP:



/tmp/nuttx/boards/arm/rp2040/raspberrypi-pico/scripts/raspberrypi-pico-flash.ld->

/tmp/nuLD: nuttx
Memory region Used Size  Region Size  %age Used
flash:152 KB 2 MB  7.42%
 sram:8872 B   264 KB  3.28%
Generating: nuttx.uf2
Done.

alan@dev:/tmp/nuttx$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/13.2.1/lto-wrapper
Target: arm-none-eabi
Configured with: ../configure --build=x86_64-linux-gnu --prefix=/usr
--includedir='/usr/lib/include' --mandir='/usr/lib/share/man'
--infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var
--disable-option-checking --disable-silent-rules
--libdir='/usr/lib/lib/x86_64-linux-gnu'
--libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode
--disable-dependency-tracking --mandir=/usr/share/man
--enable-languages=c,c++,lto --enable-multilib --disable-decimal-float
--disable-libffi --disable-libgomp --disable-libmudflap
--disable-libquadmath --disable-libssp --disable-libstdcxx-pch
--disable-nls --disable-shared --disable-threads --enable-tls
--build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib
--with-gnu-as --with-gnu-ld --with-pkgversion=15:13.2.rel1-2
--without-included-gettext --prefix=/usr/lib
--infodir=/usr/share/doc/gcc-arm-none-eabi/info
--htmldir=/usr/share/doc/gcc-arm-none-eabi/html
--pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin
--libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3
--host=x86_64-linux-gnu --with-headers=no --without-newlib
--with-multilib-list=rmprofile,aprofile ASFLAGS= ASFLAGS_FOR_BUILD=
CFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer



-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.

-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -Wno-format -Wno-error=format-security
-fcf-protection



-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'

'CFLAGS_FOR_BUILD=-g -O2' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=3'
CPPFLAGS_FOR_BUILD= CXXFLAGS='-g -O2 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer



-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.

-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -Wno-format -Wno-error=format-security
-fcf-protection



-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'

'CXXFLAGS_FOR_BUILD=-g -O2' DFLAGS=-frelease DFLAGS_FOR_BUILD=-frelease
FCFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer



-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.

-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -fcf-protection



-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'

'FCFLAGS_FOR_BUILD=-g -O2' FFLAGS='-g -O2 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer



-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.

-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -fcf-protection



-fdebu

[Bug] RP2040 broken, any config&boards, ostest and apps hang

2025-04-15 Thread Kevin Witteveen
Hi NuttX,

This is a follow up on previous github issues.

After building and flashing my RP2040 based boards with NuttX on any OS,
for example Windows, Linux, macOS and different machines (including a clean
Linux install) with default configurations, they do not pass the ostest.

Symptoms:

The ostest freezes up around the watchdog test, but sometimes it happens on
different tests as well. The entire OS hangs in random applications too.
Another problem is that if you run "help", the output is a mess.

However, the very strange part is that sometimes this issue does not show
up at all.

To reproduce:

Any configuration, any OS, any machine. Run "help" to see a misaligned
mess. Run ostest to see it freeze up. Some apps might fail too.
But sometimes things just run fine.

Tested on:

Raspberry Pi Pico (two boards)
Raspberry Pi Pico W
Custom RP2040 board
RAKwireless RAK4630 RP2040
Non-RP2040 boards (they pass and work fine)
RP2040 boards with year-old firmware (they pass and work fine)

The frustrating part:

I tried to figure out the problem, and sometimes it seems like I found it,
because after changing some configurations or apps, it starts working
again. Only to break after flashing it a few more times with tiny changes.

USB:

I previously thought USB was the issue, because it looked like the system
didn’t crash if USB wasn’t connected. But later the OS started hanging even
without using USB at all.

Help:

I’m unable to figure out the problem and this is blocking my projects,
including some driver development for NuttX.
Can anyone help test this or try to reproduce it?

Thanks,

Kevin (MartiniMarter github)


Sv: [Bug] RP2040 broken, any config&boards, ostest and apps hang

2025-04-15 Thread alin.jerpe...@sony.com
Hi Alan,

12.9 is already released
I will prepare a 12.9.1 release ASAP

Best regards
Alin



Från: Alan C. Assis 
Skickat: den 14 april 2025 13:25
Till: dev@nuttx.apache.org 
Ämne: Re: [Bug] RP2040 broken, any config&boards, ostest and apps hang

Hi Kevin and Alin, I confirmed that NuttX 12. 9-RC1 is broken on Raspberry Pi 
Pico. After copying the nuttx. uf2 to virtual disk RPI-RP2 the board restart by 
the /dev/ttyACM0 is not created. Please find the steps below: alan@ dev: /tmp$ 
cd nuttx/


Hi Kevin and Alin,

I confirmed that NuttX 12.9-RC1 is broken on Raspberry Pi Pico.

After copying the nuttx.uf2 to virtual disk RPI-RP2 the board restart by
the /dev/ttyACM0 is not created.

Please find the steps below:

alan@dev:/tmp$ cd nuttx/
alan@dev:/tmp/nuttx$ . tools/configure_completion.bash
alan@dev:/tmp/nuttx$ ./tools/configure.sh raspberrypi-pico:usbnsh

alan@dev:/tmp/nuttx$ make -j
Create version.h
LN: platform/board to /tmp/apps/platform/dummy
Register: hello
Register: nsh
Register: sh
Register: getprime
Register: ostest
CPP:
 
/tmp/nuttx/boards/arm/rp2040/raspberrypi-pico/scripts/raspberrypi-pico-flash.ld->
/tmp/nuLD: nuttx
Memory region Used Size  Region Size  %age Used
   flash:152 KB 2 MB  7.42%
sram:8872 B   264 KB  3.28%
Generating: nuttx.uf2
Done.

alan@dev:/tmp/nuttx$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/13.2.1/lto-wrapper
Target: arm-none-eabi
Configured with: ../configure --build=x86_64-linux-gnu --prefix=/usr
--includedir='/usr/lib/include' --mandir='/usr/lib/share/man'
--infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var
--disable-option-checking --disable-silent-rules
--libdir='/usr/lib/lib/x86_64-linux-gnu'
--libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode
--disable-dependency-tracking --mandir=/usr/share/man
--enable-languages=c,c++,lto --enable-multilib --disable-decimal-float
--disable-libffi --disable-libgomp --disable-libmudflap
--disable-libquadmath --disable-libssp --disable-libstdcxx-pch
--disable-nls --disable-shared --disable-threads --enable-tls
--build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib
--with-gnu-as --with-gnu-ld --with-pkgversion=15:13.2.rel1-2
--without-included-gettext --prefix=/usr/lib
--infodir=/usr/share/doc/gcc-arm-none-eabi/info
--htmldir=/usr/share/doc/gcc-arm-none-eabi/html
--pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin
--libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3
--host=x86_64-linux-gnu --with-headers=no --without-newlib
--with-multilib-list=rmprofile,aprofile ASFLAGS= ASFLAGS_FOR_BUILD=
CFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -Wno-format -Wno-error=format-security
-fcf-protection
-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'
'CFLAGS_FOR_BUILD=-g -O2' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=3'
CPPFLAGS_FOR_BUILD= CXXFLAGS='-g -O2 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -Wno-format -Wno-error=format-security
-fcf-protection
-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'
'CXXFLAGS_FOR_BUILD=-g -O2' DFLAGS=-frelease DFLAGS_FOR_BUILD=-frelease
FCFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -fcf-protection
-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'
'FCFLAGS_FOR_BUILD=-g -O2' FFLAGS='-g -O2 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -fcf-protection
-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'
'FFLAGS_FOR_BUILD=-g -O2' LDFLAGS='-Wl,-Bsymbolic-functions -flto=auto
-ffat-lto-objects -Wl,-z,relro' LDFLAGS_FOR_BUILD= OBJCFLAGS='-g -O2
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
-flto=auto -ffat-lto-objects -fstack-protector-strong
-fstack-clash-protection -Wno-format -Wno-error=format-security
-fcf-protection
-fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2

Re: [Bug] RP2040 broken, any config&boards, ostest and apps hang

2025-04-15 Thread Alan C. Assis
Hmm, it explains why the RC1 link was named as 12.9 without RC :-)

Alin, since it wasn't published at https://nuttx.apache.org/download/ yet,
maybe we could release the new one as 12.9 instead of 12.9.1

BTW, I tested 12.7 and 12.8 and usbnsh is working fine on these releases,
so the issue was some commit in last 3 months.

BR,

Alan

On Mon, Apr 14, 2025 at 8:44 AM alin.jerpe...@sony.com <
alin.jerpe...@sony.com> wrote:

> Hi Alan,
>
> 12.9 is already released
> I will prepare a 12.9.1 release ASAP
>
> Best regards
> Alin
>
>
> 
> Från: Alan C. Assis 
> Skickat: den 14 april 2025 13:25
> Till: dev@nuttx.apache.org 
> Ämne: Re: [Bug] RP2040 broken, any config&boards, ostest and apps hang
>
> Hi Kevin and Alin, I confirmed that NuttX 12. 9-RC1 is broken on Raspberry
> Pi Pico. After copying the nuttx. uf2 to virtual disk RPI-RP2 the board
> restart by the /dev/ttyACM0 is not created. Please find the steps below:
> alan@ dev: /tmp$ cd nuttx/
>
>
> Hi Kevin and Alin,
>
> I confirmed that NuttX 12.9-RC1 is broken on Raspberry Pi Pico.
>
> After copying the nuttx.uf2 to virtual disk RPI-RP2 the board restart by
> the /dev/ttyACM0 is not created.
>
> Please find the steps below:
>
> alan@dev:/tmp$ cd nuttx/
> alan@dev:/tmp/nuttx$ . tools/configure_completion.bash
> alan@dev:/tmp/nuttx$ ./tools/configure.sh raspberrypi-pico:usbnsh
>
> alan@dev:/tmp/nuttx$ make -j
> Create version.h
> LN: platform/board to /tmp/apps/platform/dummy
> Register: hello
> Register: nsh
> Register: sh
> Register: getprime
> Register: ostest
> CPP:
>
>  
> /tmp/nuttx/boards/arm/rp2040/raspberrypi-pico/scripts/raspberrypi-pico-flash.ld->
> /tmp/nuLD: nuttx
> Memory region Used Size  Region Size  %age Used
>flash:152 KB 2 MB  7.42%
> sram:8872 B   264 KB  3.28%
> Generating: nuttx.uf2
> Done.
>
> alan@dev:/tmp/nuttx$ arm-none-eabi-gcc -v
> Using built-in specs.
> COLLECT_GCC=arm-none-eabi-gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/13.2.1/lto-wrapper
> Target: arm-none-eabi
> Configured with: ../configure --build=x86_64-linux-gnu --prefix=/usr
> --includedir='/usr/lib/include' --mandir='/usr/lib/share/man'
> --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var
> --disable-option-checking --disable-silent-rules
> --libdir='/usr/lib/lib/x86_64-linux-gnu'
> --libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode
> --disable-dependency-tracking --mandir=/usr/share/man
> --enable-languages=c,c++,lto --enable-multilib --disable-decimal-float
> --disable-libffi --disable-libgomp --disable-libmudflap
> --disable-libquadmath --disable-libssp --disable-libstdcxx-pch
> --disable-nls --disable-shared --disable-threads --enable-tls
> --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib
> --with-gnu-as --with-gnu-ld --with-pkgversion=15:13.2.rel1-2
> --without-included-gettext --prefix=/usr/lib
> --infodir=/usr/share/doc/gcc-arm-none-eabi/info
> --htmldir=/usr/share/doc/gcc-arm-none-eabi/html
> --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin
> --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3
> --host=x86_64-linux-gnu --with-headers=no --without-newlib
> --with-multilib-list=rmprofile,aprofile ASFLAGS= ASFLAGS_FOR_BUILD=
> CFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
>
> -ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
> -flto=auto -ffat-lto-objects -fstack-protector-strong
> -fstack-clash-protection -Wno-format -Wno-error=format-security
> -fcf-protection
>
> -fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'
> 'CFLAGS_FOR_BUILD=-g -O2' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=3'
> CPPFLAGS_FOR_BUILD= CXXFLAGS='-g -O2 -fno-omit-frame-pointer
> -mno-omit-leaf-frame-pointer
>
> -ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
> -flto=auto -ffat-lto-objects -fstack-protector-strong
> -fstack-clash-protection -Wno-format -Wno-error=format-security
> -fcf-protection
>
> -fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'
> 'CXXFLAGS_FOR_BUILD=-g -O2' DFLAGS=-frelease DFLAGS_FOR_BUILD=-frelease
> FCFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
>
> -ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
> -flto=auto -ffat-lto-objects -fstack-protector-strong
> -fstack-clash-protection -fcf-protection
>
> -fdebug-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=/usr/src/gcc-arm-none-eabi-15:13.2.rel1-2'
> 'FCFLAGS_FOR_BUILD=-g -O2' FFLAGS='-g -O2 -fno-omit-frame-pointer
> -mno-omit-leaf-frame-pointer
>
> -ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
> -flto=auto -ffat-lto-objects -fstack-protector-strong
> -fstack-clash-protection -fcf-protection
>
> -fdebug

Re: [EXT] socketcan ioctl(...SIOCSCANBITRATE...) brings the interface up

2025-04-15 Thread Nathan Hartman
On Tue, Apr 15, 2025 at 1:25 PM Carlos Sanchez
 wrote:

> Related PR on the apps side, to make slcan work after the "bitrate no
> longer brings interface up" change:
> https://github.com/apache/nuttx-apps/pull/3059
>
> While testing this, I think I have discovered a small mistake on my
> previous, Nuttx-side PR, which slipped by me and by revision: "ret"
> might be used uninitialized now because I removed the assignment on
> stm32_fdcan_sock:1976
>
>
> https://github.com/apache/nuttx/pull/16199/files#diff-8efec4e19b7401adcc3961c078b98ab945ebcada8635105fb591d16cbd6e5210L1976
>
> Should I make a mini PR for this?



Hi,

Good catch!

Yes, please make a PR to fix that!! When it's ready, post about it in this
thread so we can get it reviewed and merged quickly.

Thanks,
Nathan


Re: [Bug] RP2040 broken, any config&boards, ostest and apps hang

2025-04-15 Thread Alan C. Assis
Thank you Kevin,

I will test it later and let you know!

BR,

Alan

On Mon, Apr 14, 2025 at 9:19 AM Kevin Witteveen 
wrote:

> Hi Alan,
>
> Can you maybe test the rp2040 with ostest? Also see if "help" is outputting
> reliable text?
> Maybe enable random apps and see if they run fine?
>
> Apparently the pico probe is not necessary to reproduce this issue. As the
> same problems repeat themselves with drag&drop.
>
> Theory:
> Perhaps this could also be linked to new picoSDK releases? Raspberrypi
> changed quite some things to support the new chips.
> I have only tried fresh PicoSDK installs. I have not tried older versions
> of PicoSDK yet.
> However, I *believe* the PicoSDK is only used for the bootloader, which
> might cause problems initializing the hardware?
>
> Best,
>
> Kevin
>
> Op ma 14 apr 2025 om 14:09 schreef Alan C. Assis :
>
> > Hi Kevin,
> >
> > I will order a Pico Debug probe, it is something new for me.
> >
> > In fact it seems like a heisenbug, I just compiled from mainline and
> after
> > drag and drop it worked, but this time I had to use nautilus with sudo
> > because the Copy option to RPI-RP2 disk wasn't working.
> >
> > BR,
> >
> > Alan
> >
> > On Mon, Apr 14, 2025 at 8:48 AM Kevin Witteveen 
> > wrote:
> >
> > > Hi,
> > >
> > > Thanks for the fast response.
> > > I'm glad posting this issue to the mailing list was worth it. The
> github
> > > issue got no attention.
> > > The RP2040 support is very important to me.
> > >
> > > There is something I want to add to this issue.
> > >
> > > -- Flashing --
> > >
> > > I mainly flash the firmware using the Pico Debug probe or the picotool
> > via
> > > USB.
> > > I tested the drag&drop method and it actually does create ttyACMx for
> me.
> > > But what concerns me is that this can be another unreliable symptom or
> > > "heisenbug".
> > >
> > > Best,
> > >
> > > Kevin
> > >
> > > Op ma 14 apr 2025 om 13:27 schreef Alan C. Assis :
> > >
> > > > Hi Kevin and Alin,
> > > >
> > > > I confirmed that NuttX 12.9-RC1 is broken on Raspberry Pi Pico.
> > > >
> > > > After copying the nuttx.uf2 to virtual disk RPI-RP2 the board restart
> > by
> > > > the /dev/ttyACM0 is not created.
> > > >
> > > > Please find the steps below:
> > > >
> > > > alan@dev:/tmp$ cd nuttx/
> > > > alan@dev:/tmp/nuttx$ . tools/configure_completion.bash
> > > > alan@dev:/tmp/nuttx$ ./tools/configure.sh raspberrypi-pico:usbnsh
> > > >
> > > > alan@dev:/tmp/nuttx$ make -j
> > > > Create version.h
> > > > LN: platform/board to /tmp/apps/platform/dummy
> > > > Register: hello
> > > > Register: nsh
> > > > Register: sh
> > > > Register: getprime
> > > > Register: ostest
> > > > CPP:
> > > >
> > > >
> > >
> >
> /tmp/nuttx/boards/arm/rp2040/raspberrypi-pico/scripts/raspberrypi-pico-flash.ld->
> > > > /tmp/nuLD: nuttx
> > > > Memory region Used Size  Region Size  %age Used
> > > >flash:152 KB 2 MB  7.42%
> > > > sram:8872 B   264 KB  3.28%
> > > > Generating: nuttx.uf2
> > > > Done.
> > > >
> > > > alan@dev:/tmp/nuttx$ arm-none-eabi-gcc -v
> > > > Using built-in specs.
> > > > COLLECT_GCC=arm-none-eabi-gcc
> > > > COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/13.2.1/lto-wrapper
> > > > Target: arm-none-eabi
> > > > Configured with: ../configure --build=x86_64-linux-gnu --prefix=/usr
> > > > --includedir='/usr/lib/include' --mandir='/usr/lib/share/man'
> > > > --infodir='/usr/lib/share/info' --sysconfdir=/etc
> --localstatedir=/var
> > > > --disable-option-checking --disable-silent-rules
> > > > --libdir='/usr/lib/lib/x86_64-linux-gnu'
> > > > --libexecdir='/usr/lib/lib/x86_64-linux-gnu'
> --disable-maintainer-mode
> > > > --disable-dependency-tracking --mandir=/usr/share/man
> > > > --enable-languages=c,c++,lto --enable-multilib
> --disable-decimal-float
> > > > --disable-libffi --disable-libgomp --disable-libmudflap
> > > > --disable-libquadmath --disable-libssp --disable-libstdcxx-pch
> > > > --disable-nls --disable-shared --disable-threads --enable-tls
> > > > --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib
> > > > --with-gnu-as --with-gnu-ld --with-pkgversion=15:13.2.rel1-2
> > > > --without-included-gettext --prefix=/usr/lib
> > > > --infodir=/usr/share/doc/gcc-arm-none-eabi/info
> > > > --htmldir=/usr/share/doc/gcc-arm-none-eabi/html
> > > > --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin
> > > > --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3
> > > > --host=x86_64-linux-gnu --with-headers=no --without-newlib
> > > > --with-multilib-list=rmprofile,aprofile ASFLAGS= ASFLAGS_FOR_BUILD=
> > > > CFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
> > > >
> > > >
> > >
> >
> -ffile-prefix-map=/build/gcc-arm-none-eabi-TuTZN0/gcc-arm-none-eabi-13.2.rel1=.
> > > > -flto=auto -ffat-lto-objects -fstack-protector-strong
> > > > -fstack-clash-protection -Wno-format -Wno-error=format-security
> > > > -fcf-protection
> > > >
> > > >
> > >
> >
> -fdebug-prefix

Re: [EXT] socketcan ioctl(...SIOCSCANBITRATE...) brings the interface up

2025-04-15 Thread Xiang Xiao
On Wed, Apr 16, 2025 at 1:25 AM Carlos Sanchez
 wrote:

> Related PR on the apps side, to make slcan work after the "bitrate no
> longer brings interface up" change:
> https://github.com/apache/nuttx-apps/pull/3059
>
> While testing this, I think I have discovered a small mistake on my
> previous, Nuttx-side PR, which slipped by me and by revision: "ret"
> might be used uninitialized now because I removed the assignment on
> stm32_fdcan_sock:1976
>
>
> https://github.com/apache/nuttx/pull/16199/files#diff-8efec4e19b7401adcc3961c078b98ab945ebcada8635105fb591d16cbd6e5210L1976
>
> Should I make a mini PR for this?
>
> I was going to propose another global CAN change, removing the 1000
> factor from bitrate thus making bitrate calls use units in Hz instead
> of kHz, so we can discuss that and (if agreed) I make the change on
> the same PR to avoid creating so a tiny one.
>

What's the unit used on Linux? we need to align the interface with Linux.

>
> Thoughts?
>
> Carlos
>


Re: Vote for using system dd instead of nsh dd, avoid duplicate code

2025-04-15 Thread Alan C. Assis
Yes, if we can merge both in a single dd command, but keep the
configuration to have a small dd (like that from nshlib) for small
microcontroller as Sebastien suggested, it will be fine.

+1

On Mon, Apr 14, 2025 at 10:59 AM Xiang Xiao 
wrote:

> The functionality in system/dd and nshlib is unsync, this patch:
>
>1. update system/dd to get the same functionality as nshlib/dd
>2. remove one copy(nshlib/dd) to avoid the inconsistency in the future.
>
> Good work! thanks.
>
>
> On Mon, Apr 14, 2025 at 9:07 PM 董九柱  wrote:
>
> > Hello Community,
> >
> > I submit some PRs about using system/dd app instead of dd command from
> > nshlib.
> >
> > PR link:
> > https://github.com/apache/nuttx-apps/pull/3057
> > https://github.com/apache/nuttx/pull/16198
> >
> > Why do?
> > There are two implementations of dd in the current system, one under
> nshlib
> > and the other under system/dd.
> > we need to remove one to avoid duplication code and function lost. The
> > discuss: https://github.com/apache/nuttx-apps/pull/3048
> > From the current perspective, the system "dd" is a better choice, as it
> > allows for the separate configuration of its corresponding stack and
> > compilation into an independent wasm module.
> >
> > How do?
> > 1. Align the functionality of "dd" in nshlib with that in the system "dd"
> > to ensure consistent functionality.
> > 2. Remove implement of dd in nshlib, include
> > config(CONFIG_NSH_DISABLE_DD、NSH_CMDOPT_DD_STATS) and
> > file(nshlib/nsh_ddcmd.c)
> > 3. Adjust all board configurations to ensure backward and forward
> > compatibility.
> >
> > So I need your vote here:
> > If you accept the breaking PR, please reply with +1.
> > If you reject the PR, please reply with -1.
> >
> > BRs,
> >
>


Re: [EXT] socketcan ioctl(...SIOCSCANBITRATE...) brings the interface up

2025-04-15 Thread Carlos Sanchez
Related PR on the apps side, to make slcan work after the "bitrate no
longer brings interface up" change:
https://github.com/apache/nuttx-apps/pull/3059

While testing this, I think I have discovered a small mistake on my
previous, Nuttx-side PR, which slipped by me and by revision: "ret"
might be used uninitialized now because I removed the assignment on
stm32_fdcan_sock:1976

https://github.com/apache/nuttx/pull/16199/files#diff-8efec4e19b7401adcc3961c078b98ab945ebcada8635105fb591d16cbd6e5210L1976

Should I make a mini PR for this?

I was going to propose another global CAN change, removing the 1000
factor from bitrate thus making bitrate calls use units in Hz instead
of kHz, so we can discuss that and (if agreed) I make the change on
the same PR to avoid creating so a tiny one.

Thoughts?

Carlos