Re: mm/mm_heap assertion error

2024-03-11 Thread Simon Filgis
Is there a way to colorize heap to track down the bandid? Like CRC pattern
on all the spaces around and check on every call that the CRC pattern ist
still OK?

Gregory Nutt  schrieb am Mo., 11. März 2024, 19:27:

> If the memory location that is corrupted is consistent, then you can
> monitor that location to find the culprit (perhaps using debug output).
> If your debugger supports it then setting a watchpoint could also
> trigger a break when the corruption occurs.
>
> Maybe you can also try disabling features until you find the feature
> logic that is corrupting the heap.  There is no easy way to accomplish
> this.
>
> On 3/11/2024 11:27 AM, Nathan Hartman wrote:
> > What's needed is some way to binary search where the culprit is.
> >
> > If I understand correctly, it looks like the crash is happening in the
> > later stages of board bring-up? What is running before that? Can parts
> > be disabled or skipped to see if the problem goes away?
> >
> > Another idea is to try running a static analysis tool on the sources
> > and see if it finds anything suspicious to be looked into more
> > carefully.
> >
> >
> > On Mon, Mar 11, 2024 at 10:00 AM Gregory Nutt 
> wrote:
> >> The reason that the error is confusing is because the error probably did
> >> not occur at the time of the assertion; it probably occurred much
> earlier.
> >>
> >> In most crashes due to heap corruption there are two players:  the
> >> culprit and the victim threads.  The culprit thread actually cause the
> >> corruption.  But at the time of the corruption, no error occurs.  The
> >> error will not occur until later.
> >>
> >> So sometime later, the victim thread runs, encounters the clobbered heap
> >> and crashes.  In this case, "AppBringup" and "rptun" are potential
> >> victim threads.  The fact that they crash tell you very little about the
> >> culprit.
> >>
> >> On 3/10/2024 6:51 PM, yfliu2008 wrote:
> >>> Gregory, thank you for the analysis.
> >>>
> >>>
> >>>
> >>>
> >>> The crashes happened during system booting up, mostly at "AppBringup"
> or "rptun" threads, as per the assertion logs. The other threads existing
> are the "idle" and the "lpwork" threads as per the sched logs. There should
> be no other threads as NSH creation is still ongoing. As for
> interruptions, the UART and IPI are running in kernel space and MTIMER are
> in NuttSBI space. The NSH is loaded from a RPMSGFS volume, thus there
> are a lot RPMSG communications.
> >>>
> >>>
> >>>
> >>>
> >>> Is the KASAN proper for use in Kernel mode?
> >>>
> >>>
> >>> With MM_KASAN_ALL it reports a read access error:
> >>>
> >>>
> >>>
> >>> BCkasan_report: kasan detected a read access error, address at
> 0x708fe90,size is 8, return address: 0x701aeac
> >>>
> >>> _assert: Assertion failed panic: at file: kasan/kasan.c:117 task:
> Idle_Task process: Kernel 0x70023c0
> >>>
> >>>
> >>> The call stack looks like:
> >>>
> >>>
> >>> #0 _assert (filename=0x7060f78 "kasan/kasan.c", linenum=117,
> msg=0x7060ff0 "panic", regs=0x7082720  misc/assert.c:536#1 0x07010248 in __assert
> (filename=0x7060f78 "kasan/kasan.c", linenum=117, msg=0x7060ff0 "panic") at
> assert/lib_assert.c:36
> >>> #2 0x070141d6 in kasan_report (addr=0x708fe90, size=8,
> is_write=false, return_address=0x701aeac  kasan/kasan.c:117
> >>> #3 0x07014412 in kasan_check_report (addr=0x708fe90,
> size=8, is_write=false, return_address=0x701aeac  kasan/kasan.c:190
> >>> #4 0x0701468c in __asan_load8_noabort (addr=0x708fe90)
> at kasan/kasan.c:315
> >>> #5 0x0701aeac in riscv_swint (irq=0, context=0x708fe40,
> arg=0x0) at common/riscv_swint.c:133
> >>> #6 0x0701b8fe in riscv_perform_syscall (regs=0x708fe40)
> at common/supervisor/riscv_perform_syscall.c:45
> >>> #7 0x07000570 in sys_call6 ()
> >>>
> >>>
> >>>
> >>> With MM_KASAN_DISABLE_READ_CHECKS=y, it reports:
> >>>
> >>>
> >>> _assert: Assertion failed : at file: mm_heap/mm_malloc.c:245 task:
> rptun process: Kernel 0x704a030
> >>>
> >>>
> >>> The call stack is:
> >>>
> >>>
> >>> #0 _assert (filename=0x7056060 "mm_heap/mm_malloc.c",
> linenum=245, msg=0x0, regs=0x7082720  misc/assert.c:536#1 0x0700df18 in __assert
> (filename=0x7056060 "mm_heap/mm_malloc.c", linenum=245, msg=0x0) at
> assert/lib_assert.c:36
> >>> #2 0x07013082 in mm_malloc (heap=0x7089c00, size=128) at
> mm_heap/mm_malloc.c:245
> >>> #3 0x07011694 in kmm_malloc (size=128) at
> kmm_heap/kmm_malloc.c:51
> >>> #4 0x0704efd4 in metal_allocate_memory (size=128) at
> .../nuttx/include/metal/system/nuttx/alloc.h:27
> >>> #5 0x0704fd8a in rproc_virtio_create_vdev (role=1,
> notifyid=0,
> >>>   rsc=0x80200050, rsc_io=0x7080408  priv=0x708ecd8,
> >>>   notify=0x704e6d2  rst_cb=0x0)
> >>>   at open-amp/lib/remoteproc/remoteproc_virtio.c:356
> >>> #6 0x0704e956 in remoteproc_create_virtio
> (rproc=0x708ecd8,
> >>>   vdev_id=0, role=1, rst_cb=0x0) at
> open-amp/lib/remoteproc/remoteproc.c:957
> >>> #7 

Re: STM32H7 board with ethernet

2024-02-13 Thread Simon Filgis
Works like a charm. Thank you!

Simon Filgis  schrieb am Fr., 9. Feb. 2024,
19:58:

> I ordered a new board, to have more time testing at home and to rules out
> hw error...
>
> Thank you for the effort!!
>
> Roberto Bucher  schrieb am Fr., 9. Feb.
> 2024, 19:50:
>
>> Tested on NUCLEO-H743ZI2 board with
>>
>> ./tools/configure.sh nucleo-h743zi2:pysim
>>
>> My PC has WIFI and the nucleo board connected to the WIFI box
>>
>> bucher@debian:~/sviluppo/NUTTX/nuttx$ tio /dev/ttyACM0
>> [18:58:30.631] tio v2.7
>> [18:58:30.631] Press ctrl-t q to quit
>> [18:58:30.631] Connected
>> telnetd [5:100]
>>
>> NuttShell (NSH) NuttX-12.4.0
>> nsh> ifconfig
>> eth0Link encap:Ethernet HWaddr 52:d3:8e:aa:5d:41 at UP mtu 1486
>>  inet addr:192.168.1.251 DRaddr:192.168.1.1 Mask:255.255.255.0
>>
>> loLink encap:Local Loopback at RUNNING mtu 1518
>>  inet addr:127.0.0.1 DRaddr:127.0.0.1 Mask:255.0.0.0
>>
>>   IPv4   TCP   UDP  ICMP
>> Received 0002    0002  
>> Dropped        
>>IPv4VHL:    Frg: 
>>Checksum         
>>TCP ACK:    SYN: 
>>RST:   
>>Type         
>> Sent 0002    0002  
>>Rexmit       
>> nsh> ping 192.168.1.155
>> PING 192.168.1.155 56 bytes of data
>> 56 bytes from 192.168.1.155: icmp_seq=0 time=89.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=1 time=116.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=2 time=47.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=3 time=82.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=4 time=112.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=5 time=40.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=6 time=77.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=7 time=110.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=8 time=42.0 ms
>> 56 bytes from 192.168.1.155: icmp_seq=9 time=74.0 ms
>> 10 packets transmitted, 10 received, 0% packet loss, time 10010 ms
>> rtt min/avg/max/mdev = 40.000/78.900/116.000/27.332 ms
>> nsh>
>>
>> Best regards
>>
>> Roberto
>>
>> On 2/9/24 18:23, Simon Filgis wrote:
>> > Dear all,
>> >
>> > I'm back at the board (NUCLEO-H743ZI2). Using latest master (with
>> >
>> https://github.com/apache/nuttx/commit/31817335e453eec65e8f5d1163c32efd5da373cb
>> )
>> > and pysim config is stable.
>> >
>> > But I am not able to ping. I tried the following setups:
>> > PC <-> Nucleo-Board
>> > PC <-> Switch <-> Nucleo-Board
>> >
>> > *Here the output from the board:*
>> > nsh> ping 192.168.178.1
>> > PING 192.168.178.1 56 bytes of data
>> > No response from 192.168.178.1: icmp_seq=0 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=1 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=2 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=3 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=4 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=5 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=6 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=7 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=8 time=1000 ms
>> > No response from 192.168.178.1: icmp_seq=9 time=1000 ms
>> > 10 packets transmitted, 0 received, 100% packet loss, time 10010 ms
>> > nsh> ifconfig
>> > eth0Link encap:Ethernet HWaddr 02:55:10:e5:49:a2 at UP mtu 1486
>> >  inet addr:192.168.178.5 DRaddr:192.168.178.1 Mask:255.255.255.0
>> >
>> > lo  Link encap:Local Loopback at RUNNING mtu 1518
>> >  inet addr:127.0.0.1 DRaddr:127.0.0.1 Mask:255.0.0.0
>> >
>> >   IPv4   TCP   UDP  ICMP
>> > Received *0020*    001e     *--> there seems to be some
>> traffic*
>> > Dropped  0002      
>> >IPv4VHL:    Frg: 
>> >Checksum         
>> >TCP ACK:    SYN: 
>> >RST:   
>> >Type         
>> > Sent 000a      000a
>> >Rexmit       
>> > nsh>
>> >
>> > *And the output of the PC:*
>> > ping 192.168.178.5
>> > PING 192.168.178.5 (192.168.178.5) 56(84) byt

Re: STM32H7 board with ethernet

2024-02-09 Thread Simon Filgis
I ordered a new board, to have more time testing at home and to rules out
hw error...

Thank you for the effort!!

Roberto Bucher  schrieb am Fr., 9. Feb.
2024, 19:50:

> Tested on NUCLEO-H743ZI2 board with
>
> ./tools/configure.sh nucleo-h743zi2:pysim
>
> My PC has WIFI and the nucleo board connected to the WIFI box
>
> bucher@debian:~/sviluppo/NUTTX/nuttx$ tio /dev/ttyACM0
> [18:58:30.631] tio v2.7
> [18:58:30.631] Press ctrl-t q to quit
> [18:58:30.631] Connected
> telnetd [5:100]
>
> NuttShell (NSH) NuttX-12.4.0
> nsh> ifconfig
> eth0Link encap:Ethernet HWaddr 52:d3:8e:aa:5d:41 at UP mtu 1486
>  inet addr:192.168.1.251 DRaddr:192.168.1.1 Mask:255.255.255.0
>
> loLink encap:Local Loopback at RUNNING mtu 1518
>  inet addr:127.0.0.1 DRaddr:127.0.0.1 Mask:255.0.0.0
>
>   IPv4   TCP   UDP  ICMP
> Received 0002    0002  
> Dropped        
>IPv4VHL:    Frg: 
>Checksum         
>TCP ACK:    SYN: 
>RST:   
>Type         
> Sent 0002    0002  
>Rexmit       
> nsh> ping 192.168.1.155
> PING 192.168.1.155 56 bytes of data
> 56 bytes from 192.168.1.155: icmp_seq=0 time=89.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=1 time=116.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=2 time=47.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=3 time=82.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=4 time=112.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=5 time=40.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=6 time=77.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=7 time=110.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=8 time=42.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=9 time=74.0 ms
> 10 packets transmitted, 10 received, 0% packet loss, time 10010 ms
> rtt min/avg/max/mdev = 40.000/78.900/116.000/27.332 ms
> nsh>
>
> Best regards
>
> Roberto
>
> On 2/9/24 18:23, Simon Filgis wrote:
> > Dear all,
> >
> > I'm back at the board (NUCLEO-H743ZI2). Using latest master (with
> >
> https://github.com/apache/nuttx/commit/31817335e453eec65e8f5d1163c32efd5da373cb
> )
> > and pysim config is stable.
> >
> > But I am not able to ping. I tried the following setups:
> > PC <-> Nucleo-Board
> > PC <-> Switch <-> Nucleo-Board
> >
> > *Here the output from the board:*
> > nsh> ping 192.168.178.1
> > PING 192.168.178.1 56 bytes of data
> > No response from 192.168.178.1: icmp_seq=0 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=1 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=2 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=3 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=4 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=5 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=6 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=7 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=8 time=1000 ms
> > No response from 192.168.178.1: icmp_seq=9 time=1000 ms
> > 10 packets transmitted, 0 received, 100% packet loss, time 10010 ms
> > nsh> ifconfig
> > eth0Link encap:Ethernet HWaddr 02:55:10:e5:49:a2 at UP mtu 1486
> >  inet addr:192.168.178.5 DRaddr:192.168.178.1 Mask:255.255.255.0
> >
> > lo  Link encap:Local Loopback at RUNNING mtu 1518
> >  inet addr:127.0.0.1 DRaddr:127.0.0.1 Mask:255.0.0.0
> >
> >   IPv4   TCP   UDP  ICMP
> > Received *0020*    001e     *--> there seems to be some
> traffic*
> > Dropped  0002      
> >IPv4VHL:    Frg: 
> >Checksum         
> >TCP ACK:    SYN: 
> >RST:   
> >Type         
> > Sent 000a      000a
> >Rexmit       
> > nsh>
> >
> > *And the output of the PC:*
> > ping 192.168.178.5
> > PING 192.168.178.5 (192.168.178.5) 56(84) bytes of data.
> >  From 192.168.178.1 icmp_seq=1 Destination Host Unreachable
> >  From 192.168.178.1 icmp_seq=2 Destination Host Unreachable
> >
> >   What could it be that I'm doing wrong? Is using DHCP mandatory with
> this
> > config? I set a initial IP adress via menuconfig and I also tried with
> > ifconfig eth0 192
> >
> > Thanks for your help,
> >
> > Simon
> >
> > --
> > Hard- and Softwaredevelopment Consultant
> > Ingenieurbüro-Filgis
> &

Re: STM32H7 board with ethernet

2024-02-09 Thread Simon Filgis
Dear all,

I'm back at the board (NUCLEO-H743ZI2). Using latest master (with
https://github.com/apache/nuttx/commit/31817335e453eec65e8f5d1163c32efd5da373cb)
and pysim config is stable.

But I am not able to ping. I tried the following setups:
PC <-> Nucleo-Board
PC <-> Switch <-> Nucleo-Board

*Here the output from the board:*
nsh> ping 192.168.178.1
PING 192.168.178.1 56 bytes of data
No response from 192.168.178.1: icmp_seq=0 time=1000 ms
No response from 192.168.178.1: icmp_seq=1 time=1000 ms
No response from 192.168.178.1: icmp_seq=2 time=1000 ms
No response from 192.168.178.1: icmp_seq=3 time=1000 ms
No response from 192.168.178.1: icmp_seq=4 time=1000 ms
No response from 192.168.178.1: icmp_seq=5 time=1000 ms
No response from 192.168.178.1: icmp_seq=6 time=1000 ms
No response from 192.168.178.1: icmp_seq=7 time=1000 ms
No response from 192.168.178.1: icmp_seq=8 time=1000 ms
No response from 192.168.178.1: icmp_seq=9 time=1000 ms
10 packets transmitted, 0 received, 100% packet loss, time 10010 ms
nsh> ifconfig
eth0Link encap:Ethernet HWaddr 02:55:10:e5:49:a2 at UP mtu 1486
inet addr:192.168.178.5 DRaddr:192.168.178.1 Mask:255.255.255.0

lo  Link encap:Local Loopback at RUNNING mtu 1518
inet addr:127.0.0.1 DRaddr:127.0.0.1 Mask:255.0.0.0

 IPv4   TCP   UDP  ICMP
Received *0020*    001e     *--> there seems to be some traffic*
Dropped  0002      
  IPv4VHL:    Frg: 
  Checksum         
  TCP ACK:    SYN: 
  RST:   
  Type         
Sent 000a      000a
  Rexmit       
nsh>

*And the output of the PC:*
ping 192.168.178.5
PING 192.168.178.5 (192.168.178.5) 56(84) bytes of data.
>From 192.168.178.1 icmp_seq=1 Destination Host Unreachable
>From 192.168.178.1 icmp_seq=2 Destination Host Unreachable

 What could it be that I'm doing wrong? Is using DHCP mandatory with this
config? I set a initial IP adress via menuconfig and I also tried with
ifconfig eth0 192

Thanks for your help,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Wed, Feb 7, 2024 at 10:58 AM Roberto Bucher <
roberto.bucher.2...@gmail.com> wrote:

> I did some tests and sometimes it works and sometimes (the most
> times...) it gives the error...
>
> The error usually appears when I give the command
>
> nsh> ifconfig
>
> or
>
> nsh> renew eth0
>
> but not all the times. I think that it can be a problem with memory
> sizes; I'll try more investigations
>
> BR
>
> Roberto
>
> NuttShell (NSH) NuttX-12.4.0-RC0
> nsh> ping 192.168.1.155
> PING 192.168.1.155 56 bytes of data
> 56 bytes from 192.168.1.155: icmp_seq=0 time=38.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=1 time=62.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=2 time=104.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=3 time=124.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=4 time=62.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=5 time=84.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=6 time=12.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=7 time=46.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=8 time=75.0 ms
> 56 bytes from 192.168.1.155: icmp_seq=9 time=106.0 ms
> 10 packets transmitted, 10 received, 0% packet loss, time 10010 ms
> rtt min/avg/max/mdev = 12.000/71.300/124.000/32.655 ms
> nsh> ifconfig
> eth0Link encap:Ethernet HWaddr 52:d3:8e:aa:5d:41 at UP mtu 1486
>  inet addr:192.168.1.251 DRaddr:192.168.1.1 Mask:255.255.255.0
>
> loLink encap:Local Loopback at RUNNING mtu 1518
>  inet addr:127.0.0.1 DRaddr:127.0.0.1 Mask:255.0.0.0
>
>   IPv4   TCP   UDP  ICMP
> Received 000c    0002  000a
> Dropped        
>IPv4VHL:    Frg: 
>Checksum         
>TCP ACK:    SYN: 
>RST:   
>Type         
> Sent 000c    0002  000a
>Rexmit       
>
>
>
> On 2/6/24 16:55, Gregory Nutt wrote:
> > The network monitor is part of apps/netutils/netinit so it is not a
> > part of NSH.  NSH can automatically perform the network initialization
> > if so configured and which, optionally, starts the network monitor
> > thread.  But the logic is not architecturally a part of NSH nor does
> > it depend on N SH.
> >
> > On 2/6/2024 9:32 AM, Nathan Hartman wrote:
> >> On Tue, Feb 6, 2024 at 8:45 AM Sebastien Lorquet 
> >> wrote:
> >>
> >>> However, the default network configuration provided in NuttX
> >>> examples is
> >>> cumbersome and too much linked with NSH
> >>>
> >>> It can work for simple tests and demos, but you will have to write a
> >>> proper network management daemon if you plan to use more than one
> >>> network app.
> >>
> >>
> >> It would be a nice thing if the network management daemon could be
> >> factored
> >> out of NSH so that boards that don't run NSH could have the 

Re: STM32H7 board with ethernet

2024-02-06 Thread Simon Filgis
Dear all,

I found a STM32H743ZI2 and build the jumbo config.

I have nsh access. Now I would like to setup ethernet, but it seems not
working out of the box.

nsh> ifconfig eth0 192.168.1.5
nsh> ping any target does not work

Also from my host, I cannot ping. Telnet-connection is unavailable...

Do I need to enable something?

Regards,

Simon


--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Tue, Feb 6, 2024 at 12:30 PM Roberto Bucher <
roberto.bucher.2...@gmail.com> wrote:

> The STM32H743ZI2 is quite complete. We used it with pysimCoder (ADC,
> encoders, PWM, digital I/O, network, but not CAN bus yet)
>
> Roberto
>
> On 2/6/24 11:57, Alan C. Assis wrote:
> > stm32h745i-disco is a great option! Ethernet and LCD
> >
> > On Tuesday, February 6, 2024, Simon Filgis <
> si...@ingenieurbuero-filgis.de>
> > wrote:
> >
> >> Dear all,
> >>
> >> Can anybody recommend a stm32h7 board with ethernet that is well
> supported
> >> by nuttx?
> >>
> >> Thanks in advance,
> >>
> >> Simon
> >>
>
>


Re: STM32H7 board with ethernet

2024-02-06 Thread Simon Filgis
Hi Sebastien,

I have NUCLEO-H755ZI-Q on my table, but could not find a board package in
the tree. Is it supported?

Regards,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Tue, Feb 6, 2024 at 10:34 AM Sebastien Lorquet 
wrote:

> Hi,
>
> The nucleo-h7 board series definitely work, there are several models
> with ethernet.
>
> Sebastien
>
>
> Le 06/02/2024 à 10:26, Simon Filgis a écrit :
> > Dear all,
> >
> > Can anybody recommend a stm32h7 board with ethernet that is well
> supported
> > by nuttx?
> >
> > Thanks in advance,
> >
> > Simon
> >
>


STM32H7 board with ethernet

2024-02-06 Thread Simon Filgis
Dear all,

Can anybody recommend a stm32h7 board with ethernet that is well supported
by nuttx?

Thanks in advance,

Simon


Re: Networking Delay: SO_SNDTIMEO odd behavior

2023-11-28 Thread Simon Filgis
Hi Hakeem,

do you build for armv7/v8?

Do you have:
https://github.com/apache/nuttx/pull/10536

It solves 1s random timeout for me. Without my app works due to
retransmission request, but with some 1s delays.

Simon

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Nathan Hartman  schrieb am Di., 28. Nov. 2023,
15:41:

> On Tue, Nov 28, 2023 at 3:58 AM Alan C. Assis  wrote:
>
> > Hi Hakeem,
> >
> > Thank you very much for reporting an issue your team found.
> >
> > Could you please open an issue with more information at
> > https://github.com/apache/nuttx/issues and supply a little bit more
> > information (board/mcu used, version of NuttX, host OS, etc).
> >
> > Please also supply your board config (run "make savedefconfig" and
> > attach the defconfig generated).
>
>
>
> Also please specify which version of NuttX you are using -- is it a
> released tarball and if so which version, or is it a clone from git and if
> so is it the latest available master?
>
> Thanks
> Nathan
>


Re: ESP32 I2S audio recording is incomplete

2023-10-19 Thread Simon Filgis
Hi Simona,

SD Cards have busy time times of 500ms max (per spec) for saving data
internally. I saw SD Cards taking over a second of busy time.

You can check with the Oszilloskop. I think data0 is the pin that signalize
busy...

Per design, you need a stream buffer that can handle your audio stream up
to 500ms...

Regards,

Simon

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Alan C. Assis  schrieb am Do., 19. Okt. 2023, 23:36:

> Hi Simona,
>
> On 10/19/23, Simona Toaca  wrote:
> > Hello,
> > I am trying to record audio using a MEMS microphone, but the final
> > recording is missing parts periodically (for example, with a sample rate
> of
> > 8kHz, there are parts ~1s long missing once every ~10-11s. Using a sample
> > rate of 48kHz, the period is ~1s long). This is my first time working
> with
> > I2S and I can't figure out what causes this behaviour.
> >
> > My setup is as follows:
> > - the microphone has 24-bit depth in a 32-bit word (MSB first) when
> > transmitting data
> > - i am using nxrecorder to record the pcm audio onto an SD card (device
> > pcm_in0)
> > - to listen to the recording i import the file into Audacity (24-bit, Big
> > Endian)
> >
> > Defconfig regarding audio:
> > CONFIG_AUDIO=y
> > CONFIG_AUDIO_BUFFER_NUMBYTES=6144 (from the i2s buffer which is 8192
> bytes,
> > 3/4 of it is "useful" info, 6144 bytes in total)
> > CONFIG_AUDIO_DMA=y
> > CONFIG_AUDIO_FORMAT_RAW=y
> > CONFIG_AUDIO_I2S=y
> > CONFIG_DMA=y
> > CONFIG_DMA_LINK=y
> > CONFIG_DRIVERS_AUDIO=y
> > CONFIG_ESP32_I2S0=y
> > CONFIG_ESP32_I2S0_BCLKPIN=25
> > CONFIG_ESP32_I2S0_DATA_BIT_WIDTH_24BIT=y
> > CONFIG_ESP32_I2S0_DINPIN=26
> > CONFIG_ESP32_I2S0_SAMPLE_RATE=8000
> > CONFIG_ESP32_I2S0_WSPIN=27
> > CONFIG_ESP32_I2S=y
> > CONFIG_I2S_DMADESC_NUM=4
> >
> > I tried modifying the number of audio buffers and also making them
> bigger,
> > but that did not solve the problem.
> > Any ideas on what could cause this?
> >
>
> Could it be something related to SDCard storage? Maybe it needs some
> optimization!
>
> Please try using a RAMDISK of 1MB+ and save the file to it.
>
> If it works we will know the SDCard could be the limitation of this
> configuration.
>
> BR,
>
> Alan
>


Re: different IP than expected

2023-09-21 Thread Simon Filgis
When I started with networking, I set the IP via kconfig. I remember that
it was necessary to enter the same IP at two different places. Netlib and
FTP server in my case. Maybe your IP is overwritten by another app? A
buildin app that you use for experiments?

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Gregory Nutt  schrieb am Do., 21. Sept. 2023, 14:21:

>
> On 9/21/2023 5:06 AM, Gustavo Soares wrote:
> > Why is it a different IP? The server is listening to one but this
> > method returns another one.
>
> You provide almost no information for anyone to really help you.
>
> Where is the server and client?  It sounds like you are saying that the
> HTTP server is on some remote platform.  Is that right? The client logic
> is on the NuttX target, correct?
>
> You seem to be saying that you connect to the remote server, then do an
> HTTP GET.  The remote IP address in the returned message is not the same
> as the IP address that you connected to.  That is what I am hearing.
>
> What does this have to do with NuttX?  I suggest that you run some
> sniffer like WireShark so you can see what the real point-to-point
> traffic.  The content returned to NuttX has nothing to do with NuttX.
>
> Or have I got that wrong.  You need to communicate more.
>
>


fat32 sd-card filesystem broken

2023-09-20 Thread Simon Filgis
Dear all,

Once in a while nuttx breaks the fat32 filesystem of my sd-card.

Custom fork, around 1 year old. samv7, DMA enabled.

I have syslog to sd-card enabled. Also a FTP server accepts files to
sd-card.

Has anybody observed something similar? How to start debugging such an
issue?

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


Re: OpenFPGALoader

2023-07-13 Thread Simon Filgis
Hi Alan, yes, that's ispVM.

The original from Lattice can be found in the installation folder of
Lattice Diamond SW.
usr/local/programmer/diamond/3.12/embedded_source/vmembedded/sourcecode/ispvme/

That is one way for Lattice!

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Thu, Jul 13, 2023 at 7:24 PM Alan C. Assis  wrote:

> Hi Simon,
>
> ispVM is pure C:
> https://github.com/ganehag/br-ts7500/blob/master/ts7500utils/ispvm.c
>
> Could be easier to get working on NuttX than openFPGALoader, although
> to latter will open doors to many vendors!
>
> BR,
>
> Alan
>
> On 7/13/23, Simon Filgis  wrote:
> > LFE5U-25F-8BG381C
> >
> > with attached SPI Flash: AT25SF161B-MHB
> >
> > Lattice Diamond Deployment tool generates SVF or VME files...
> >
> > I'm just wondering if I should go for something more generic than the
> > Lattice ispVM (quite old piece of code)
> >
> > Simon
> >
> > --
> > Hard- and Softwaredevelopment Consultant
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> >
> >
> > On Thu, Jul 13, 2023 at 7:04 PM Frank-Christian Kruegel  >
> > wrote:
> >
> >> Am 13.07.2023 um 18:52 schrieb Simon Filgis:
> >>
> >> >> Indeed the ICE fpgas are loaded by SPI. Interesting.
> >> >>
> >> >> But mine is loaded by JTAG.
> >>
> >> What FPGA type do you use EXACTLY?
> >>
> >> Frank-Christian
> >>
> >>
> >
>


Re: OpenFPGALoader

2023-07-13 Thread Simon Filgis
LFE5U-25F-8BG381C

with attached SPI Flash: AT25SF161B-MHB

Lattice Diamond Deployment tool generates SVF or VME files...

I'm just wondering if I should go for something more generic than the
Lattice ispVM (quite old piece of code)

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Thu, Jul 13, 2023 at 7:04 PM Frank-Christian Kruegel 
wrote:

> Am 13.07.2023 um 18:52 schrieb Simon Filgis:
>
> >> Indeed the ICE fpgas are loaded by SPI. Interesting.
> >>
> >> But mine is loaded by JTAG.
>
> What FPGA type do you use EXACTLY?
>
> Frank-Christian
>
>


Re: OpenFPGALoader

2023-07-13 Thread Simon Filgis
Resending without attachment...

Simon Filgis  schrieb am Do., 13. Juli
2023, 18:38:

> Hi Alan,
>
> Indeed the ICE fpgas are loaded by SPI. Interesting.
>
> But mine is loaded by JTAG.
>
> Every FPGA vendor has a "player" to bitbang their svf out of the
> microcontroller.
>
> OpenFPGALoader is the most sophisticated approach I found sofar. I doubt
> it is easy to port it. Is anybody willing to help me with trying?
>
> Regards,
>
> Simon
>
> --
> Ingenieurbüro-Filgis
> USt-IdNr.: DE305343278
> --
> sent by mobile phone
>
> Alan C. Assis  schrieb am Do., 13. Juli 2023, 18:13:
>
>> Hi Simon,
>>
>> I didn't look the code, but openFPGALoader is implemented in C++ and I
>> don't know if they are using features that don't fit well to
>> microcontrollers.
>>
>> So, the only way to confirming if it works is trying to compile and run
>> it.
>>
>> If you only need to use FPGAs from Lattice, maybe you can try to SPI
>> iceboot approach:
>>
>> https://github.com/al177/blinkencard/blob/master/micropython/iceboot.py
>>
>> (disclaimer: I don't know much about FPGAs yet)
>>
>> BR,
>>
>> Alan
>>
>> On 7/13/23, Simon Filgis  wrote:
>> > Sorry, I have a typo in the subject.
>> >
>> > Not FLASHLoader but FPGALoader.
>> >
>> > https://github.com/trabucayre/openFPGALoader
>> >
>> > The Segger Flashloader has been used by me already. Funny piece of
>> software
>> > but not for FPGA...
>> >
>> > --
>> > Ingenieurbüro-Filgis
>> > USt-IdNr.: DE305343278
>> > --
>> > sent by mobile phone
>> >
>> > Xiang Xiao  schrieb am Do., 13. Juli 2023,
>> > 17:23:
>> >
>> >> If you are using JLINK, you may implement a general flash programer by
>> >> reusing NuttX flash driver:
>> >> https://wiki.segger.com/SEGGER_Flash_Loader
>> >>
>> >> On Thu, Jul 13, 2023 at 10:51 PM Simon Filgis <
>> >> si...@ingenieurbuero-filgis.de> wrote:
>> >>
>> >> > Dear all,
>> >> >
>> >> > I need to load an FPGA bitstream via JTAG bitbang.
>> >> >
>> >> > In my case the straight way would be to use the lattice embeddedvm
>> >> (ispVM)
>> >> > but I'm wondering if there is something more generic out there. Like
>> >> > OpenFPGALoader.
>> >> >
>> >> > What do you think?
>> >> >
>> >> > Regards,
>> >> >
>> >> > Simon
>> >> >
>> >> > --
>> >> > Ingenieurbüro-Filgis
>> >> > USt-IdNr.: DE305343278
>> >> > --
>> >> > sent by mobile phone
>> >> >
>> >>
>> >
>>
>


Re: OpenFPGALoader

2023-07-13 Thread Simon Filgis
Sorry, I have a typo in the subject.

Not FLASHLoader but FPGALoader.

https://github.com/trabucayre/openFPGALoader

The Segger Flashloader has been used by me already. Funny piece of software
but not for FPGA...

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Xiang Xiao  schrieb am Do., 13. Juli 2023, 17:23:

> If you are using JLINK, you may implement a general flash programer by
> reusing NuttX flash driver:
> https://wiki.segger.com/SEGGER_Flash_Loader
>
> On Thu, Jul 13, 2023 at 10:51 PM Simon Filgis <
> si...@ingenieurbuero-filgis.de> wrote:
>
> > Dear all,
> >
> > I need to load an FPGA bitstream via JTAG bitbang.
> >
> > In my case the straight way would be to use the lattice embeddedvm
> (ispVM)
> > but I'm wondering if there is something more generic out there. Like
> > OpenFPGALoader.
> >
> > What do you think?
> >
> > Regards,
> >
> > Simon
> >
> > --
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> > --
> > sent by mobile phone
> >
>


OpenFLASHLoader

2023-07-13 Thread Simon Filgis
Dear all,

I need to load an FPGA bitstream via JTAG bitbang.

In my case the straight way would be to use the lattice embeddedvm (ispVM)
but I'm wondering if there is something more generic out there. Like
OpenFPGALoader.

What do you think?

Regards,

Simon

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone


Re: Odd DMA issue

2023-05-17 Thread Simon Filgis
Hi Tim,

Cache flush after dma data copy was a hard nut we had. But it was on read,
you face issues on write, I was to fast.

Maybe this samv7 PR helps also on your arch:

https://github.com/apache/nuttx/pull/5513

Simon

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Tim Hardisty  schrieb am Mi., 17. Mai 2023, 20:31:

> Good suggestion – thanks!
>
> From: Petro Karashchenko 
> Reply to: "dev@nuttx.apache.org" 
> Date: Wednesday, 17 May 2023 at 19:28
> To: "dev@nuttx.apache.org" 
> Subject: Re: Odd DMA issue
>
> I think you can try to compare versus SAMv7 SPI+DMA driver that is working
> well and see if there are obvious differences.
>
> BR,
> Petro
>
> On Wed, May 17, 2023, 9:18 PM Simon Filgis  <mailto:si...@ingenieurbuero-filgis.de>>
> wrote:
>
> D-Cache flush?
>
> --
> Ingenieurbüro-Filgis
> USt-IdNr.: DE305343278
> --
> sent by mobile phone
>
> Tim Hardisty mailto:t...@hardisty.co.uk>> schrieb am
> Mi., 17. Mai 2023, 20:05:
>
> > I am working on getting DMA working on the SPI peripheral of the SAMA5D2.
> >
> > DMA reads now work well, but the writes take absolutely forever…unless I
> > have dma debug info enabled, when write transactions (to a GD25Q flash)
> do
> > then work.
> >
> > I’m working through it, as it sounds like a race condition or other
> > timing/sequence problem but if anyone by any chance has encountered
> > anything similar, clues or suggestions would be most welcome!
> >
> > Thx,
> >
> > Tim
> >
>
>
>


Re: Odd DMA issue

2023-05-17 Thread Simon Filgis
D-Cache flush?

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Tim Hardisty  schrieb am Mi., 17. Mai 2023, 20:05:

> I am working on getting DMA working on the SPI peripheral of the SAMA5D2.
>
> DMA reads now work well, but the writes take absolutely forever…unless I
> have dma debug info enabled, when write transactions (to a GD25Q flash) do
> then work.
>
> I’m working through it, as it sounds like a race condition or other
> timing/sequence problem but if anyone by any chance has encountered
> anything similar, clues or suggestions would be most welcome!
>
> Thx,
>
> Tim
>


Re: MCU/Board with WiFi, BT and USB Host

2023-04-20 Thread Simon Filgis
Yes, answer is not no. I heard about 10k for "registering" a product with
certified module. So no measurements, only paperwork.

I would be glad to hear that's wrong! It feels wrong definitely...

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Tomek CEDRO  schrieb am Do., 20. Apr. 2023, 21:51:

> On Thu, Apr 20, 2023 at 9:42 PM Tim Hardisty wrote:
> > To the best of my understanding, using a module does NOT mean you can
> avoid certification for a custom board that uses it. I am a member of the
> SIG and specifically asked this…but they do not give a 100% clear answer ☹️
>
> whaaat o_O
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>


Re: Manjaro Distro

2023-03-09 Thread Simon Filgis
Hi all,

thanks for answering.

I'm still in build-phase. No runtime hard-fault. I'm using my fork on
github https://github.com/SimonFilgis/incubator-nuttx

Mr. Xiao nailed it. It choose to use the NuttX internal libm for the moment.

But still something seems to miss, please have a look at the attached log.

LD: nuttx
> arm-none-eabi-ld --entry=__start -nostdlib --gc-sections --cref
> -Map=/home/simon/projects/autococo2/temp/autococo2fw/nuttx/nuttx.map -g
> -T/home/simon/projects/autococo2/temp/autococo2fw/nuttx/../autococo2-board/scripts/flash.ld
>  -L /home/simon/projects/autococo2/temp/autococo2fw/nuttx/staging -L
> /home/simon/projects/autococo2/temp/autococo2fw/nuttx/arch/arm/src/board  \
> -o /home/simon/projects/autococo2/temp/autococo2fw/nuttx/nuttx   \
> --start-group -lsched -ldrivers -lboards -lc -lmm -larch -lapps
> -lnet -lfs -lbinfmt -lboard
> /usr/lib/gcc/arm-none-eabi/12.2.0/thumb/v7e-m+dp/hard/libgcc.a --end-group
> arm-none-eabi-ld: warning:
> /home/simon/projects/autococo2/temp/autococo2fw/nuttx/nuttx has a LOAD
> segment with RWX permissions
> arm-none-eabi-ld:
> /home/simon/projects/autococo2/temp/autococo2fw/nuttx/staging/libapps.a(nsh_romfsetc.c.home.simon.projects.autococo2.temp.autococo2fw.apps.nshlib.o):
> in function `nsh_romfsetc':
> /home/simon/projects/autococo2/temp/autococo2fw/apps/nshlib/nsh_romfsetc.c:97:
> undefined reference to `romfs_img_len'
> arm-none-eabi-ld:
> /home/simon/projects/autococo2/temp/autococo2fw/apps/nshlib/nsh_romfsetc.c:97:
> undefined reference to `romfs_img'
> make[1]: *** [Makefile:159: nuttx] Error 1
> make[1]: Leaving directory
> '/home/simon/projects/autococo2/temp/autococo2fw/nuttx/arch/arm/src'
> make: *** [tools/Unix.mk:509: nuttx] Error 2
>

Again romfs_img, I had this with the bitbucket pipeline a few days ago, xxd
was missing. I cannot identify root cause with make V=1 (attached).

Has anybody an idea?

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Wed, Mar 8, 2023 at 7:43 PM Gregory Nutt  wrote:

>
> > Hi,
> >
> > I think that some key information is missing like what is the NuttX
> version
> > used. Is it mainline or some release or custom.
> >
> > Best regards,
> > Petro
>
> It would be helpful to understand where and why the crash occurs too.
> You can get that information by analyzing the stack.  See
>
> https://cwiki.apache.org/confluence/display/NUTTX/Analyzing+Cortex-M+Hardfaults
> for an example.
>
> Without know why the hard fault occurs that is nothing anyone can really
> do or say to be helpful (unless the problem can be replicated).
>
>


Manjaro Distro

2023-03-08 Thread Simon Filgis
Dear all,

I switched to Manjaro a few weeks ago. Now I'm trying to build NuttX - of
course.

This packages where necessary so far:

sudo pacman -S ncurses base-devel gmp mpfr libisl elfutils expat
lib32-gcc-libs uboot-tools unzip


# Install genromfs as per PX4

wget
https://sourceforge.net/projects/romfs/files/genromfs/0.5.2/genromfs-0.5.2.tar.gz
tar zxvf genromfs-0.5.2.tar.gz
cd genromfs-0.5.2 && make && make install && cd ..
rm genromfs-0.5.2.tar.gz genromfs-0.5.2 -r


--

I cannot resolve the following error:
fatal error: math.h: No such file or directory

NuttX documentation says:

The math library header file, `math.h`, is a then special case.  If you do
nothing, the standard math.h header file that is provided with your
toolchain will be used.


Can somebody please give me a hint for how to overcome this?

Best regards,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


Re: W25Nx NAND flash support

2023-02-25 Thread Simon Filgis
Hi Michael,

In addition, if you want to load your elf directly to the memory mapped
flash storage, you need some flashloader for your debug tool. I can help
with segger's flashloader if that is of interest. (dsk)
https://www.segger.com/products/debug-probes/j-link/technology/j-link-dsk/

Simon

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Alan C. Assis  schrieb am Sa., 25. Feb. 2023, 14:29:

> Hi Michal,
>
> There is some discussion about it here:
> https://www.mail-archive.com/dev@nuttx.apache.org/msg04981.html
>
> and here:
> https://lists.apache.org/thread/kh5t6fn24q97d3qxzthksld4l3jtw27c
>
> In a nutshell:
>
> 1) If parallel NAND Flash is used your MCU will need first the NAND
> Flash controller driver. SPI and QSPI NAND are different story;
> 2) NuttX needs the basic NAND Bad-Block search function infrastructure
> (look nand_devscan() is not updating the bad-block table)
> 3) NuttX needs a File System able to handle NAND Flash
>
> Currently there is no FS on NuttX able to handle NAND.
> So you can port the CHFS from NetBSD or take a look at dhara
> (https://github.com/dlbeer/dhara).
>
> Maybe LittleFS or SmartFS could be extended to handle NAND.
>
> BR,
>
> Alan
>
> On 2/25/23, Michal Lenc  wrote:
> > Hello,
> >
> >
> >
> > I am looking into usage of w25nx NAND flash communicating over QSPI. What
> > is
> > the current support of NAND flash memories in NuttX? I found out some
> > warnings in drivers/mtd/README.txt regarding the lack of a file system
> that
> >
> > could handle NAND memories but I am not sure if they are still actual or
> > those problems were solved. There are some header files and source code
> > files for NAND memory support but some of them seem to be incomplete
> (like
> > nand_initialize() function for example
> > https://github.com/apache/nuttx/blob/
> > master/include/nuttx/mtd/nand.h#L105).
> >
> >
> >
> >
> > Would the implementation of w25nx flash require some further involvement
> in
> >
> > file system support or just the implementation of w25nx driver itself
> > (similar to already implemented w25q NOR flash)?
> >
> >
> >
> >
> > Thanks.
> >
> > Best regards,
> > Michal Lenc
> >
>


Re: Bitbucket Pipeline - romfs failure

2023-02-24 Thread Simon Filgis
Hi,

I changed to xxd instead of vim-common. Makes more sense. Thanks Petro.

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Fri, Feb 24, 2023 at 2:16 PM Alan C. Assis  wrote:

> Hi Pedro and Simon,
>
> I submitted a patch to include xxd in our documentation.
>
> BR,
>
> Alan
>
> On 2/24/23, Petro Karashchenko  wrote:
> > Hello Simon,
> >
> > Maybe adding "apt-get install -y xxd" -- I mean adding xxd separately
> > instead of vim-common and let package manager to resolve dependencies is
> a
> > better approach?
> >
> > Best regards,
> > Petro
> >
> > пт, 24 лют. 2023 р. о 10:46 Simon Filgis  >
> > пише:
> >
> >> Hi Alan,
> >>
> >> many thanks:
> >>
> >> xxd -i romfs.img | sed -e "s/^unsigned char/const unsigned char
> >> aligned_data(4)/g" >> etctmp.c
> >> /bin/sh: 1: xxd: not found
> >> rm romfs.img
> >>
> >>
> >> xxd is part of vim-common. Now it works.
> >>
> >> Should we add vim-common to the list of dependencies, or is this a
> corner
> >> case?
> >>
> >> Simon
> >>
> >> --
> >> Hard- and Softwaredevelopment Consultant
> >> Ingenieurbüro-Filgis
> >> USt-IdNr.: DE305343278
> >>
> >>
> >> On Thu, Feb 23, 2023 at 10:22 PM Alan C. Assis 
> wrote:
> >>
> >> > Hi Simon,
> >> >
> >> > Please try to compile with verbose enabled:
> >> >
> >> > make V=1
> >> >
> >> > It could disclose more information about the issue.
> >> >
> >> > BR,
> >> >
> >> > Alan
> >> >
> >> > On 2/23/23, Simon Filgis  wrote:
> >> > > Hi Alan,
> >> > >
> >> > > my custom board. It compiles well on my computer. Romfs fails only
> >> > > the
> >> > > bitbucket pipe docker. How can I check if the generation was
> >> successful?
> >> > In
> >> > > the log, it looks fine, doesn't it?
> >> > >
> >> > > Simon
> >> > >
> >> > >
> >> > > --
> >> > > Hard- and Softwaredevelopment Consultant
> >> > > Ingenieurbüro-Filgis
> >> > > USt-IdNr.: DE305343278
> >> > >
> >> > >
> >> > > On Thu, Feb 23, 2023 at 3:27 PM Alan C. Assis 
> >> wrote:
> >> > >
> >> > >> Hi Simon,
> >> > >>
> >> > >> What board and board profile are you using?
> >> > >>
> >> > >> This error normally happens when genromfs didn't generated the
> romfs
> >> > >> image.
> >> > >>
> >> > >> BR,
> >> > >>
> >> > >> Alan
> >> > >>
> >> > >> On 2/23/23, Simon Filgis  wrote:
> >> > >> > Dear all,
> >> > >> >
> >> > >> > I'm setting up a build-pipeline in bitbucket. It fails with:
> >> > >> > arm-none-eabi-ld:
> >> > >> >
> >> > >>
> >> >
> >>
> /opt/atlassian/pipelines/agent/build/nuttx/staging/libapps.a(nsh_romfsetc.c.opt.atlassian.pipelines.agent.build.apps.nshlib.o):
> >> > >> > in function `nsh_romfsetc':
> >> > >> > 3126
> >> > >> >
> /opt/atlassian/pipelines/agent/build/apps/nshlib/nsh_romfsetc.c:97:
> >> > >> > undefined reference to `romfs_img_len'
> >> > >> > 3127
> >> > >> > arm-none-eabi-ld:
> >> > >> >
> /opt/atlassian/pipelines/agent/build/apps/nshlib/nsh_romfsetc.c:97:
> >> > >> > undefined reference to `romfs_img'
> >> > >> > 3128
> >> > >> > make[1]: *** [Makefile:159: nuttx] Error 1
> >> > >> >
> >> > >> > Has anybody a hint or idea howto overcome this?
> >> > >> >
> >> > >> > Simon
> >> > >> >
> >> > >> > --
> >> > >> > Hard- and Softwaredevelopment Consultant
> >> > >> > Ingenieurbüro-Filgis
> >> > >> > USt-IdNr.: DE305343278
> >> > >> >
> >> > >>
> >> > >
> >> >
> >>
> >
>


Re: Bitbucket Pipeline - romfs failure

2023-02-24 Thread Simon Filgis
Hi Alan,

many thanks:

xxd -i romfs.img | sed -e "s/^unsigned char/const unsigned char
aligned_data(4)/g" >> etctmp.c
/bin/sh: 1: xxd: not found
rm romfs.img


xxd is part of vim-common. Now it works.

Should we add vim-common to the list of dependencies, or is this a corner
case?

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Thu, Feb 23, 2023 at 10:22 PM Alan C. Assis  wrote:

> Hi Simon,
>
> Please try to compile with verbose enabled:
>
> make V=1
>
> It could disclose more information about the issue.
>
> BR,
>
> Alan
>
> On 2/23/23, Simon Filgis  wrote:
> > Hi Alan,
> >
> > my custom board. It compiles well on my computer. Romfs fails only the
> > bitbucket pipe docker. How can I check if the generation was successful?
> In
> > the log, it looks fine, doesn't it?
> >
> > Simon
> >
> >
> > --
> > Hard- and Softwaredevelopment Consultant
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> >
> >
> > On Thu, Feb 23, 2023 at 3:27 PM Alan C. Assis  wrote:
> >
> >> Hi Simon,
> >>
> >> What board and board profile are you using?
> >>
> >> This error normally happens when genromfs didn't generated the romfs
> >> image.
> >>
> >> BR,
> >>
> >> Alan
> >>
> >> On 2/23/23, Simon Filgis  wrote:
> >> > Dear all,
> >> >
> >> > I'm setting up a build-pipeline in bitbucket. It fails with:
> >> > arm-none-eabi-ld:
> >> >
> >>
> /opt/atlassian/pipelines/agent/build/nuttx/staging/libapps.a(nsh_romfsetc.c.opt.atlassian.pipelines.agent.build.apps.nshlib.o):
> >> > in function `nsh_romfsetc':
> >> > 3126
> >> > /opt/atlassian/pipelines/agent/build/apps/nshlib/nsh_romfsetc.c:97:
> >> > undefined reference to `romfs_img_len'
> >> > 3127
> >> > arm-none-eabi-ld:
> >> > /opt/atlassian/pipelines/agent/build/apps/nshlib/nsh_romfsetc.c:97:
> >> > undefined reference to `romfs_img'
> >> > 3128
> >> > make[1]: *** [Makefile:159: nuttx] Error 1
> >> >
> >> > Has anybody a hint or idea howto overcome this?
> >> >
> >> > Simon
> >> >
> >> > --
> >> > Hard- and Softwaredevelopment Consultant
> >> > Ingenieurbüro-Filgis
> >> > USt-IdNr.: DE305343278
> >> >
> >>
> >
>


Re: Bitbucket Pipeline - romfs failure

2023-02-23 Thread Simon Filgis
Hi Alan,

my custom board. It compiles well on my computer. Romfs fails only the
bitbucket pipe docker. How can I check if the generation was successful? In
the log, it looks fine, doesn't it?

Simon


--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Thu, Feb 23, 2023 at 3:27 PM Alan C. Assis  wrote:

> Hi Simon,
>
> What board and board profile are you using?
>
> This error normally happens when genromfs didn't generated the romfs image.
>
> BR,
>
> Alan
>
> On 2/23/23, Simon Filgis  wrote:
> > Dear all,
> >
> > I'm setting up a build-pipeline in bitbucket. It fails with:
> > arm-none-eabi-ld:
> >
> /opt/atlassian/pipelines/agent/build/nuttx/staging/libapps.a(nsh_romfsetc.c.opt.atlassian.pipelines.agent.build.apps.nshlib.o):
> > in function `nsh_romfsetc':
> > 3126
> > /opt/atlassian/pipelines/agent/build/apps/nshlib/nsh_romfsetc.c:97:
> > undefined reference to `romfs_img_len'
> > 3127
> > arm-none-eabi-ld:
> > /opt/atlassian/pipelines/agent/build/apps/nshlib/nsh_romfsetc.c:97:
> > undefined reference to `romfs_img'
> > 3128
> > make[1]: *** [Makefile:159: nuttx] Error 1
> >
> > Has anybody a hint or idea howto overcome this?
> >
> > Simon
> >
> > --
> > Hard- and Softwaredevelopment Consultant
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> >
>


Re: initial gpio state: power on -> boot -> rtos -> app.

2023-02-20 Thread Simon Filgis
Hi Tomek,
I mean MCU peripheral watchdog just for clarification. Not a sw-watchdog
flow control. But is that available in the nuttx codebase btw?
:)

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Mon, Feb 20, 2023 at 3:24 PM Tomek CEDRO  wrote:

> On Mon, Feb 20, 2023 at 3:12 PM Simon Filgis wrote:
> > 1s keepalive can also be addressed with sw-watchdog. It may be easier
> than
> > flipflopping.
>
> Thanks Simon! I was also thinking about custom NuttX driver as Nathan
> suggested.. I need to see how complex is that.. always want to learn
> new stuff.. I will start from reading the sw-watchdog code :-) :-)
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>


Re: initial gpio state: power on -> boot -> rtos -> app.

2023-02-20 Thread Simon Filgis
Hi Tomek,

1s keepalive can also be addressed with sw-watchdog. It may be easier than
flipflopping.

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Mon, Feb 20, 2023 at 3:08 PM Tomek CEDRO  wrote:

> On Mon, Feb 20, 2023 at 2:52 PM Tomek CEDRO wrote:
> > In a more complex design I think that dedicated logic is required
> > between mcu and the acuators that would verify working state with some
> > sort of latching that prevents accidental fires :-)
>
> In addition to machine-state-awareness, even safer than latching would
> be keepalive control clocking, so logic will only set a valid working
> acuator state for a short period of time (i.e. 1s) until it gets
> another command or gets back to a safe state (stop), mcu must send
> desired command soon enough (i.e. 1/2s) in order to perform continuous
> actions.
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>


Re: initial gpio state: power on -> boot -> rtos -> app.

2023-02-19 Thread Simon Filgis
Not to forget to consider the time between reset and first init. Default
pin state mostly is input floating, or input weak pull-up.

Don't let big bang happen that early.

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Nathan Hartman  schrieb am So., 19. Feb. 2023,
13:13:

> On Sat, Feb 18, 2023 at 11:48 PM Tomek CEDRO  wrote:
>
> > Hello world :-)
> >
> > I am working on a pretty industrial automation project right now that
> > will control 3 phase motor over 400V/25A relays.
> >
> > There are 6 relays to provide all possible modes of 3 phase motor
> > control. There are 3 groups of two relays for a task like direction
> > change, star-left-star-right, and star-triangle switch. Each two of
> > the relays in the group will have exclusive control (i.e. when one is
> > on the other will have control cut off). But there groups are not
> > fully exclusive physically due to their function. So when all three
> > groups are turned on then big bang happens :-)
> >
> > I am still wondering how to protect against this big bang. For sure I
> > will add some physical protection so this situation is impossible
> > (i.e. some sort of logic between GPIO and relays where only one line
> > will indicate possible safe operation state of all relays, while zero
> > or more than one line set high will always result in a safe state).
> >
> > This lead me to think of the initial state of the ESP32 GPIO pins
> > after boot then after NuttX starts.. or when device will be in
> > bootloader / flashing state.. in case of malfunction.. or malicious
> > actions (it might be connected to the internet somehow).. or simply
> > sending 0x to /dev/gpio0 etc etc?
> >
> > My question is: it is possible to be sure of the GPIO pin state since
> > power-on through bootloader + RTOS up to the application run? For
> > instance not to let all pins go high/low/random?
> >
> > Any hints welcome :-)
> > Tomek
> >
> > --
> > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >
>
> Rather than use the default GPIO driver, I would probably consider a custom
> driver that doesn't present to applications as individual GPIO pins, but
> rather as higher level constructs (motor off, star-left, star-right, etc),
> with mappings to specific GPIO pins in board.h. That custom driver would
> initialize the actual pins to the safe state (motor off) on boot, would
> return the pins to that state when the driver is closed, and would produce
> only allowed combinations of GPIO outputs.
>
> In addition, never trust software when it could cause real-world big bangs!
> Since industrial controls must be connected to a safety controller
> (emergency stop or "E Stop"), that can put the entire machine or line in a
> safe state, I would design logic on the circuit board that E-stops the
> system if: (1) any forbidden combination of GPIOs is ever output, or (2) a
> hardware watchdog that ensures the software hasn't frozen.
>
> Cheers
> Nathan
>


Re: Syslog file max Size wrap issue

2023-01-03 Thread Simon Filgis
Hi Alan,

Thanks for your email.

I had a closer look and I think I do not think of a bug anymore.

Filesize is only checked once, while initializing the syslog file channel
with syslog_file_channel() at board level. In other words, rotation does
only happen on reboot.

A "life-rotate" mechanism would need to monitor log file size and do the
following:

sched_lock();
syslog_dev_uninitialize();
log_rotate();
syslog_dev_initialize();
syslog_channel();
sched_unlock();

This mechanism could live in a separate task
in drivers/syslog/syslog_filechannel.c or even at board level.
Or it could be triggered by each call of syslog() being addressed in the
depth of syslog.

As a first measure I reduced the log output of my application. It is
arguable if this "life-rotate" feature is of any real good in case you do
not have 1Gb log files by mistake.

Do you have any thoughts about this?

Simon

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Alan C. Assis  schrieb am So., 1. Jan. 2023, 14:01:

> Hi Simon,
>
> Happy new year!
>
> Do you know if that Rotating Log was working on previous releases (i.e
> 10.3) ?
>
> Probably some recent modification broke it.
>
> I think we don't have a Rotation Log test, we need some Software
> Qualification Testing when doing a software release.
>
> I just opened an Issue about it:
> https://github.com/apache/nuttx/issues/8017
>
> BR,
>
> Alan
>
> On 1/1/23, Simon Filgis  wrote:
> > Dear nuttx developers,
> >
> > I find the syslog architecture to generated files way bigger then
> > configured:
> >
> > [image: image.png]
> >
> > 6 files of log-files with unpredictable final size, up to 1,5GB.
> >
> > [image: image.png]
> >
> > I would expect 10 files with maximum 0.5MB.
> >
> > The file log stream is delegated to sd-card.
> >
> > Does anybody face the same issue?
> >
> >
> > Happy new year,
> >
> > Simon
> >
> >
> >
> >
> > --
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> > --
> > sent by mobile phone
> >
>


Syslog file max Size wrap issue

2023-01-01 Thread Simon Filgis
Dear nuttx developers,

I find the syslog architecture to generated files way bigger then
configured:

[image: image.png]

6 files of log-files with unpredictable final size, up to 1,5GB.

[image: image.png]

I would expect 10 files with maximum 0.5MB.

The file log stream is delegated to sd-card.

Does anybody face the same issue?


Happy new year,

Simon




--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone


Re: Apps: SQLite/Python on Nuttx

2022-06-20 Thread Simon Filgis
Hi Michael,

I'm interested in SQ-Light, but do not have any clue of status.

There is a newer PR for Micropython:
https://github.com/apache/incubator-nuttx-apps/pull/840

Best,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Mon, Jun 20, 2022 at 8:51 AM  wrote:

> Dear all,
>
> I read, that SQLite was ported to Nuttx. Alan wrote that in a
> presentation in 2019
> (https://nuttx.events/wp-content/uploads/2019/11/AAssis_nx2019.pdf). But
> I cant find SQLite in the 10.0.3 sources.
>
> Could somebody give me a hint, where these port is? Or is there any work
> in progress, where I could start from? My intended platform would be the
> ESP32-WROVER with 8MB PSRAM. SQLite is under BSD license, what should be
> compatible to add it to Nuttx.
>
> About Python: there was in the past a uPython port for Nuttx, but it
> seems to be abandoned in 2016 or so. Is anybody working on a Python or
> uPython port to Nuttx?
>
> Thanks for any hint.
>


CAN FD - Baud-Rate Settings

2022-04-04 Thread Simon Filgis
Dear all,

I'm working on CAN-FD on SAME70Q21*A*. My tools claim a wrong checksum.
Therefore I suspect bittiming.

Has anybody a working config or can give me a link or tutorial how to set
those settings (never saw those segs for the fast data part):

[image: image.png]

Regards,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


Re: SPI Example

2022-03-04 Thread Simon Filgis
Hi Roberto,

maybe Lup's article can help:

https://lupyuen.github.io/articles/spi2

Which platform do you use?

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Fri, Mar 4, 2022 at 8:41 AM Roberto Bucher 
wrote:

> Hi
>
> where can I found a simple example that send n bytes to the SPI and
> receive m bytes?
>
> I can now see the /dev/spi but using simple methods like open and write
> doesn't give me any signal on the bus...
>
> Thanks in advance
>
> Roberto
>
>


Re: [Russia attacked Ukraine]

2022-02-25 Thread Simon Filgis
Stay save and take care, Petro!


Alan Carvalho de Assis  schrieb am Fr., 25. Feb. 2022,
18:04:

> I ask everyone here to reply directly to our friend Petro.
>
> BR,
>
> Alan
>
> On 2/25/22, Petro Karashchenko  wrote:
> > Hi,
> >
> > I know that this channel is not intended for things that I will write,
> but
> > I still will send this E-mail.
> >
> > For people that do not know: yesterday at 5AM Russia started massive
> > invasion and attacked Ukraine. The fightings are all over the central,
> > eastern, north and south. The bombs are exploding all over the country.
> > This is terrible. People are in fear. The war is in my country. We are
> > praying for peace and people to stop dying.
> >
> > At least knowing about this will be a support for my and my people's.
> >
> > Let Lord be with us,
> > Petro
> >
>


Re: SPI with DMA on SAME70

2022-02-21 Thread Simon Filgis
Hi Michael,

I'm doing the work to offload CPU from display activity. It would be very
nice if SD-Card and UART could also profit on samv7 :)

I tested DMA with SPI and it works (althought I can write only to one half
> of the display but that might be some my problems in configuration if all
> your tests were fine)


I have the same experience with the display. Only half is written. But the
blocksize seems to be complete. Therefore I assume that half of the line is
correct data. The other half of the line is wrong data. How many pixels
does your display line have? Mine has 240.

Regards,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Sun, Feb 20, 2022 at 10:17 PM Michal Lenc  wrote:

> Hello Simon,
>
>
>
> I had noticed your DMA fix PR (https://github.com/apache/incubator-nuttx/
> pull/5513 <https://github.com/apache/incubator-nuttx/pull/5513>) so I
> tested it with HSMCI SD card interface. There are still some
> problems when I undef HSCMI_NOTXDMA at
> https://github.com/apache/incubator-
> nuttx/blob/master/arch/arm/src/samv7/sam_hsmci.c#L122
> <https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/samv7/sam_hsmci.c#L122>.
> The card unmounts
> itself as soon as I try to write to it with 'echo' command. I think this
> might be quite a different problem that can be sam_hsmci.c related as some
> other TX DMAs are working.
>
>
>
>
> I tested DMA with SPI and it works (althought I can write only to one half
> of the display but that might be some my problems in configuration if all
> your tests were fine) as well as DMA with USB device. I will take a look
> into HSCMI with DMA in the future, currently more critical problem for our
> implementation at Elektroline.cz company is DMA support for U(S)ART. That
> will also be a nice way to find if there are some further DMA TX bugs.
>
> Best regards,
> Michal Lenc
>
> -- Původní e-mail --
> Od: Simon Filgis 
> Komu: dev@nuttx.apache.org
> Datum: 14. 2. 2022 16:33:32
> Předmět: Re: SPI with DMA on SAME70
> "Dear all,
>
> I started to follow up this topic.
>
> Found that one in sam_hsmci.c:
>
> /* There is some unresolved issue with the SAMV7 DMA. TX DMA is currently
> * disabled.
> */
>
>
> #undef HSCMI_NORXDMA /* Define to disable RX DMA */
> *#define HSCMI_NOTXDMA 1 /* Define to disable TX DMA */*
>
>
> That fits my (and Michael Lenc's) experience that DMA peripheral to memory
> works. Memory to the peripheral seems broken though.
>
> I will therefore debug *sam_xdmax.c*. Even if I find some odd comments on
> DMA timeouts in sam_spi.c.
>
> If anybody has a better idea, or remembers details ;), please give
> feedback.
>
>
> BR,
>
> Simon
>
> --
> Hard- and Softwaredevelopment Consultant
> Ingenieurbüro-Filgis
> USt-IdNr.: DE305343278
>
>
> On Tue, Feb 8, 2022 at 11:52 AM Simon Filgis <
> si...@ingenieurbuero-filgis.de
> >
> wrote:
>
> > Dear all,
> >
> > I'm using ST7789.c in combination with lvgl-lib.
> >
> > The bottleneck to the display is the SPI communication. But even if I
> > increase the SPI frequency to 24MHz, it does not get faster. This is
> > because of constant delay between the bytes.
> >
> > I guessed that this can be improved using DMA. But that does not seem to
> > work out of the box. In the SPI TX callback the result of the DMA
> transfer
>
> > is -4. The transfer is not executed.
> >
> > Can anybody give me a hint on what to do?
> >
> > Best regards,
> >
> > Simon
> >
> > --
> > Hard- and Softwaredevelopment Consultant
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> >
> "


Re: SPI with DMA on SAME70

2022-02-14 Thread Simon Filgis
Dear all,

I started to follow up this topic.

Found that one in sam_hsmci.c:

/* There is some unresolved issue with the SAMV7 DMA.  TX DMA is currently
 * disabled.
 */


#undef  HSCMI_NORXDMA  /* Define to disable RX DMA */
*#define HSCMI_NOTXDMA1 /* Define to disable TX DMA */*


That fits my (and Michael Lenc's) experience that DMA peripheral to memory
works. Memory to the peripheral seems broken though.

I will therefore debug *sam_xdmax.c*. Even if I find some odd comments on
DMA timeouts in sam_spi.c.

If anybody has a better idea, or remembers details ;), please give feedback.

BR,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Tue, Feb 8, 2022 at 11:52 AM Simon Filgis 
wrote:

> Dear all,
>
> I'm using ST7789.c in combination with lvgl-lib.
>
> The bottleneck to the display is the SPI communication. But even if I
> increase the SPI frequency to 24MHz, it does not get faster. This is
> because of constant delay between the bytes.
>
> I guessed that this can be improved using DMA. But that does not seem to
> work out of the box. In the SPI TX callback the result of the DMA transfer
> is -4. The transfer is not executed.
>
> Can anybody give me a hint on what to do?
>
> Best regards,
>
> Simon
>
> --
> Hard- and Softwaredevelopment Consultant
> Ingenieurbüro-Filgis
> USt-IdNr.: DE305343278
>


Re: SPI with DMA on SAME70

2022-02-08 Thread Simon Filgis
Hello Michael,

Thank you for your answer. That is true, SPI driver's initial flag setup is
0.

The flags are evaluated dynamically and very meaningful
within spi_exchange() and set via

  sam_dmaconfig(spics->rxdma, rxflags);
  sam_dmaconfig(spics->txdma, txflags);

I will try with setup initial flags to try.

Any hint to debug is appreciated :)


Simon


--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Tue, Feb 8, 2022 at 12:17 PM Michal Lenc  wrote:

> Hello Simon,
>
>
>
> I did take a look into SPI driver for SAME70 a few months ago. The one
> thing
> that was a little bit weird to me was the lack of DMA flags passed to sam_
> dmachannel() function (somewhere here https://github.com/apache/incubator-
> nuttx/blob/master/arch/arm/src/samv7/sam_spi.c#L2043
> <https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/samv7/sam_spi.c#L2043>)
> compared to the flags
> I needed to select for ADC DMA support to function correctly (https://
>
> github.com/apache/incubator-nuttx/blob/master/arch/arm/src/samv7/sam_afec.c#
> L1125
> <http://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/samv7/sam_afec.c#L1125>).
> I didn't invest more time into it as we had other priorities back
> then and I think we sticked with SPI without DMA. But it could be one of
> the
> problems.
>
>
>
>
> You can also take a look into sam_afec.c file, the DMA is working fine
> there. Hope this helps.
>
> Best regards,
> Michal Lenc
>
> -- Původní e-mail --
> Od: Simon Filgis 
> Komu: dev@nuttx.apache.org
> Datum: 8. 2. 2022 11:52:38
> Předmět: SPI with DMA on SAME70
> "Dear all,
>
> I'm using ST7789.c in combination with lvgl-lib.
>
> The bottleneck to the display is the SPI communication. But even if I
> increase the SPI frequency to 24MHz, it does not get faster. This is
> because of constant delay between the bytes.
>
> I guessed that this can be improved using DMA. But that does not seem to
> work out of the box. In the SPI TX callback the result of the DMA transfer
> is -4. The transfer is not executed.
>
> Can anybody give me a hint on what to do?
>
> Best regards,
>
> Simon
>
> --
> Hard- and Softwaredevelopment Consultant
> Ingenieurbüro-Filgis
> USt-IdNr.: DE305343278
> "


SPI with DMA on SAME70

2022-02-08 Thread Simon Filgis
Dear all,

I'm using ST7789.c in combination with lvgl-lib.

The bottleneck to the display is the SPI communication. But even if I
increase the SPI frequency to 24MHz, it does not get faster. This is
because of constant delay between the bytes.

I guessed that this can be improved using DMA. But that does not seem to
work out of the box. In the SPI TX callback the result of the DMA transfer
is -4. The transfer is not executed.

Can anybody give me a hint on what to do?

Best regards,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


Re: NuttX + MicroPython + ESP32 / ESP32-C3

2021-10-25 Thread Simon Filgis
Hi,

this is a good example why discussion on discord channel is tricky. The
discussion was good. Learned a lot. I managed to build PR840, simple math
on the micropython console was possible.

However I stopped the work because:
1. I got distracted in running daily business
2. I need to admit my skills*freetime=projectpower is not sufficient for
attacking

...but I have the mission micropython in the back of my head.

Looking forward to more discussion wherever (discord or mail, I don't
care), but please keep me in the loop ;)

Thank you,

Simon

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Mon, Oct 25, 2021 at 4:58 PM Xiang Xiao 
wrote:

> McKay made a new porting here:
> Pull requests · apache/incubator-nuttx-apps (github.com)
> 
> Maybe, you could work with him to boost the porting.
>
> On Mon, Oct 25, 2021 at 10:44 PM Alan Carvalho de Assis  >
> wrote:
>
> > Hi Tomasz,
> >
> > MicroPython was integrated in NuttX at some time ago, but it started
> > to crash and was removed.
> >
> > I think someone started a discussion about it on discord, but I don't
> > know what happened later.
> >
> > As I told you ESP32-C3 has a good support on NuttX and Xiaomi is
> > already using it internally (it passed on their certification
> > process).
> >
> > BR,
> >
> > Alan
> >
> > On 10/25/21, Tomasz CEDRO  wrote:
> > > Hello world :-)
> > >
> > > I am considering MicroPython as the rapid development platform. It
> > > seems well developed already, allows simple tasks extremely fast, also
> > > allows client to develop firmware on their own relatively easy without
> > > rebuilding whole firmware, getting into details, drivers, etc.
> > >
> > > I would like to ask what is the current state of MicroPython in NuttX
> > RTOS?
> > >
> > > What would be the proper way to autostart application and/or
> > > MicroPython + main.py script on boot?
> > >
> > > Are all CPU/SoC supported over HAL or I will have to write
> > > implementation on my own?
> > >
> > > Is ESP32-C3 fully supported? Is ESP32-PICO fully supported as ESP32
> > > derivative?
> > >
> > > I have also some M5Stack devices with LCD (M5StickC) even with Camera
> > > (M5StickV). They can use LVGL and I can see LVGL and LCD drivers are
> > > already ported to NuttX :-) M5StickV even has 64-bit RISC-V RV64IMAFDC
> > > (RV64GC) with NeuralNetwork accelerator! All of them cost way below
> > > $50 :-)
> > >
> > > MicroPython seems really amazing way to quickly create
> > > Proof-of-Concept designs :-)
> > >
> > > Any hints welcome :-)
> > > Tomek
> > >
> > > --
> > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> > >
> >
>


Re: controll sleep pin of uart tranceiver via ioctl

2021-10-08 Thread Simon Filgis
Thanks for the hint ;)

--
Hard- and Softwaredevelopment Consultant
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278


On Wed, Oct 6, 2021 at 7:32 PM Alan Carvalho de Assis 
wrote:

> Hi Simon,
>
> I think the sleep pin should be used in a more generic way, for instance,
> you can use the NuttX Power Management subsystem to control the CAN sleep
> pin.
>
> BR,
>
> Alan
>
> On Wednesday, October 6, 2021, Simon Filgis <
> si...@ingenieurbuero-filgis.de>
> wrote:
>
> > Dear all,
> >
> > I have two LIN transceivers on my board with a dedicated sleep pin. I
> want
> > to use the sleep functionality in my app.
> >
> > I tried the following:
> > 1. have sam_serial.c be aware of a *board_init() and a
> *board_disable(bool
> > disable) for every uartX
> > 2. call *bard_init() in setup
> > 3. make *board_disable(bool disable) available via ioctl
> > 4. have board implementation of  *bard_init() and *board_disable(bool
> > disable) for every used uartX
> >
> > https://github.com/SimonFilgis/incubator-nuttx/commit/
> > 0cdc16192970b14397a02e886c9187a55ca77604
> >
> > What do you think? Does anybody have a better idea, or is there maybe
> > already a solution?
> >
> > Regards,
> >
> > Simon
> >
> > ** untested in HW as I'm in home office - will be tested tomorrow
> >
>


controll sleep pin of uart tranceiver via ioctl

2021-10-06 Thread Simon Filgis
Dear all,

I have two LIN transceivers on my board with a dedicated sleep pin. I want
to use the sleep functionality in my app.

I tried the following:
1. have sam_serial.c be aware of a *board_init() and a *board_disable(bool
disable) for every uartX
2. call *bard_init() in setup
3. make *board_disable(bool disable) available via ioctl
4. have board implementation of  *bard_init() and *board_disable(bool
disable) for every used uartX

https://github.com/SimonFilgis/incubator-nuttx/commit/0cdc16192970b14397a02e886c9187a55ca77604

What do you think? Does anybody have a better idea, or is there maybe
already a solution?

Regards,

Simon

** untested in HW as I'm in home office - will be tested tomorrow


Re: Which control version software are you using? //was Re: Poll: Which OS are you using to compile NuttX?

2021-09-27 Thread Simon Filgis
Dear all,

@David, thank you for your explanation.

I started research on the implementation of uname. From there I came across
the nuttx/version.sh

Within I find:

> # Get GIT information (if not provided on the command line)
> if [ -z "${BUILD}" ]; then
>   BUILD=`git -C ${WD} log --oneline -1 | cut -d' ' -f1 2>/dev/null`
>   if [ -z "${BUILD}" ]; then
> echo "GIT version information is not available"
> exit 5
>   fi
>   if [ -n "`git -C ${WD} diff-index --name-only HEAD | head -1`" ]; then
> BUILD=${BUILD}-dirty
>   fi
> fi


Am I right with my assumption that it is possible to feed additional custom
GIT / SVN / 'What else' information into the build via command line? That
would suffice the needed flexibility, wouldn't it?


Regards,


Simon



On Sun, Sep 26, 2021 at 8:45 PM Gregory Nutt  wrote:

>
> > I wonder what is the purpose of this question.
> The problem with these polls is that everyone sees right through them..
> at least at some level.  They are all really the question , "Who can we
> f*ck over."
>


Re: Which control version software are you using? //was Re: Poll: Which OS are you using to compile NuttX?

2021-09-25 Thread Simon Filgis
What does your script do?

David S. Alessio  schrieb am Sa., 25. Sept.
2021, 01:02:

> I’d like to see my git version script be brought back into mainstream.
>
> > On Sep 24, 2021, at 3:58 PM, Alan Carvalho de Assis 
> wrote:
> >
> > Hi David,
> >
> > Nice you hear from you.
> >
> > I'm also using git: #1
> >
> > BR,
> >
> > Alan
> >
> > On 9/24/21, David S. Alessio  wrote:
> >> Hi, Alan,
> >>
> >> It’d be good to know how developers are managing their code:
> >> 1) git
> >> 2) mercurial
> >> 3) SVN
> >> 4) zip files on floppies
> >> 5) none
> >>
> >> My money is on #1 ;)
> >>
> >> Cheers,
> >> -david
> >>
> >>> On Sep 24, 2021, at 2:07 PM, Alan Carvalho de Assis  >
> >>> wrote:
> >>>
> >>> Hi Flávio,
> >>>
> >>> That is good idea, but I think we need to have some kind of
> maintainers.
> >>>
> >>> It is hard when someone adds some strange OS and the go out and leave
> >>> it to other developers to maintain it.
> >>>
> >>> Do you want to mainline some host OS? :-P
> >>>
> >>> BR,
> >>>
> >>> Alan
> >>>
> >>> On 9/24/21, Flavio Castro Alves Filho  wrote:
>  Alan,
> 
>  How about a poll asking "which other OS would you like to build
> NuttX?"
>  :-P
> 
>  Best regards,
> 
>  Flavio
> 
>  Em sex., 24 de set. de 2021 às 17:45, Tim Hardisty
>   escreveu:
> >
> > Linux
> >
> >
> >
> > On 24/09/2021, 21:07, "Alan Carvalho de Assis" 
> > wrote:
> >
> >   Sorry guys, I suppose you are using LinkedIn too.
> >
> >   Yes, probably it will collect some data from you, but you are using
> > a
> >   better MS gather:
> >
> >   "Sent from Mail for Windows"
> >
> >   So, if you are already in the hell, please give a warm hug in the
> > Lucifer :-D
> >
> >   Now, let be serious here: for those who don't have LinkedIn access,
> >   please reply this email with one of these options:
> >
> >   1) Linux
> >   2) MacOS
> >   3) Windows using Cygwin
> >   4) Windows Native
> >
> >   Thank you for the understanding.
> >
> >   BR,
> >
> >   Alan
> >
> >   On 9/24/21, Russell Haley  wrote:
> >> The link gives me “This post cannot be displayed”. I am logged into
> > the
> >> Microsoft data collection site known as LinkedIn.
> >>
> >> Sent from Mail for Windows
> >>
> >> From: Tim Hardisty
> >> Sent: Friday, September 24, 2021 12:54 PM
> >> To: dev@nuttx.apache.org
> >> Subject: Re: Poll: Which OS are you using to compile NuttX?
> >>
> >> Needs a LinkedIn login?
> >>
> >>
> >>
> >> From: Alan Carvalho de Assis 
> >> Reply to: "dev@nuttx.apache.org" 
> >> Date: Friday, 24 September 2021 at 20:20
> >> To: dev 
> >> Subject: Poll: Which OS are you using to compile NuttX?
> >>
> >> Hi Everyone, Please help us to discover which OS people are using
> > most to
> >> compile NuttX:
> >>
> >
> https://www.linkedin.com/feed/update/urn:li:activity:6847246067046596609/
> > It
> >> will help us to decide how better support your host OS. BR, Alan
> >>
> >>
> >
> >
> 
> 
>  --
>  Flavio de Castro Alves Filho
> 
>  flavio.al...@gmail.com
>  Twitter: http://twitter.com/#!/fraviofii
>  LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> 
> >>
> >>
>
>


Re: Poll: Which OS are you using to compile NuttX?

2021-09-24 Thread Simon Filgis
:'D



Russell Haley  schrieb am Fr., 24. Sept. 2021, 21:57:

> The link gives me “This post cannot be displayed”. I am logged into the
> Microsoft data collection site known as LinkedIn.
>
> Sent from Mail for Windows
>
> From: Tim Hardisty
> Sent: Friday, September 24, 2021 12:54 PM
> To: dev@nuttx.apache.org
> Subject: Re: Poll: Which OS are you using to compile NuttX?
>
> Needs a LinkedIn login?
>
>
>
> From: Alan Carvalho de Assis 
> Reply to: "dev@nuttx.apache.org" 
> Date: Friday, 24 September 2021 at 20:20
> To: dev 
> Subject: Poll: Which OS are you using to compile NuttX?
>
> Hi Everyone, Please help us to discover which OS people are using most to
> compile NuttX:
> https://www.linkedin.com/feed/update/urn:li:activity:6847246067046596609/
> It will help us to decide how better support your host OS. BR, Alan
>
>


Lin

2021-08-13 Thread Simon Filgis
Dear all,

has anybody implemented a LIN driver for SAME70 USART? The SAME70 USART
peripheral is capable of. A SW implementation (sllin.c - Pavel Pisa) would
also be interesting!

Would you extend sma_lowputc.c and sam_serial.c or would you grep USARTx in
a separate file?

Have a good Weekend,

Simon


Re: not reached any more ?!

2021-08-11 Thread Simon Filgis
Dear all,

OK.

nuttx -> master
apps -> something old

after pulling apps the problem is solved. I realized this when looking at
several new warnings, that are also gone now.

Thanks for the awesome support :)

Simon


On Wed, Aug 11, 2021 at 4:51 PM Alan Carvalho de Assis 
wrote:

> Hi Simon,
>
> It is not included twice, see now with indentation:
>
> ifeq ($(CONFIG_BOARDCTL),y)
>   CSRCS += sam_appinit.c sam_bringup.c
>
>   ifeq ($(CONFIG_BOARDCTL_RESET),y)
> CSRCS += sam_reset.c
>   endif
> else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
>   CSRCS += sam_bringup.c
> endif
>
> BR,
>
> Alan
>
> On 8/11/21, Simon Filgis  wrote:
> > That is done:
> > [image: image.png]
> >
> > Any other ideas?
> >
> > By the way: is it OK to double include sam_bringup.c in line 30 and 35?
> >
> >
> > I will go back to an older state for verification of the assumptions.
> >
> >
> > Simon
> >
> > On Wed, Aug 11, 2021 at 3:59 PM Abdelatif Guettouche <
> > abdelatif.guettou...@gmail.com> wrote:
> >
> >> Please check your board/_path_/src/Makefile and check that your
> >> CONFIG_ are all in the new format, i.e.: CONFIG_LIB_BOARDCTL to
> >> CONFIG_BOARDCTL
> >>
> >>
> >> On Wed, Aug 11, 2021 at 3:56 PM Simon Filgis
> >>  wrote:
> >> >
> >> > Hi Nathan,
> >> >
> >> > You mean this option?
> >> >
> >> >
> >> > Makes no difference.
> >> >
> >> > I checked all the points in the list of cwiki. I did not miss a single
> >> line.
> >> >
> >> > I have attached my board's Kconfig and defconfig file, could you
> please
> >> have a look?
> >> >
> >> > Simon
> >> >
> >> >
> >> >
> >> > On Wed, Aug 11, 2021 at 3:03 PM Nathan Hartman
> >> > 
> >> wrote:
> >> >>
> >> >> On Wed, Aug 11, 2021 at 8:32 AM Nathan Hartman <
> >> hartman.nat...@gmail.com>
> >> >> wrote:
> >> >>
> >> >> > On Wed, Aug 11, 2021 at 8:28 AM Simon Filgis <
> >> >> > si...@ingenieurbuero-filgis.de> wrote:
> >> >> >
> >> >> >> Dear all,
> >> >> >>
> >> >> >> since yesterday's upstream fetch, my custom board is not working
> >> >> >> any
> >> more.
> >> >> >>
> >> >> >> Basically it is a copy of same70_explained:nsh ...
> >> >> >>
> >> >> >> ADC, CAN, ETHERNET is not any more in /dev/
> >> >> >> nsh is prompting fine...
> >> >> >>
> >> >> >> board_app_initialize() is not called any more.
> >> >> >>
> >> >> >> I think it has something to do with the following commit: Rename
> >> >> >> CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL.
> >> >> >>
> >> >> >> Does somebody have a hint where to search?
> >> >> >>
> >> >> >> Simon
> >> >> >
> >> >> >
> >> >> >
> >> >> > Yes. That Kconfig was renamed so your board's Kconfig needs to be
> >> updated
> >> >> > to the new name.
> >> >> >
> >> >> > You can run make menuconfig and enable BOARDCTL, then run make
> >> >> > savedefconfig and copy the defconfig file from nuttx/ to your
> >> >> > board's
> >> >> > config directiry.
> >> >> >
> >> >> > It's documented in the release notes on CWIKI, let me find the
> >> >> > link...
> >> >> >
> >> >> >
> >> >> Since this hasn't been released yet it's in the work in progress
> >> >> release
> >> >> notes:
> >> >>
> >> >> Under "changes to Kconfig":
> >> >> https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2
> >> >>
> >> >> (If you're on mobile you may need to request the desktop version.)
> >> >>
> >> >> Cheers,
> >> >> Nathan
> >>
> >
>


Re: not reached any more ?!

2021-08-11 Thread Simon Filgis
That is done:
[image: image.png]

Any other ideas?

By the way: is it OK to double include sam_bringup.c in line 30 and 35?


I will go back to an older state for verification of the assumptions.


Simon

On Wed, Aug 11, 2021 at 3:59 PM Abdelatif Guettouche <
abdelatif.guettou...@gmail.com> wrote:

> Please check your board/_path_/src/Makefile and check that your
> CONFIG_ are all in the new format, i.e.: CONFIG_LIB_BOARDCTL to
> CONFIG_BOARDCTL
>
>
> On Wed, Aug 11, 2021 at 3:56 PM Simon Filgis
>  wrote:
> >
> > Hi Nathan,
> >
> > You mean this option?
> >
> >
> > Makes no difference.
> >
> > I checked all the points in the list of cwiki. I did not miss a single
> line.
> >
> > I have attached my board's Kconfig and defconfig file, could you please
> have a look?
> >
> > Simon
> >
> >
> >
> > On Wed, Aug 11, 2021 at 3:03 PM Nathan Hartman 
> wrote:
> >>
> >> On Wed, Aug 11, 2021 at 8:32 AM Nathan Hartman <
> hartman.nat...@gmail.com>
> >> wrote:
> >>
> >> > On Wed, Aug 11, 2021 at 8:28 AM Simon Filgis <
> >> > si...@ingenieurbuero-filgis.de> wrote:
> >> >
> >> >> Dear all,
> >> >>
> >> >> since yesterday's upstream fetch, my custom board is not working any
> more.
> >> >>
> >> >> Basically it is a copy of same70_explained:nsh ...
> >> >>
> >> >> ADC, CAN, ETHERNET is not any more in /dev/
> >> >> nsh is prompting fine...
> >> >>
> >> >> board_app_initialize() is not called any more.
> >> >>
> >> >> I think it has something to do with the following commit: Rename
> >> >> CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL.
> >> >>
> >> >> Does somebody have a hint where to search?
> >> >>
> >> >> Simon
> >> >
> >> >
> >> >
> >> > Yes. That Kconfig was renamed so your board's Kconfig needs to be
> updated
> >> > to the new name.
> >> >
> >> > You can run make menuconfig and enable BOARDCTL, then run make
> >> > savedefconfig and copy the defconfig file from nuttx/ to your board's
> >> > config directiry.
> >> >
> >> > It's documented in the release notes on CWIKI, let me find the link...
> >> >
> >> >
> >> Since this hasn't been released yet it's in the work in progress release
> >> notes:
> >>
> >> Under "changes to Kconfig":
> >> https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2
> >>
> >> (If you're on mobile you may need to request the desktop version.)
> >>
> >> Cheers,
> >> Nathan
>


Re: not reached any more ?!

2021-08-11 Thread Simon Filgis
Hi Nathan,

You mean this option?
[image: image.png]

Makes no difference.

I checked all the points in the list of cwiki. I did not miss a single line.

I have attached my board's Kconfig and defconfig file, could you please
have a look?

Simon



On Wed, Aug 11, 2021 at 3:03 PM Nathan Hartman 
wrote:

> On Wed, Aug 11, 2021 at 8:32 AM Nathan Hartman 
> wrote:
>
> > On Wed, Aug 11, 2021 at 8:28 AM Simon Filgis <
> > si...@ingenieurbuero-filgis.de> wrote:
> >
> >> Dear all,
> >>
> >> since yesterday's upstream fetch, my custom board is not working any
> more.
> >>
> >> Basically it is a copy of same70_explained:nsh ...
> >>
> >> ADC, CAN, ETHERNET is not any more in /dev/
> >> nsh is prompting fine...
> >>
> >> board_app_initialize() is not called any more.
> >>
> >> I think it has something to do with the following commit: Rename
> >> CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL.
> >>
> >> Does somebody have a hint where to search?
> >>
> >> Simon
> >
> >
> >
> > Yes. That Kconfig was renamed so your board's Kconfig needs to be updated
> > to the new name.
> >
> > You can run make menuconfig and enable BOARDCTL, then run make
> > savedefconfig and copy the defconfig file from nuttx/ to your board's
> > config directiry.
> >
> > It's documented in the release notes on CWIKI, let me find the link...
> >
> >
> Since this hasn't been released yet it's in the work in progress release
> notes:
>
> Under "changes to Kconfig":
> https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2
>
> (If you're on mobile you may need to request the desktop version.)
>
> Cheers,
> Nathan
>


not reached any more ?!

2021-08-11 Thread Simon Filgis
Dear all,

since yesterday's upstream fetch, my custom board is not working any more.

Basically it is a copy of same70_explained:nsh ...

ADC, CAN, ETHERNET is not any more in /dev/
nsh is prompting fine...

board_app_initialize() is not called any more.

I think it has something to do with the following commit: Rename
CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL.

Does somebody have a hint where to search?

Simon


Re: Same70 adc, CAN and NuttX in general

2021-08-05 Thread Simon Filgis
 182 00 Praha 8  WWW:   http://www.pikron.com/
>  Czech Republic  e-mail:  pik...@pikron.com
> ==
>
>
> On Tuesday 03 of August 2021 21:20:28 Alan Carvalho de Assis wrote:
> > > Alan Carvalho de Assis  schrieb am Di., 3. Aug.
> 2021,
> > >
> > > 17:27:
> > >> Hi Simon,
> > >>
> > >> I didn't look the SAME70 datasheet/reference manual, but probably the
> > >> ADC is similar to SAMA5, normally the manufacturer reuse their IP
> > >> around many chips families.
> > >>
> > >> Please use the arch/arm/src/sama5/sam_adc.c as reference to implement
> > >> the same70 ADC driver.
> > >>
> > >> BR,
> > >>
> > >> Alan
> > >>
> > >> On 8/3/21, Simon Filgis  wrote:
> > >> > Dear all,
> > >> >
> > >> > has anybody implemented adc for same70? That would be nice!
> > >> >
> > >> > Regards,
> > >> >
> > >> > Simon
>
>
>


Re: Same70 adc

2021-08-03 Thread Simon Filgis
Hi Alan,

that is what I started today. It turns out to be a good exercise.

Nuttx is fun :)

Regards,

Simon

--

Alan Carvalho de Assis  schrieb am Di., 3. Aug. 2021,
17:27:

> Hi Simon,
>
> I didn't look the SAME70 datasheet/reference manual, but probably the
> ADC is similar to SAMA5, normally the manufacturer reuse their IP
> around many chips families.
>
> Please use the arch/arm/src/sama5/sam_adc.c as reference to implement
> the same70 ADC driver.
>
> BR,
>
> Alan
>
> On 8/3/21, Simon Filgis  wrote:
> > Dear all,
> >
> > has anybody implemented adc for same70? That would be nice!
> >
> > Regards,
> >
> > Simon
> >
>


Same70 adc

2021-08-03 Thread Simon Filgis
Dear all,

has anybody implemented adc for same70? That would be nice!

Regards,

Simon


Re: ./tools/configure.sh | find -L | to follow symlinks

2021-08-03 Thread Simon Filgis
Better!
Thank you!

On Tue, Aug 3, 2021 at 10:20 AM Abdelatif Guettouche <
abdelatif.guettou...@gmail.com> wrote:

> > Regarding my advice from a few minutes ago. Somebody in
> >
> https://github.com/apache/incubator-nuttx/issues/2206#issuecomment-721138548
> > complains that
> > the process is not working.
>
>
> That's only when the board is part of a group that has the "common"
> directory and the common directory isn't wanted.  So more tweaking was
> needed there.
> The SAMxx families don't have that, so creating a custom board from
> the in-tree boards is straightforward.
>
>
> On Tue, Aug 3, 2021 at 10:16 AM Maciej Wójcik  wrote:
> >
> > Regarding my advice from a few minutes ago. Somebody in
> >
> https://github.com/apache/incubator-nuttx/issues/2206#issuecomment-721138548
> > complains that
> > the process is not working.
> >
> > Just to be sure I will test it today and maybe finish that documentation.
> > If I won't, still just try what is described there. I am sorry for the
> > inconvenience. It looks a bit complicated, but it is quite simple in the
> > end.
> >
> > Am Di., 3. Aug. 2021 um 10:10 Uhr schrieb Maciej Wójcik <
> w8j...@gmail.com>:
> >
> > > In general, you probably don't want to change files in the OS
> repository
> > > just to attach your board.
> > >
> > > I was supposed to document how to do this correctly, more than a half
> year
> > > ago. I didn't, but what you need is described in this issue
> > >
> https://github.com/apache/incubator-nuttx/issues/2206#issuecomment-721138548
> > >
> > > The whole idea is to call `./config.sh` with a relative path. Other
> than
> > > this you need to nest your board configuration in particular folder
> > > structure. I don't remember exactly, but what is in that issue is
> correct
> > > and supported.
> > >
> > > Am Di., 3. Aug. 2021 um 09:57 Uhr schrieb Simon Filgis <
> > > si...@ingenieurbuero-filgis.de>:
> > >
> > >> Dear all,
> > >>
> > >> I have my own board assembled with Atmel SAME70 and I would like to
> work
> > >> on
> > >> the board files "outside" the nuttix structure in a separate folder
> > >> (custom_board). Now I symlinked my custom_board folder into nuttx:
> > >>
> > >> cd ../nuttx/boards/arm/samv7
> > >> > ln -s ../../../../custom_board/ custom_board
> > >>
> > >>
> > >> This only works if the find command gets a -L (follow symlinks) in
> > >>
> > >> function dumpcfgs
> > >> > {
> > >> >   configlist=`find -L ${TOPDIR}/boards -name defconfig`
> > >> >   for defconfig in ${configlist}; do
> > >> > config=`dirname ${defconfig} | sed -e "s,${TOPDIR}/boards/,,g"`
> > >> > boardname=`echo ${config} | cut -d'/' -f3`
> > >> > configname=`echo ${config} | cut -d'/' -f5`
> > >> > echo "  ${boardname}:${configname}"
> > >> >   done
> > >> > }
> > >>
> > >>
> > >> Has anybody any concern in adding -L to the find or in general with my
> > >> approach?
> > >>
> > >> Regards,
> > >>
> > >> Simon
> > >>
> > >> Ingenieurbüro-Filgis
> > >> USt-IdNr.: DE305343278
> > >>
> > >
>


./tools/configure.sh | find -L | to follow symlinks

2021-08-03 Thread Simon Filgis
Dear all,

I have my own board assembled with Atmel SAME70 and I would like to work on
the board files "outside" the nuttix structure in a separate folder
(custom_board). Now I symlinked my custom_board folder into nuttx:

cd ../nuttx/boards/arm/samv7
> ln -s ../../../../custom_board/ custom_board


This only works if the find command gets a -L (follow symlinks) in

function dumpcfgs
> {
>   configlist=`find -L ${TOPDIR}/boards -name defconfig`
>   for defconfig in ${configlist}; do
> config=`dirname ${defconfig} | sed -e "s,${TOPDIR}/boards/,,g"`
> boardname=`echo ${config} | cut -d'/' -f3`
> configname=`echo ${config} | cut -d'/' -f5`
> echo "  ${boardname}:${configname}"
>   done
> }


Has anybody any concern in adding -L to the find or in general with my
approach?

Regards,

Simon

Ingenieurbüro-Filgis
USt-IdNr.: DE305343278