Otpvondoiats opened a new pull request, #19478:
URL: https://github.com/apache/nuttx/pull/19478

   ## Summary
   This is a patch for the AMP architecture. RK3506 CPU 0 and 1 run Linux, 
while CPU 2 runs Nuttx.
   
   ## Impact
   
   1. The ARM A7 chip is based on the QEMU bundle.
   2. Add an accessor function to drivers/serial/uart_16550.c in the 16550 
serial port driver to expose the internal console device object pointer.
     - Because the shared GIC caused the core to not receive UART interrupts, 
the board switched to polling to receive characters. Polling requires calling 
the upper-level `uart_recvchars()`, which necessitates accessing the driver's 
internal console `uart_dev_t`. Therefore, this commit specifically added an 
accessor to expose it. TX and the per-core private PPI timer are unaffected; 
only the shared SPI RX has this issue.
   3. The NuttX client cannot access the flash memory; the control terminal is 
on the Linux side.
   4. Download:
     - https://github.com/Otpvondoiats/lockfox-lyra Download this 
repository(https://wiki.luckfox.com/zh/Luckfox-Lyra-Zero-W)
     - git clone && cd lockfox-lyra
     - git submodule update --init nuttxos/nuttx nuttxos/nuttx-apps
     - ( cd nuttxos/nuttx && git am ../patches/*.patch ) # Manually apply NuttX 
patches
     - ./tools/restore-dl-splits.sh # Restore the split DL (SHA256 checksum)
     - ./build.sh rk3506b_buildroot_spinand_amp_nuttx_defconfig
     - ./build.sh # Build big and small cores and image together
   
   ## Testing
   
   nsh> 
   nsh> 
   nsh> 
   nsh> ps
     TID   PID  PPID PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK        
    STACK COMMAND
       0     0     0   0 FIFO     Kthread   - Ready              
0000000000000000 0004072 Idle_Task
       1     0     0 224 RR       Kthread   - Waiting  Semaphore 
0000000000000000 0004024 hpwork 0x3f00000 0x3f00050
       3     0     0 100 RR       Kthread   - Waiting  Signal    
0000000000000000 0002008 rxpoll
       4     0     0 100 RR       Kthread   - Waiting  Semaphore 
0000000000000000 0004032 fakesensor_thread 0x3f0a348
       6     6     0 100 RR       Task      - Running            
0000000000000000 0004048 nsh_main
       7     0     0 224 RR       Kthread   - Waiting  Semaphore 
0000000000000000 0004024 rpmsg-virtio linux 0x3f08698
       8     8     6 100 RR       Task      - Waiting  Semaphore 
0000000000000000 0004032 sh -c cat
   nsh> help
   help usage:  help [-v] [<cmd>]
   
       .           cmp         fdinfo      pidof       pkill       unset       
       [           dirname     free        printf      sleep       uptime      
       ?           df          help        ps          usleep      watch        
                                                      
       alias       dmesg       hexdump     pwd         source      xd          
       unalias     echo        ls          rm          test        wait        
       basename    env         mkdir       rmdir       time        
       break       exec        mkfatfs     rpmsg       true        
       cat         exit        mkrd        rptun       truncate    
       cd          expr        mount       set         uname       
       cp          false       mv          kill        umount      
   
   Builtin Apps:
       dd                memtester         sh                uorb_unit_test    
       fstest            nsh               uorb_generator    
       hello             ramtest           uorb_listener     
   nsh> free
         total       used       free    maxused    maxfree  nused  nfree name
      33517568      42448   33475120      42816   33475104     99      2 Umem
   nsh> uo
     uorb_generator
     uorb_listener
     uorb_unit_test
   nsh> uorb_unit_test
   uORB note: try single-topic support
   uORB note: PASS single-topic test
   uORB note: PASS orb 10-instances
   uORB note: try multi-topic support
   uORB note: ---------------- LATENCY TEST ------------------
   mean:    0 us
   std dev: 0 us
   min:     0 us
   max:     0 us
   missed topic updates: 0
   uORB note: PASS multi-topic test
   uORB note: try multi-topic support subscribing before publishing
   uORB note: PASS multi-topic reversed
   uORB note: Testing unadvertise
   uORB note: Testing multi-topic 2 test (queue simulation)
   uORB note: PASS multi-topic 2 test (queue simulation)
   uORB note: Testing orb queuing
   uORB fail: subscribe failed: 2
   FAIL
   nsh> uo
     uorb_generator
     uorb_listener
     uorb_unit_test
   nsh> uo
     uorb_generator
     uorb_listener
     uorb_unit_test
   nsh> uorb_listener -n 5 sensor_accel0
   
   Monitor objects num:1
   object_name:sensor_accel, object_instance:0
   sensor_accel(now:439274000):0x3f102acB
   sensor_accel(now:439375000):0x3f102acB
   sensor_accel(now:439476000):0x3f102acB
   sensor_accel(now:439577000):0x3f102acB
   sensor_accel(now:439678000):0x3f102acB
   Object name:sensor_accel0, received:5
   Total number of received Message:5/5
   nsh> 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to