From 0d20c39250c5dd6aaa6dc178b9dbbb1e776f15cf Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Tue, 18 Dec 2018 05:30:31 +0000 Subject: [PATCH] Merged in masayuki2009/nuttx.nuttx/fix_lc823450_related (pull request #789) Fix lc823450 related * configs/lc823450-xgevk: Fix IOB params in rndis/defconfig These prameters work for HTTP audio streaming. Signed-off-by: Masayuki Ishikawa * arch/arm/src/lc823450: Fix up_allocate_heap() in lc823450_allocateheap2.c This change fixes heap size and also implements up_addregion(). Signed-off-by: Masayuki Ishikawa Approved-by: GregoryN --- arch/arm/src/lc823450/lc823450_allocateheap2.c | 12 ++++++++++-- configs/lc823450-xgevk/rndis/defconfig | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/lc823450/lc823450_allocateheap2.c b/arch/arm/src/lc823450/lc823450_allocateheap2.c index 2cebe4ba0d9..5e33fbcb705 100644 --- a/arch/arm/src/lc823450/lc823450_allocateheap2.c +++ b/arch/arm/src/lc823450/lc823450_allocateheap2.c @@ -166,7 +166,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size) /* Return the heap settings */ *heap_start = (uintptr_t *)&_eronly; /* please see ld.script */ - *heap_size = SRAM1_END - (int)heap_start; + *heap_size = SRAM1_END - (int)*heap_start; /* Colorize the heap for debug */ @@ -230,6 +230,14 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size) #if CONFIG_MM_REGIONS > 1 void up_addregion(void) { -# error "TODO" + FAR void *region_start; + size_t region_size; + + /* NOTE: add 1KB to avoid conflicts of initial stack */ + + region_start = (uintptr_t *)&_ebss + 1024; + region_size = 0x02040000 - (int)region_start; + + umm_addregion(region_start, region_size); } #endif diff --git a/configs/lc823450-xgevk/rndis/defconfig b/configs/lc823450-xgevk/rndis/defconfig index 23a27696aa1..e3f46b5c0d6 100644 --- a/configs/lc823450-xgevk/rndis/defconfig +++ b/configs/lc823450-xgevk/rndis/defconfig @@ -52,9 +52,9 @@ CONFIG_I2CTOOL_MAXBUS=1 CONFIG_I2C_RESET=y CONFIG_I2S=y CONFIG_INTELHEX_BINARY=y -CONFIG_IOB_BUFSIZE=128 +CONFIG_IOB_BUFSIZE=64 CONFIG_IOB_NBUFFERS=64 -CONFIG_IOB_NCHAINS=10 +CONFIG_IOB_NCHAINS=20 CONFIG_LC823450_I2C0=y CONFIG_LC823450_I2C1=y CONFIG_LC823450_I2S0=y