mirror of
https://github.com/apache/nuttx.git
synced 2025-12-09 03:33:51 +08:00
note: supports specifying the section where the noteram buffer is located
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
@@ -71,6 +71,11 @@ config DRIVERS_NOTERAM_BUFSIZE
|
||||
---help---
|
||||
The size of the in-memory, circular instrumentation buffer (in bytes).
|
||||
|
||||
config DRIVERS_NOTERAM_SECTION
|
||||
string "Note RAM section"
|
||||
---help---
|
||||
Enable section information.
|
||||
|
||||
config DRIVERS_NOTERAM_DEFAULT_NOOVERWRITE
|
||||
bool "Disable overwrite by default"
|
||||
default n
|
||||
|
||||
@@ -53,5 +53,9 @@ ifeq ($(CONFIG_DRIVERS_NOTERPMSG),y)
|
||||
CSRCS += noterpmsg_driver.c
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DRIVERS_NOTERAM_SECTION),"")
|
||||
CFLAGS += ${DEFINE_PREFIX}DRIVERS_NOTERAM_SECTION=CONFIG_DRIVERS_NOTERAM_SECTION
|
||||
endif
|
||||
|
||||
DEPPATH += --dep-path note
|
||||
VPATH += :note
|
||||
|
||||
@@ -133,7 +133,11 @@ static const struct file_operations g_noteram_fops =
|
||||
noteram_ioctl, /* ioctl */
|
||||
};
|
||||
|
||||
static uint8_t g_ramnote_buffer[CONFIG_DRIVERS_NOTERAM_BUFSIZE];
|
||||
static
|
||||
#ifdef DRIVERS_NOTERAM_SECTION
|
||||
locate_data(DRIVERS_NOTERAM_SECTION)
|
||||
#endif
|
||||
uint8_t g_ramnote_buffer[CONFIG_DRIVERS_NOTERAM_BUFSIZE];
|
||||
|
||||
static const struct note_driver_ops_s g_noteram_ops =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user