Skip to content

Commit

Permalink
Merge pull request #56 from SPRESENSE/release-v2.0.2
Browse files Browse the repository at this point in the history
Merge release-v2.0.2 into master for v2.0.2 release
  • Loading branch information
SPRESENSE committed Sep 18, 2020
2 parents 0b57a4b + a479f86 commit db97cb3
Show file tree
Hide file tree
Showing 25 changed files with 428 additions and 324 deletions.
9 changes: 5 additions & 4 deletions examples/bluetooth_a2dp_snk/Make.defs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################################################################
# bluetooth_a2dp_snk/Make.defs
#
# Copyright (C) 2019 Sony Corporation. All rights reserved.
# Copyright 2018 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand All @@ -13,9 +13,10 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor Sony nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
# 3. Neither the name of Sony Semiconductor Solutions Corporation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Expand Down
9 changes: 5 additions & 4 deletions examples/bluetooth_hfp_hf/Make.defs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################################################################
# bluetooth_hfp_hf/Make.defs
#
# Copyright (C) 2018 Sony Corporation. All rights reserved.
# Copyright 2018 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand All @@ -13,9 +13,10 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor Sony nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
# 3. Neither the name of Sony Semiconductor Solutions Corporation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Expand Down
2 changes: 1 addition & 1 deletion examples/proximity/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ examples/proximity

Example Configuration:

CONFIG_EXAMPLES_PROXIMITY - Enable magnetometer sensor example
CONFIG_EXAMPLES_PROXIMITY - Enable proximity sensor example
CONFIG_EXAMPLES_PROXIMITY_PROGNAME - Program name.
CONFIG_EXAMPLES_PROXIMITY_PRIORITY - Example priority. Default: 100
CONFIG_EXAMPLES_PROXIMITY_STACKSIZE - Example stack size. Default: 2048
Expand Down
38 changes: 0 additions & 38 deletions externals/LibTarget.mk

This file was deleted.

4 changes: 2 additions & 2 deletions firmware/spresense/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"BoardName": "SPRESENSE",
"LoaderVersion": "v2.0.0",
"DownloadURL": "https://developer.sony.com/file/download/download-spresense-firmware-v2-0-000"
"LoaderVersion": "v2.0.2",
"DownloadURL": "https://developer.sony.com/file/download/download-spresense-firmware-v2-0-002"
}
1 change: 1 addition & 0 deletions sdk/configs/device/proximity/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This configuration contains required options to use proximity sensor device.
File renamed without changes.
1 change: 0 additions & 1 deletion sdk/configs/device/proxymity/README.txt

This file was deleted.

1 change: 1 addition & 0 deletions sdk/configs/examples/dnnrt_lenet/defconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
+CXD56_SDIO=y
+DNN_RT=y
+EXAMPLES_DNNRT_LENET=y
+EXTERNALS_CMSIS=y
7 changes: 6 additions & 1 deletion sdk/modules/asmp/mm_tile/mm_tilealloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ static FAR void *tile_common_alloc(FAR struct tile_s *priv, size_t size,
unsigned int ntiles;
unsigned int step;

DEBUGASSERT(priv);
if (!priv)
{
/* If the tile heap structure is none, memory cannot be allocated */

return NULL;
}

if (size == 0)
{
Expand Down
7 changes: 7 additions & 0 deletions sdk/modules/asmp/mm_tile/mm_tilefree.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ void tile_free(FAR void *memory, size_t size)
FAR struct tile_s *priv = g_tileinfo;
size_t tsize;

if (!priv)
{
/* If the tile heap structure is none, do nothing */

return;
}

tile_common_free(priv, memory, size);

/* Power off free tiles */
Expand Down
8 changes: 7 additions & 1 deletion sdk/modules/asmp/mm_tile/mm_tileinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ tile_common_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2tile)
* than or equal to the alignment size.
*/

DEBUGASSERT(heapstart && heapsize > 0 &&
DEBUGASSERT(heapstart && heapsize >= 0 &&
log2tile > 0 && log2tile < 32);

if (log2tile != 16 && log2tile != 17)
Expand All @@ -103,6 +103,12 @@ tile_common_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2tile)
return NULL;
}

if (heapsize == 0)
{
terr("Tile heap area is empty.\n");
return NULL;
}

/* Allocate exact size of the structure, tile allocator supports less than
* or equal to 32 tiles for now.
*/
Expand Down
7 changes: 5 additions & 2 deletions sdk/modules/asmp/mm_tile/mm_tilerelease.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ static inline void tile_release_common(FAR struct tile_s *priv)

void tile_release(void)
{
tile_release_common(g_tileinfo);
g_tileinfo = NULL;
if (g_tileinfo)
{
tile_release_common(g_tileinfo);
g_tileinfo = NULL;
}
}

#endif /* CONFIG_MM_TILE */
12 changes: 5 additions & 7 deletions sdk/modules/asmp/supervisor/mpshm.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,11 @@ void mpshm_initialize(void)

ASSERT((MM_TILE_BASE & 0x1ffff) == 0);

if (MM_TILE_SIZE > 0) {
ret = tile_initialize((void *)MM_TILE_BASE, MM_TILE_SIZE, MPSHM_TILE_ALIGN);
if (ret < 0)
{
mperr("Tile memory initialization failure.\n");
}
}
ret = tile_initialize((void *)MM_TILE_BASE, MM_TILE_SIZE, MPSHM_TILE_ALIGN);
if (ret < 0)
{
mperr("Tile memory initialization failure.\n");
}

/* Clear virtual address mapping except first 64KB block.
* Because first virtual address is necessary for wake up from hot sleep.
Expand Down
16 changes: 8 additions & 8 deletions sdk/modules/fwuputils/manager/fwup_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static int fwup_init(void)
{
int ret = 0;

ret = UM_Init(false);
ret = fw_um_init(false);

return ret;
}
Expand Down Expand Up @@ -142,7 +142,7 @@ static int fwup_open(enum fw_type_e fwtype, uint32_t fwsize)
return ret;
}

mgr->handle = UM_Open(keyfile, fwsize, type);
mgr->handle = fw_um_open(keyfile, fwsize, type);
mgr->remain = fwsize;

return ret;
Expand All @@ -153,7 +153,7 @@ static int fwup_write(void *data, uint32_t size)
int ret = 0;
struct fwup_mgr_s *mgr = get_manager();

ret = UM_Commit(mgr->handle, data, size);
ret = fw_um_commit(mgr->handle, data, size);

mgr->remain -= size;

Expand All @@ -165,7 +165,7 @@ static int fwup_close(void)
int ret = 0;
struct fwup_mgr_s *mgr = get_manager();

ret = UM_Close(mgr->handle);
ret = fw_um_close(mgr->handle);
mgr->remain = 0;

return ret;
Expand Down Expand Up @@ -211,7 +211,7 @@ static int fwup_update(void)
{
int ret = 0;

ret = UM_DoUpdateSequence();
ret = fw_um_doupdatesequence();

return ret;
}
Expand All @@ -220,7 +220,7 @@ static int fwup_suspend(void)
{
int ret = 0;

ret = UM_CheckPoint();
ret = fw_um_checkpoint();

return ret;
}
Expand All @@ -229,14 +229,14 @@ static int fwup_resume(void)
{
int ret = 0;

ret = UM_Init(true);
ret = fw_um_init(true);

return ret;
}

static int fwup_abort(void)
{
//UM_Abort();
//fw_um_abort();
return 0;
}

Expand Down
18 changes: 9 additions & 9 deletions sdk/modules/fwuputils/manager/sys_update_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ typedef void * UM_Handle;
/**
* Initialize Update Manager
*
* @param[in] need_recovery: true to need recovery from check point. see UM_CheckPoint().
* @param[in] need_recovery: true to need recovery from check point. see fw_um_checkpoint().
*
* @return 0 on success, otherwise error
* @retval -ENOMEM: memory allocation failure
Expand All @@ -83,7 +83,7 @@ typedef void * UM_Handle;
* @par Reentrant
* No
*/
int UM_Init(bool need_recovery);
int fw_um_init(bool need_recovery);

/**
* Create update manager object for scheduling firmware will be update.
Expand All @@ -101,7 +101,7 @@ int UM_Init(bool need_recovery);
* @par Reentrant
* Yes
*/
UM_Handle UM_Open(const char *keyfile, uint32_t filesize, uint32_t type);
UM_Handle fw_um_open(const char *keyfile, uint32_t filesize, uint32_t type);

/**
* Commit firmware data.
Expand All @@ -123,7 +123,7 @@ UM_Handle UM_Open(const char *keyfile, uint32_t filesize, uint32_t type);
* @par Reentrant
* Yes
*/
int UM_Commit(UM_Handle handle, const void *data, uint32_t size);
int fw_um_commit(UM_Handle handle, const void *data, uint32_t size);

/**
* Close and delete update manager object.
Expand All @@ -146,13 +146,13 @@ int UM_Commit(UM_Handle handle, const void *data, uint32_t size);
* @par Reentrant
* Yes
*/
int UM_Close(UM_Handle handle);
int fw_um_close(UM_Handle handle);

/**
* Create recovery check point.
*
* User can use this feature to stop downloading (also shutdown).
* Pass true to need_recovery on UM_Init() to restart downloading,
* Pass true to need_recovery on fw_um_init() to restart downloading,
* all of closed objects are scheduled again until this check point.
*
* Check point is always overwritten.
Expand All @@ -167,7 +167,7 @@ int UM_Close(UM_Handle handle);
* @par Reentrant
* Yes
*/
int UM_CheckPoint(void);
int fw_um_checkpoint(void);

/**
* Reboot and into update sequence.
Expand All @@ -178,7 +178,7 @@ int UM_CheckPoint(void);
* @attention This API force reboot immediately. User make sure to ready to
* shutting down. All of updating firmwares are must be closed.
*/
int UM_DoUpdateSequence(void);
int fw_um_doupdatesequence(void);

/**
* Abort update manager
Expand All @@ -188,7 +188,7 @@ int UM_DoUpdateSequence(void);
* User can be use this API to pause/resume or restart download sequence without
* heap dirty.
*/
void UM_Abort(void);
void fw_um_abort(void);

/** @} */

Expand Down
Loading

0 comments on commit db97cb3

Please sign in to comment.