diff --git a/examples/freertos/explorer_board/CMakeLists.txt b/examples/freertos/explorer_board/CMakeLists.txt index 3bb1e71f2..791515518 100644 --- a/examples/freertos/explorer_board/CMakeLists.txt +++ b/examples/freertos/explorer_board/CMakeLists.txt @@ -28,7 +28,7 @@ set(APP_COMPILER_FLAGS "-DMQTT_TASK=1" "-Wxcore-fptrgroup" "-DDEBUG_PRINT_ENABLE=1" - "-DSL_WFX_DEBUG_MASK=(SL_WFX_DEBUG_ERROR|SL_WFX_DEBUG_INIT)" + "-DDEBUG_PRINT_ENABLE_LIB_SOC_SW_WIFI=1" "-DSL_WFX_DEFAULT_REQUEST_TIMEOUT_MS=500" "-DMBEDTLS_CONFIG_FILE=\"mbedtls_config.h\"" #"-DMBEDTLS_USER_CONFIG_FILE=\"mbedtls_user_config.h\"" # User config applied after default XMOS config @@ -82,6 +82,12 @@ set(APP_DEPENDENT_MODULES "FreeRTOS-Plus-TCP(>=10.2.1)" ) +if(${VERBOSE}) + list(APPEND APP_COMPILER_FLAGS "-DSL_WFX_DEBUG_MASK=(SL_WFX_DEBUG_ERROR|SL_WFX_DEBUG_INIT)") +else() + list(APPEND APP_COMPILER_FLAGS "-DSL_WFX_DEBUG_MASK=(SL_WFX_DEBUG_ERROR)") +endif() + set(USE_FREERTOS_SMP True) ## Add lib_soc devices diff --git a/examples/freertos/explorer_board/src/FreeRTOSIPConfig.h b/examples/freertos/explorer_board/src/FreeRTOSIPConfig.h index f50dbb9a4..76eef4db3 100644 --- a/examples/freertos/explorer_board/src/FreeRTOSIPConfig.h +++ b/examples/freertos/explorer_board/src/FreeRTOSIPConfig.h @@ -92,7 +92,7 @@ out the debugging messages. */ FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1 then FreeRTOS_printf should be set to the function used to print out the messages. */ -#define ipconfigHAS_PRINTF 1 +#define ipconfigHAS_PRINTF 0 #if( ipconfigHAS_PRINTF == 1 ) #define FreeRTOS_printf(X) vLoggingPrintf X #endif diff --git a/examples/freertos/explorer_board/src/mem_analysis/mem_analysis.c b/examples/freertos/explorer_board/src/mem_analysis/mem_analysis.c index cabf41737..d87f2833f 100644 --- a/examples/freertos/explorer_board/src/mem_analysis/mem_analysis.c +++ b/examples/freertos/explorer_board/src/mem_analysis/mem_analysis.c @@ -24,8 +24,8 @@ static void mem_analysis( void *arg ) { for( ;; ) { - debug_printf("Minimum heap free: %d\n", xPortGetMinimumEverFreeHeapSize()); - debug_printf("Current heap free: %d\n", xPortGetFreeHeapSize()); + debug_printf("\tMinimum heap free: %d\n", xPortGetMinimumEverFreeHeapSize()); + debug_printf("\tCurrent heap free: %d\n", xPortGetFreeHeapSize()); vTaskDelay( pdMS_TO_TICKS( 1000 ) ); } @@ -42,7 +42,7 @@ static void mem_analysis( void *arg ) if( task != NULL ) { free_stack_words = uxTaskGetStackHighWaterMark( task ); - debug_printf("%s free stack words: %d\n", task_name, free_stack_words); + debug_printf("\t%s free stack words: %d\n", task_name, free_stack_words); } vTaskDelay( pdMS_TO_TICKS( 1000 ) ); } diff --git a/examples/freertos/iot_aws/CMakeLists.txt b/examples/freertos/iot_aws/CMakeLists.txt index bad88cb71..6c52661bc 100644 --- a/examples/freertos/iot_aws/CMakeLists.txt +++ b/examples/freertos/iot_aws/CMakeLists.txt @@ -26,7 +26,7 @@ set(APP_COMPILER_FLAGS "-DMQTT_TASK=1" "-Wxcore-fptrgroup" "-DDEBUG_PRINT_ENABLE=1" - "-DSL_WFX_DEBUG_MASK=(SL_WFX_DEBUG_ERROR|SL_WFX_DEBUG_INIT)" + "-DDEBUG_PRINT_ENABLE_LIB_SOC_SW_WIFI=1" "-DSL_WFX_DEFAULT_REQUEST_TIMEOUT_MS=500" "-DMBEDTLS_CONFIG_FILE=\"mbedtls_config.h\"" #"-DMBEDTLS_USER_CONFIG_FILE=\"mbedtls_user_config.h\"" # User config applied after default XMOS config @@ -56,6 +56,12 @@ set(APP_DEPENDENT_MODULES "FreeRTOS-Plus-TCP(>=10.2.1)" ) +if(${VERBOSE}) + list(APPEND APP_COMPILER_FLAGS "-DSL_WFX_DEBUG_MASK=(SL_WFX_DEBUG_ERROR|SL_WFX_DEBUG_INIT)") +else() + list(APPEND APP_COMPILER_FLAGS "-DSL_WFX_DEBUG_MASK=(SL_WFX_DEBUG_ERROR)") +endif() + set(USE_FREERTOS_SMP True) ## Add lib_soc devices diff --git a/examples/freertos/iot_aws/src/FreeRTOSIPConfig.h b/examples/freertos/iot_aws/src/FreeRTOSIPConfig.h index 0c728deb5..76eef4db3 100644 --- a/examples/freertos/iot_aws/src/FreeRTOSIPConfig.h +++ b/examples/freertos/iot_aws/src/FreeRTOSIPConfig.h @@ -83,7 +83,7 @@ extern void vLoggingPrintf( const char *pcFormatString, ... ); /* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to 1 then FreeRTOS_debug_printf should be defined to the function used to print out the debugging messages. */ -#define ipconfigHAS_DEBUG_PRINTF 1 +#define ipconfigHAS_DEBUG_PRINTF 0 #if( ipconfigHAS_DEBUG_PRINTF == 1 ) #define FreeRTOS_debug_printf(X) vLoggingPrintf X #endif @@ -92,7 +92,7 @@ out the debugging messages. */ FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1 then FreeRTOS_printf should be set to the function used to print out the messages. */ -#define ipconfigHAS_PRINTF 1 +#define ipconfigHAS_PRINTF 0 #if( ipconfigHAS_PRINTF == 1 ) #define FreeRTOS_printf(X) vLoggingPrintf X #endif diff --git a/examples/freertos/iot_aws/src/mem_analysis/mem_analysis.c b/examples/freertos/iot_aws/src/mem_analysis/mem_analysis.c index cabf41737..d87f2833f 100644 --- a/examples/freertos/iot_aws/src/mem_analysis/mem_analysis.c +++ b/examples/freertos/iot_aws/src/mem_analysis/mem_analysis.c @@ -24,8 +24,8 @@ static void mem_analysis( void *arg ) { for( ;; ) { - debug_printf("Minimum heap free: %d\n", xPortGetMinimumEverFreeHeapSize()); - debug_printf("Current heap free: %d\n", xPortGetFreeHeapSize()); + debug_printf("\tMinimum heap free: %d\n", xPortGetMinimumEverFreeHeapSize()); + debug_printf("\tCurrent heap free: %d\n", xPortGetFreeHeapSize()); vTaskDelay( pdMS_TO_TICKS( 1000 ) ); } @@ -42,7 +42,7 @@ static void mem_analysis( void *arg ) if( task != NULL ) { free_stack_words = uxTaskGetStackHighWaterMark( task ); - debug_printf("%s free stack words: %d\n", task_name, free_stack_words); + debug_printf("\t%s free stack words: %d\n", task_name, free_stack_words); } vTaskDelay( pdMS_TO_TICKS( 1000 ) ); } diff --git a/examples/freertos/person_detection/CMakeLists.txt b/examples/freertos/person_detection/CMakeLists.txt index 506bbc81b..594d931f5 100644 --- a/examples/freertos/person_detection/CMakeLists.txt +++ b/examples/freertos/person_detection/CMakeLists.txt @@ -27,7 +27,6 @@ set(APP_COMPILER_FLAGS "-DDEBUG_PRINT_ENABLE=1" "-Wno-unknown-pragmas" "-DTF_LITE_STATIC_MEMORY" - "-DUSE_EXTMEM" "-D_XCORE_HAS_SWMEM" "-DTF_LITE_STRIP_ERROR_STRINGS" "-DNDEBUG" @@ -61,6 +60,10 @@ set(APP_DEPENDENT_MODULES "inference_engine(>=0.0.0)" ) +if(${USE_EXTMEM}) + add_definitions(-DUSE_EXTMEM) +endif() + ## Set any additional flags only for C++ set(CMAKE_CXX_FLAGS "-std=c++11") diff --git a/examples/freertos/person_detection/app/main.c b/examples/freertos/person_detection/app/main.c index 244395bef..69e8b82d2 100644 --- a/examples/freertos/person_detection/app/main.c +++ b/examples/freertos/person_detection/app/main.c @@ -30,8 +30,15 @@ void vApplicationDaemonTaskStartupHook( void ) { QueueHandle_t qcam2ai = xQueueCreate( 1, sizeof( uint8_t* ) ); - create_spi_camera_to_queue( appconfSPI_CAMERA_TASK_PRIORITY, qcam2ai ); - create_queue_to_ai( appconfQUEUE_TO_AI_TASK_PRIORITY, qcam2ai ); + if( create_spi_camera_to_queue( appconfSPI_CAMERA_TASK_PRIORITY, qcam2ai ) + == pdTRUE ) + { + create_queue_to_ai( appconfQUEUE_TO_AI_TASK_PRIORITY, qcam2ai ); + } + else + { + debug_printf("Camera setup failed...\n"); + } } void vApplicationMallocFailedHook(void) diff --git a/examples/freertos/person_detection/app/ov2640/ov2640.c b/examples/freertos/person_detection/app/ov2640/ov2640.c index cc8a1b73e..dc99e441d 100644 --- a/examples/freertos/person_detection/app/ov2640/ov2640.c +++ b/examples/freertos/person_detection/app/ov2640/ov2640.c @@ -115,7 +115,10 @@ static void ov2640_reg_jpeg_init() do { regop_res = ov2640_i2c_write_reg( OV2640_JPEG_INIT[i].reg, OV2640_JPEG_INIT[i].val ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + } i++; } while( ( OV2640_JPEG_INIT[i].reg != 0xFF ) | ( OV2640_JPEG_INIT[i].val != 0xFF ) ); @@ -128,7 +131,10 @@ static void ov2640_reg_yuv() do { regop_res = ov2640_i2c_write_reg( OV2640_YUV422[i].reg, OV2640_YUV422[i].val ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + } i++; } while( ( OV2640_YUV422[i].reg != 0xFF ) | ( OV2640_YUV422[i].val != 0xFF ) ); @@ -141,7 +147,10 @@ static void ov2640_reg_no_jpeg_compression() do { regop_res = ov2640_i2c_write_reg( OV2640_NONCOMPRESSED[i].reg, OV2640_NONCOMPRESSED[i].val ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + } i++; } while( ( OV2640_NONCOMPRESSED[i].reg != 0xFF ) | ( OV2640_NONCOMPRESSED[i].val != 0xFF ) ); @@ -154,7 +163,10 @@ static void ov2640_reg_96x96_jpeg() do { regop_res = ov2640_i2c_write_reg( OV2640_96x96_JPEG[i].reg, OV2640_96x96_JPEG[i].val ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + } i++; } while( ( OV2640_96x96_JPEG[i].reg != 0xFF ) | ( OV2640_96x96_JPEG[i].val != 0xFF ) ); @@ -167,7 +179,10 @@ static void ov2640_reg_160x120_JPEG() do { regop_res = ov2640_i2c_write_reg( OV2640_160x120_JPEG[i].reg, OV2640_160x120_JPEG[i].val ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + } i++; } while( ( OV2640_160x120_JPEG[i].reg != 0xFF ) | ( OV2640_160x120_JPEG[i].val != 0xFF ) ); @@ -203,93 +218,151 @@ uint32_t ov2640_read_fifo_length() return ( ( ( len3 << 16 ) | ( len2 << 8 ) | len1 ) & 0x07fffff ); } -void ov2640_init( int32_t spi_dev_id, int32_t i2c_dev_id ) +int32_t ov2640_init( int32_t spi_dev_id, int32_t i2c_dev_id ) { + int32_t retval = pdFALSE; i2c_regop_res_t regop_res; uint8_t tmp; - if( ov2640_host_ctx.initialized ) + do { - configASSERT( 0 ); - return; - } + if( ov2640_host_ctx.initialized ) + { + debug_printf("ov2640 context has already been initialized.\n"); + break; + } + + ov2640_host_ctx.spi_dev = spi_master_driver_init( + spi_dev_id, + 3*2, /* 6 DMA buffers */ + 0,/* This device's interrupts should happen on core 0 */ + 0, + NULL ); + + /* Camera supports 8 MHz max */ + spi_master_device_init( ov2640_host_ctx.spi_dev, + 0, 0, /* mode 0 */ + 8, /* 100 MHz / (8*2) / 2 = 3.125 MHz SPI clock */ + 3, /* 3 nanosecond cs to data minimum time */ + 0, /* no inter-byte setup delay required */ + 0 ); /* no last clock to cs delay required */ + + + ov2640_host_ctx.device_addr = OV2640_I2C_ADDR; + ov2640_host_ctx.i2c_dev = i2c_driver_init( i2c_dev_id ); + + //Reset the CPLD + ov2640_spi_write(0x07, 0x80); + DELAY_MS( 100 ); + ov2640_spi_write(0x07, 0x00); + DELAY_MS( 100 ); + + debug_printf("Arducam Rev: 0x%x\n", ov2640_spi_read( ARDUCAM_REV ) ); + + /* Test that SPI is functional */ + ov2640_spi_write( ARDUCAM_TEST_REG, 0xA5 ); + tmp = ov2640_spi_read( ARDUCAM_TEST_REG ); + if( tmp != 0xA5 ) + { + debug_printf("Test write or read to Arducam failed.\n"); + break; + } + + /* Test that I2C is functional */ + /* Switch to bank 1 */ + regop_res = ov2640_i2c_write_reg( 0xFF, 0x01 ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + break; + } + + /* Check vid, should be 0x26 for OV2640 */ + ov2640_i2c_read_reg( OV2640_CHIPID_HIGH, &tmp, ®op_res ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + break; + } + if( tmp != 0x26 ) + { + debug_printf("CHIPID_HIGH is not expected value for OV2640.\n"); + break; + } + + /* Check pid, pid should be 0x41 or 0x42 for OV2640 */ + ov2640_i2c_read_reg( OV2640_CHIPID_LOW, &tmp, ®op_res ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + break; + } + if( !( ( tmp == 0x41 ) || ( tmp == 0x42 ) ) ) + { + debug_printf("CHIPID_LOW is not expected value for OV2640.\n"); + break; + } + + ov2640_host_ctx.initialized = pdTRUE; + retval = pdTRUE; + } while( 0 ); - ov2640_host_ctx.spi_dev = spi_master_driver_init( - spi_dev_id, - 3*2, /* 6 DMA buffers */ - 0,/* This device's interrupts should happen on core 0 */ - 0, - NULL ); - - /* Camera supports 8 MHz max */ - spi_master_device_init( ov2640_host_ctx.spi_dev, - 0, 0, /* mode 0 */ - 8, /* 100 MHz / (8*2) / 2 = 3.125 MHz SPI clock */ - 3, /* 3 nanosecond cs to data minimum time */ - 0, /* no inter-byte setup delay required */ - 0 ); /* no last clock to cs delay required */ - - - ov2640_host_ctx.device_addr = OV2640_I2C_ADDR; - ov2640_host_ctx.i2c_dev = i2c_driver_init( i2c_dev_id ); - - //Reset the CPLD - ov2640_spi_write(0x07, 0x80); - DELAY_MS( 100 ); - ov2640_spi_write(0x07, 0x00); - DELAY_MS( 100 ); - - debug_printf("Arducam Rev: 0x%x\n", ov2640_spi_read( ARDUCAM_REV ) ); - - /* Test that SPI is functional */ - ov2640_spi_write( ARDUCAM_TEST_REG, 0xA5 ); - tmp = ov2640_spi_read( ARDUCAM_TEST_REG ); - configASSERT( tmp == 0xA5 ); /* Test write or read failed */ - - /* Test that I2C is functional */ - /* Switch to bank 1 */ - regop_res = ov2640_i2c_write_reg( 0xFF, 0x01 ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); - - /* Check vid, should be 0x26 for OV2640 */ - ov2640_i2c_read_reg( OV2640_CHIPID_HIGH, &tmp, ®op_res ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); - configASSERT( tmp == 0x26 ); - - /* Check pid, pid should be 0x41 or 0x42 for OV2640 */ - ov2640_i2c_read_reg( OV2640_CHIPID_LOW, &tmp, ®op_res ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); - configASSERT( ( tmp == 0x41 ) || ( tmp == 0x42 ) ); - - ov2640_host_ctx.initialized = pdTRUE; + return retval; } -void ov2640_configure() +int32_t ov2640_configure() { + int32_t retval = pdFALSE; i2c_regop_res_t regop_res; - configASSERT( ov2640_host_ctx.initialized ); + do + { + if( !ov2640_host_ctx.initialized ) + { + debug_printf("ov2640 context has not been initialized.\n"); + break; + } - /* Reset the sensor */ - regop_res = ov2640_i2c_write_reg( 0xFF, 0x01 ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); - regop_res = ov2640_i2c_write_reg( 0x12, 0x80 ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); + /* Reset the sensor */ + regop_res = ov2640_i2c_write_reg( 0xFF, 0x01 ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + break; + } + regop_res = ov2640_i2c_write_reg( 0x12, 0x80 ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + break; + } - DELAY_MS( 100 ); + DELAY_MS( 100 ); - /* Write sensor program */ - ov2640_reg_jpeg_init(); - ov2640_reg_yuv(); - ov2640_reg_no_jpeg_compression(); + /* Write sensor program */ + ov2640_reg_jpeg_init(); + ov2640_reg_yuv(); + ov2640_reg_no_jpeg_compression(); - regop_res = ov2640_i2c_write_reg( 0xff, 0x01 ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); - regop_res = ov2640_i2c_write_reg( 0x15, 0x00 ); - configASSERT( regop_res == I2C_REGOP_SUCCESS ); + regop_res = ov2640_i2c_write_reg( 0xff, 0x01 ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + break; + } + regop_res = ov2640_i2c_write_reg( 0x15, 0x00 ); + if( regop_res != I2C_REGOP_SUCCESS ) + { + debug_printf("I2C operation failed.\n"); + break; + } - ov2640_reg_96x96_jpeg(); + ov2640_reg_96x96_jpeg(); - /* Set Arducam mode */ - ov2640_spi_write( ARDUCAM_MODE_REG, ARDUCAM_MODE_MCU2LCD ); + /* Set Arducam mode */ + ov2640_spi_write( ARDUCAM_MODE_REG, ARDUCAM_MODE_MCU2LCD ); + retval = pdTRUE; + } while( 0 ); + + return retval; } diff --git a/examples/freertos/person_detection/app/ov2640/ov2640.h b/examples/freertos/person_detection/app/ov2640/ov2640.h index 61163aa93..d5d8bdbe4 100644 --- a/examples/freertos/person_detection/app/ov2640/ov2640.h +++ b/examples/freertos/person_detection/app/ov2640/ov2640.h @@ -43,8 +43,8 @@ #define ARDUCAM_BURST_FIFO_READ 0x3C #define ARDUCAM_SINGLE_FIFO_READ 0x3D -void ov2640_init( int32_t spi_dev_id, int32_t i2c_dev_id ); -void ov2640_configure(); +int32_t ov2640_init( int32_t spi_dev_id, int32_t i2c_dev_id ); +int32_t ov2640_configure(); void ov2640_flush_fifo(); void ov2640_clear_fifo_flag(); diff --git a/examples/freertos/person_detection/app/spi_camera/spi_camera.c b/examples/freertos/person_detection/app/spi_camera/spi_camera.c index 9f99aa208..1a68f1513 100644 --- a/examples/freertos/person_detection/app/spi_camera/spi_camera.c +++ b/examples/freertos/person_detection/app/spi_camera/spi_camera.c @@ -60,17 +60,31 @@ static void camera_task( void *arg ) } } -static void setup() +static int32_t setup() { - ov2640_init( BITSTREAM_SPI_DEVICE_A, BITSTREAM_I2C_DEVICE_A ); - ov2640_configure(); + int32_t retval = pdFALSE; + + retval = ov2640_init( BITSTREAM_SPI_DEVICE_A, BITSTREAM_I2C_DEVICE_A ); + + if( retval == pdTRUE ) + { + retval = ov2640_configure(); + } + + return retval; } -void create_spi_camera_to_queue( UBaseType_t priority, QueueHandle_t q_output ) +int32_t create_spi_camera_to_queue( UBaseType_t priority, QueueHandle_t q_output ) { + int32_t retval = pdFALSE; + /* Setup camera */ - setup(); + if( setup() == pdTRUE ) + { + /* Create camera task to take images and feed them to queue */ + xTaskCreate( camera_task, "camera", portTASK_STACK_DEPTH( camera_task ), q_output , priority, NULL ); + retval = pdTRUE; + } - /* Create camera task to take images and feed them to queue */ - xTaskCreate( camera_task, "camera", portTASK_STACK_DEPTH( camera_task ), q_output , priority, NULL ); + return retval; } diff --git a/examples/freertos/person_detection/app/spi_camera/spi_camera.h b/examples/freertos/person_detection/app/spi_camera/spi_camera.h index 0c709c68d..19cb997a7 100644 --- a/examples/freertos/person_detection/app/spi_camera/spi_camera.h +++ b/examples/freertos/person_detection/app/spi_camera/spi_camera.h @@ -6,6 +6,6 @@ /* Read buffer must be large enough for 16bit 96x96 image, plus 1 for burst command */ #define IMAGE_BUF_SIZE ((96*96*2) + 1) -void create_spi_camera_to_queue( UBaseType_t priority, QueueHandle_t q_output ); +BaseType_t create_spi_camera_to_queue( UBaseType_t priority, QueueHandle_t q_output ); #endif /* SPI_CAMERA_H_ */ diff --git a/examples/freertos/person_detection/inference_engine/src/person_detect_model.c b/examples/freertos/person_detection/inference_engine/src/person_detect_model.c index 0ba98dadc..2426c5968 100644 --- a/examples/freertos/person_detection/inference_engine/src/person_detect_model.c +++ b/examples/freertos/person_detection/inference_engine/src/person_detect_model.c @@ -21,7 +21,7 @@ __attribute__((section(".SwMem_data"))) #elif USE_EXTMEM __attribute__((section(".ExtMem_data"))) #endif -const unsigned char person_detect_model[] DATA_ALIGN_ATTRIBUTE = { +unsigned char person_detect_model[] DATA_ALIGN_ATTRIBUTE = { 0x1c, 0x00, 0x00, 0x00, 0x54, 0x46, 0x4c, 0x33, 0x00, 0x00, 0x12, 0x00, 0x1c, 0x00, 0x18, 0x00, 0x14, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, diff --git a/examples/freertos/person_detection/inference_engine/src/person_detect_model.h b/examples/freertos/person_detection/inference_engine/src/person_detect_model.h index 852e74883..8ab6e54ee 100644 --- a/examples/freertos/person_detection/inference_engine/src/person_detect_model.h +++ b/examples/freertos/person_detection/inference_engine/src/person_detect_model.h @@ -9,7 +9,7 @@ #ifndef PERSON_DETECT_MODEL_H_ #define PERSON_DETECT_MODEL_H_ -extern const unsigned char person_detect_model[]; +extern unsigned char person_detect_model[]; extern const int person_detect_model_len; #endif // PERSON_DETECT_MODEL_H_