xiaoxiang781216 commented on PR #6537: URL: https://github.com/apache/incubator-nuttx/pull/6537#issuecomment-1170402526
> That OpenAMP looks promising and nice but I have some concerns. Mainly about memory. It seems quite complex (and definately way more complex than simple character device stream) so I suspect it requires quite a lot of memory (for an mcu)? The major memory consumption come from tx/rx virtio queue, here is a demo config from sim: https://github.com/apache/incubator-nuttx/blob/master/arch/sim/src/sim/up_rptun.c#L115-L121 which is quit large, but you can change both the number and size of buffer to reduce the total size less than 1KB. > Looking around I noticed that it requires at least one extra thread (for dispatching) that by default uses 4kB of ram. That is _a lot_ considering that this will have to work on two of the CPUs. Not to mention extra code size (that I did not confirm in any way). > There is an option to reuse the work queue for dispatching: https://github.com/apache/incubator-nuttx/blob/master/drivers/rptun/Kconfig#L21-L24 so the additional overhead can be shared with other component. > ST promotes openamp yes, but I've seen it's on their stm32mp* processors which have arm A7 and M4 - so there is plenty of RAM. On stm32wl5 you have 64kB, and I did not see way to enable openamp in their stm32cube. > > I want to use this to communicate via LORA and draw stuff on LCD - this will take it's own share of memory, so I don't want to add extra features to the plate (even tough they seem nice) as I already am a little afraid of exhausing RAM. > All service is disabled by default, so the overhead is major overhead come from: 1. virtio and remoteproc code 2. IPC buffer depends on the config 3. Runtime house keeping data depends on how many endpoint you create > So do you know how much extra memory would openamp take (ram/flash)? My rough estimation: RAM ~2KB, Flash ~20KB Anyway, you can provide a dummy rptun driver and get the real result quickly. -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org