Skip to content

Commit

Permalink
[Bouffalolab] Update bouffalolab sdk repo 1.6.40 (project-chip#24514)
Browse files Browse the repository at this point in the history
* create bl_iot_sdk.gni

* update bl_iot_sdk.gni

* remove more 702 specific-name

* update bl602

* update bl602 & bl702

* update toolchain path

* fix issues for bl602

* bl602 mbedtls

* correct partition table for bl702 and update sdk sub-repo

* update for update sdk

* update timer task stack size

* update matter for sdk change

* remove unused files

* update sdk repo

* update sdk repo

* fix compile error

* fix restyle

* remove logs

* update debug print

* update sdk to 1.6.40

* fix restyle
  • Loading branch information
wy-hh authored Jan 19, 2023
1 parent 5b657d1 commit 44a3ac9
Show file tree
Hide file tree
Showing 23 changed files with 121 additions and 1,928 deletions.
8 changes: 5 additions & 3 deletions examples/lighting-app/bouffalolab/common/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ void PlatformManagerImpl::PlatformInit(void)
chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName("MatterLight");

#if CHIP_ENABLE_OPENTHREAD
#if CONFIG_ENABLE_CHIP_SHELL
cmd_otcli_init();
#endif

ChipLogProgress(NotSpecified, "Initializing OpenThread stack");
ret = ThreadStackMgr().InitThreadStack();
Expand All @@ -166,6 +163,11 @@ void PlatformManagerImpl::PlatformInit(void)
ChipLogError(NotSpecified, "ConnectivityMgr().SetThreadDeviceType() failed");
appError(ret);
}

#if CONFIG_ENABLE_CHIP_SHELL
cmd_otcli_init();
#endif

#elif CHIP_DEVICE_CONFIG_ENABLE_WIFI

ret = sWiFiNetworkCommissioningInstance.Init();
Expand Down
14 changes: 11 additions & 3 deletions examples/platform/bouffalolab/bl602/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@

/* Software timer definitions. */
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
#define configTIMER_QUEUE_LENGTH 4
#define configTIMER_TASK_STACK_DEPTH (400)
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 2)
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 4)

/* Task priorities. Allow these to be overridden. */
#ifndef uartPRIMARY_PRIORITY
Expand Down Expand Up @@ -200,15 +200,23 @@ Like all task stack sizes, the value is the number of words, not bytes. */
#define genqGENERIC_QUEUE_TEST_TASK_STACK_SIZE 100
#define recmuRECURSIVE_MUTEX_TEST_TASK_STACK_SIZE 90

#ifdef __cplusplus
extern "C" void vAssertCalled(void);
#else
extern void vAssertCalled(void);
#endif
/* Stop if an assertion fails. */
#define configASSERT(x) \
if ((x) == 0) \
vAssertCalled()

#if (configUSE_TICKLESS_IDLE != 0)
#include "portmacro.h"
#ifdef __cplusplus
extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime);
#else
extern void vApplicationSleep(TickType_t xExpectedIdleTime);
#endif
#define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime) vApplicationSleep(xExpectedIdleTime)
#endif

Expand Down
10 changes: 9 additions & 1 deletion examples/platform/bouffalolab/bl702/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
#define configTIMER_QUEUE_LENGTH 4
#define configTIMER_TASK_STACK_DEPTH (400)
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2)

/* Task priorities. Allow these to be overridden. */
#ifndef uartPRIMARY_PRIORITY
Expand All @@ -159,7 +159,11 @@ to exclude the API function. */

/* Normal assert() semantics without relying on the provision of an assert.h
header file. */
#ifdef __cplusplus
extern "C" void vAssertCalled(void);
#else
extern void vAssertCalled(void);
#endif
#define configASSERT(x) \
if ((x) == 0) \
vAssertCalled()
Expand All @@ -179,7 +183,11 @@ Like all task stack sizes, the value is the number of words, not bytes. */

#if (configUSE_TICKLESS_IDLE != 0)
#include "portmacro.h"
#ifdef __cplusplus
extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime);
#else
extern void vApplicationSleep(TickType_t xExpectedIdleTime);
#endif
#define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime) vApplicationSleep(xExpectedIdleTime)
#endif

Expand Down
4 changes: 0 additions & 4 deletions examples/platform/bouffalolab/bl702/ldscripts/psram_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,8 @@ SECTIONS
*(.ble_rsvd_mem)

KEEP(*AppTask.cpp.o(.bss.*appStack*))
KEEP(*main.cpp.o(.bss.*IdleTaskStack*))
KEEP(*main.cpp.o(.bss.*TimerTaskStack*))

/*KEEP(*MemMonitoring.cpp.o(.bss.*monitoringStack*))*/
/*KEEP(*out.uart.c.o(.bss.chipUart_var*))*/

} >hbnram

.tcmcode : ALIGN(4)
Expand Down
8 changes: 4 additions & 4 deletions examples/platform/bouffalolab/common/plat/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBu
function then they must be declared static - otherwise they will be allocated on
the stack and so not exists after this function exits. */
static StaticTask_t xTimerTaskTCB;
static StackType_t uxTimerTaskStack[configMINIMAL_STACK_SIZE * 3 / 2];
static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH];

/* Pass out a pointer to the StaticTask_t structure in which the Timer
task's state will be stored. */
Expand All @@ -166,17 +166,17 @@ extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBu
/* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.
Note that, as the array is necessarily of type StackType_t,
configTIMER_TASK_STACK_DEPTH is specified in words, not bytes. */
*pulTimerTaskStackSize = configMINIMAL_STACK_SIZE * 3 / 2;
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
}

#if (configUSE_TICK_HOOK != 0)
extern "C" void vApplicationTickHook(void) {}
#endif

extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime) {}
void vApplicationSleep(TickType_t xExpectedIdleTime) {}

extern "C" void user_vAssertCalled(void) __attribute__((weak, alias("vAssertCalled")));
extern "C" void vAssertCalled(void)
void vAssertCalled(void)
{
void * ra = (void *) __builtin_return_address(0);

Expand Down
Loading

0 comments on commit 44a3ac9

Please sign in to comment.