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

   ## Summary
   
   The configuration `stm32n6570-dk:lvglcam` does not build on master, so the 
CI job "Linux (arm-stm32-other)" fails for every PR. 
`arch/arm/src/common/stm32/stm32_eth_v2.c` stops with `#error "The IOBs must be 
aligned to the D-Cache lines"` (line 353) and `#error "CONFIG_IOB_NBUFFERS is 
too small for the Ethernet DMA rings"` (line 391).
   
   Since 52e7f4c8d42 (#21937), the Ethernet v2 driver takes its DMA buffers 
from the IOB pool. With the D-Cache, `CONFIG_IOB_ALIGNMENT` and 
`CONFIG_IOB_BUFSIZE` must be multiples of the D-Cache line size, and the pool 
must hold the RX and TX rings. That change set these options in all the 
configurations with Ethernet that were in the tree. The lvglcam configuration 
came in 6d0135e3730 (#22387), which was in review at the same time, and it did 
not get them.
   
   This PR sets `CONFIG_IOB_ALIGNMENT=32`, `CONFIG_IOB_BUFSIZE=224` and 
`CONFIG_IOB_NBUFFERS=100` in the lvglcam defconfig. These are the values of the 
netnsh and jumbo configurations of the same board. `CONFIG_IOB_THROTTLE` stays 
at its default: lvglcam has no TCP.
   
   ## Impact
   
   Only the defconfig of `stm32n6570-dk:lvglcam`. No code change. All the other 
defconfigs with `CONFIG_STM32_ETHMAC=y` on STM32H5, STM32H7 and STM32N6 already 
set `CONFIG_IOB_NBUFFERS=100`, and those with the D-Cache also set 
`CONFIG_IOB_ALIGNMENT=32` and `CONFIG_IOB_BUFSIZE=224`.
   
   ## Testing
   
   `tools/testbuild.sh -j 4 -e "-Wno-cpp -Werror"` with the CI line 
`/arm/stm32n*,CONFIG_ARM_TOOLCHAIN_GNU_EABI` (job "Linux (arm-stm32-other)") in 
the CI image, with the apps master:
   
   | configuration | master (f9d3eb13c3f) | this PR |
   |---|---|---|
   | stm32n6570-dk:lvglcam | fails: the two `#error` lines above | builds, 
defconfig is normalized |
   | stm32n6570-dk:fb, :jumbo, :lvgl, :netnsh, :nsh | build | build |
   | nucleo-n657x0-q:iks01a2, :leds, :netnsh, :nsh, :ostest | build | build |
   
   `tools/refresh.sh --silent stm32n6570-dk:lvglcam` gives no change. I did not 
run the image on a board.
   


-- 
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