Closed vvpnet closed 2 years ago
Hi,
The STM32F769 config is only there for experimentation purposes. So I don't guarantee that it is functional. If you want, you can take the configuration at https://github.com/YannCharbon/Low-power-STM32H743-Linux/tree/main/custom_board_def/board/yanncharbon/ucl-mb-802154rt-1 and modify it to your requirements.
Greetings. I want to run kernel in XIP mode on stm32f767. I don't have enough RAM. Is it possible to run the kernel in XIP mode + rootfs(jffs2) on a single QSPI? Which is available on the board.
Actually, it is possible to use a XIP kernel with a JFFS2 rootfs, but it is really not the most optimized way to go because JFFS2 does not allow to execute applications directly from flash. I would rather recommend to use a filesystem that is able to execute user applications without having to load them to RAM. CRAMFS or AXFS are able to achieve this. You have also to keep in mind that using XIP mode on STM32 requires the QPSI interface to stay in memory-mapped mode and thus the QSPI flash is read-only (so there is no benefit of using JFFS2 or other filesystems). If your plan is to only to use the internal 512KB RAM of the STM32 without external RAM, I would say that it is not possible (unless your kernel image is optimized to its maximum). You will always need about 8MB of RAM (bare minimum for the image that is provided in the repo) because the writable data (.data + .bss sections) must always be loaded to RAM as the QPSI is read-only. For this case, XIP mode + CRAMFS saves about 2MB of RAM comparing to RAM mode + JFFS2. Another point to consider using a single QSPI flash is that it can lead to a very slow and unstable kernel execution. Using two flashes in dual-flash mode can help increasing performance. Also make sure the flashes support DTR. To conclude, I would not really recommend using XIP mode at all unless you really know how to deal with it. Using RAM mode + JFFS2 provides a much more interesting tradeoff between performance and memory usage.
Thank you so much for the answer!
Unfortunately, I don't have enough RAM on board to work with Using RAM mode + JFFS2. https://stackoverflow.com/questions/71911800/running-linux-on-stm32f767 I will try your configurations on my board, maybe I will succeed))
Good afternoon. I saw the XIP mode for stm32f769 in your configuration. Does it work?