Commit graph

7 commits

Author SHA1 Message Date
Hou Zhiqiang 209568eabe driver: ram_console: leave one byte from the defined buffer size
Leave one byte from the CONFIG_RAM_CONSOLE_BUFFER_SIZE to ensure
the NULL-termination.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Andrew Davis 39863b66bd lib: open-amp: Use struct fw_resource_table type instead of void
The type of the resource table is known, casting to and from void* only
hides this type which can prevent the compiler from giving helpful
warnings. One warning would have been the accidental use of
"st_resource_table" in a cast, a struct which does not exist.

Use the fw_resource_table type when dealing with resource tables.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-05-24 07:51:42 -04:00
Andrew Davis 4c5eb92650 lib: open-amp: Use fixed width types for resource table
This structure is shared between cores which may have different type
widths. Use fixed width types when defining the structure. We can
also use struct resource_table to help as it is already defined with
fixed width types and removes the need to redefine these elements.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-05-24 07:51:42 -04:00
Gerard Marull-Paretas 79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Gerard Marull-Paretas cbd31d720b lib: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all lib code to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:09 +02:00
Matthias Fend fc4055852e lib: open-amp: add support for an empty resource table
This allows a resource table to be included even if neither virtIO nor the
RAM console are used.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
2022-03-24 10:41:39 +01:00
Arnaud Pouliquen 25ec73986b lib: open-amp: add helper to add resource table in project
The resource table is needed by the Linux kernel OS
for a rpmsg generic support, but is also recognised by OpenAMP.
This table allows to add trace based on the RAM console
and to support rpmsg protocol.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-01 09:21:15 -05:00