zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.84k stars 6.6k forks source link

ram_console buffer pointer is incompatible with openamp trace log #75656

Closed mausys closed 18 hours ago

mausys commented 4 months ago

The ram_console buffer used to be a global variable (array), now it's a pointer to an array. The problem with this is, that the lib/open-amp/resource_table.c directly uses this pointer for its resource table and the openamp host can't handle it.

My suggestion would be that, instead of using the global variable ram_console, implement a ram_console_get_buffer function and use that in rsc_table_get to complete the resource table.

github-actions[bot] commented 4 months ago

Hi @mausys! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

mausys commented 2 months ago

Sorry, my suggestion was wrong. The OpenAMP host (usually linux kernel) gets the resource table from the ELF file, so modifying it during runtime has no effect. But I have an other solution, pull request will follow soon.

github-actions[bot] commented 2 weeks ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.