forked from nuttx/nuttx-update
note: supports specifying the section where the noteram buffer is located
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
4b318cb2cb
commit
cf0e644a88
3 changed files with 14 additions and 1 deletions
|
@ -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 =
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue