jlaitine opened a new pull request, #20430:
URL: https://github.com/apache/nuttx/pull/20430
## Summary
When running larger application on the imxrt118x, I quickly run out of
performance while running from XIP on
NOR flash.
Imxrt PX4 configurations for imxrt1176 place all the hot functions into
ITMC. This patchset enables the same for imxrt118x, with the addition to
placing .bss, .data and initial heap on DTCM + more heap to OCRAM.
- Imxrt118x has ECC for TCM memories (enabled by default). To prevent ECC
from causing faults on ECC, initialize the TCM memories very early in the boot.
These are ARMV7-M, not imxrt specific, so I added the initialization loops
behind two new configuration macros ARMV7M_ITCM_ECC and ARMV7M_DTCM_ECC, and
added assembly coded enabling and loops to initialize both with 64-bit writes.
- The imxrt118x eDMA supports transferring directly to/from M7 DTCM, but the
access needs to be done via separate memory address/port. This adds support
into imxrt eDMA driver for address translation for any source/destination
address which lands in the DTCM. In practice this enables using the existing
drivers which have DMA buffers in .bss directly with imxrt118x also with eDMA.
- Change the imxrt1180-evk:nsh configuration to use all these features as
and example of optimized performance configuration.
## Impact
No impact on other than imxrt platform; enables high performance on
imxrt118x.
## Testing
Tested on external application (PX4 on imxrt1189, 3 IMUs, 3 EKF instances).
Running only from qSPI NOR as XIP, the configration doesn't run at all. With
hot functions placed in ITCM, CPU load is ~85 %. With also .data, .bss and heap
in DTCM, the load drops to ~66%, with 2 mavlink instances as well, one at high
rate on USB ttyacm:
```
PID COMMAND CPU(ms) CPU(%) USED/STACK PRIO(BASE) TSLICE
FD
0 Idle_Task 8822 32.925 620/ 4016 0 ( 0) 0 3
5 wq:manager 0 0.000 700/ 1176 255 (255) 20 4
6 wq:lp_default 0 0.406 1840/ 1840 205 (205) 20 4
985 mavlink_rcv_if0 0 0.296 1548/ 5064 175 (175) 20 4
27 wq:hp_default 0 0.149 876/ 2720 237 (237) 20 4
271 wq:SPI2 45 21.343 1980/ 2488 252 (252) 20 4
268 wq:I2C3 1 0.621 1124/ 2256 244 (244) 20 4
378 wq:nav_and_controllers 20 9.917 1532/ 2160 242 (242) 20 4
381 wq:rate_ctrl 9 4.340 2328/ 3064 255 (255) 20 4
382 wq:INS0 13 6.170 3916/ 5920 241 (241) 20 4
387 wq:INS1 12 5.692 3916/ 5920 240 (240) 20 4
391 wq:INS2 10 5.156 3916/ 5920 239 (239) 20 4
393 commander 4 2.105 1744/ 3128 140 (140) 19 4
874 gps 0 0.297 1308/ 1872 205 (205) 20 4
910 mavlink_if0 6 3.296 1952/ 2648 100 (100) 12 4
927 navigator 1 0.796 2184/ 2184 105 (105) 14 3
979 logger 0 0.281 2928/ 3544 230 (230) 16 3
1009 top 0 0.104 2580/ 4000 237 (237) 20 3
1003 mavlink_if1 11 5.233 2036/ 2736 100 (100) 7 5
1008 mavlink_rcv_if1 0 0.139 1356/ 5064 175 (175) 20 5
Processes: 20 total, 5 running, 15 sleeping
CPU usage: 66.34% tasks, 0.73% sched, 32.92% idle
Uptime: 21.181s total, 8.822s idle
```
--
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]