Skip to content

Commit

Permalink
Merge pull request #344 from sonydevworld/develop
Browse files Browse the repository at this point in the history
Merge develop into master for v2.4.0 release
  • Loading branch information
SPRESENSE committed Dec 24, 2021
2 parents e7b66ec + 2704755 commit 5965459
Show file tree
Hide file tree
Showing 254 changed files with 19,267 additions and 3,919 deletions.
86 changes: 83 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,84 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

-----------------------------------------------------------------------

nuttx/boards/arm/cxd56xx/common/src/cxd56_wiznet.c
nuttx/boards/arm/cxd56xx/spresense/include/cxd56_wiznet.h
nuttx/drivers/net/wiznet/wiznet.c
nuttx/include/nuttx/net/wiznet.h
nuttx/drivers/net/wiznet/wiz_common.c
nuttx/drivers/net/wiznet/wiz_common.h

BSD-3-Clause
-----------------------------------------------------------------------

Copyright 2020 Sony Corporation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of Sony 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
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

-----------------------------------------------------------------------

examples/websocket_bitbank
examples/websocket_gmocoin

BSD-3-Clause
-----------------------------------------------------------------------

Copyright 2021 Sony Group Corporation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of Sony Group 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
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

========================================================================

nuttx/arch/arm/include/cxd56xx
Expand Down Expand Up @@ -1424,6 +1502,8 @@ externals/cmsis/CMSIS_5/LICENSE.txt
externals/cmsis/nn

Copyright (C) 2010-2018 Arm Limited or its affiliates. All rights reserved.
Copyright (C) 2009-2016 Arm Limited. All rights reserved.
Copyright (c) 2016 ARM Germany GmbH. All rights reserved.
Copyright 2018 Sony Corporation

------------------------------------------------------------------------
Expand All @@ -1446,7 +1526,8 @@ externals/nnablart/nnabla-c-runtime
a original LICENSE description for above codes places under the following path.
externals/nnabla-c-runtime/LICENSE

Copyright 2017, 2018, 2019, 2020 Sony Corporation
Copyright 2017, 2018, 2019, 2020, 2021 Sony Corporation
Copyright 2021 Sony Group Corporation

========================================================================

Expand All @@ -1460,7 +1541,7 @@ externals/alt_stubs/mbedtls/include/mbedtls
Unless specifically indicated otherwise in a file, files are licensed
under the Apache 2.0 license.

Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
Copyright (C) 2006-2016, ARM Limited, All Rights Reserved

========================================================================

Expand Down Expand Up @@ -1542,4 +1623,3 @@ This software includes open source software subject to the licensing
described in the following file:

externals/websocket/cwebsocket/LICENSE

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![twitter spresense handle][]][twitter spresense badge]
[![twitter devworld handle][]][twitter devworld badge]

# Spresense SDK repository

Clone this repository and update submodules.
Expand Down Expand Up @@ -71,3 +74,8 @@ $ make

A `nuttx.spk` file appears in the `sdk` folder when this step has successfully finished.
This file is the final result and can be flashed into the your board.

[twitter spresense handle]: https://img.shields.io/twitter/follow/SpresensebySony?style=social&logo=twitter
[twitter spresense badge]: https://twitter.com/intent/follow?screen_name=SpresensebySony
[twitter devworld handle]: https://img.shields.io/twitter/follow/SonyDevWorld?style=social&logo=twitter
[twitter devworld badge]: https://twitter.com/intent/follow?screen_name=SonyDevWorld
2 changes: 1 addition & 1 deletion examples/asmp/worker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SUBDIRS = $(dir $(WORKER_ELFS))

define DIR_template
$(1)_$(2):
$(Q) $(MAKE) -C $(1) $(3) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" SDKDIR="$(SDKDIR)" CROSSDEV=$(CROSSDEV)
+$(Q) $(MAKE) -C $(1) $(3) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" SDKDIR="$(SDKDIR)" CROSSDEV=$(CROSSDEV)
endef

.PHONY: lib depend clean
Expand Down
14 changes: 14 additions & 0 deletions examples/dnnrt_lenet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,17 @@ MAINSRC = dnnrt_lenet_main.c
CSRCS = loader_nnb.c pnm_util.c

include $(APPDIR)/Application.mk

ifeq ($(CONFIG_DNN_RT_MPCOMM),y)

build_worker:
@$(MAKE) -C worker TOPDIR="$(TOPDIR)" SDKDIR="$(SDKDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)

$(OBJS): build_worker

clean:: clean_worker

clean_worker:
@$(MAKE) -C worker TOPDIR="$(TOPDIR)" SDKDIR="$(SDKDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV) clean

endif
20 changes: 11 additions & 9 deletions examples/dnnrt_lenet/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Detailed instructions for this operation are available in the following page:

https://developer.sony.com/develop/spresense/docs/sdk_developer_guide_en.html#_dnn_runtime

The example file of `lenet-5.nnb` is provided in `examples/dnnrt_lenet/lenet-5/model`.

### file arrangement on SD card:

First, copy a directory, `examples/dnnrt_lenet/lenet-5/`, onto the root of SD card as below.
Expand All @@ -39,13 +41,13 @@ You can confirm actual images by `display` command in ImageMagick, etc.

```
$ cd Spresense.git/examples/dnnrt_lenet/
$ cp -r lenet-5 <sd mount point>
$ cp lenet-5/data/* <sd mount point>
```

Next, locate `lenet-5.nnb` inside a neighboring directory, `lenet-5/model/`.
Next, copy `lenet-5.nnb` into SD card.

```
$ cp <somewhere>/lenet-5.nnb <sd mount point>/lenet-5/model/
$ cp <somewhere>/lenet-5.nnb <sd mount point>
```

### command usage:
Expand Down Expand Up @@ -82,9 +84,9 @@ Then, you can refer to `output[0-9]` as probabilities that each digit is drawn.
In this example, since you feed `3.pgm`, the corresponding `output[3]` should be almost 1.0.

```
nsh> dnnrt_lenet /mnt/sd0/lenet-5/model/lenet-5.nnb /mnt/sd0/lenet-5/data/3.pgm
load nnb file: /mnt/sd0/lenet-5/model/lenet-5.nnb
load pnm image: /mnt/sd0/lenet-5/data/3.pgm # 3 is hand-written
nsh> dnnrt_lenet /mnt/sd0/lenet-5.nnb /mnt/sd0/3.pgm
load nnb file: /mnt/sd0/lenet-5.nnb
load pnm image: /mnt/sd0/3.pgm # 3 is hand-written
normalization: divide image data by 255.0 # normalization is done in the application-side
...
start dnn_runtime_forward()
Expand Down Expand Up @@ -114,9 +116,9 @@ These outputs are difficult for humans to understand at a glance,
but you can regard an index of the largest element as a classification result as well as the above case.

```
nsh> dnnrt_lenet -s /mnt/sd0/lenet-5/model/lenet-5.nnb /mnt/sd0/lenet-5/data/3.pgm
load nnb file: /mnt/sd0/lenet-5/model/lenet-5.nnb
load pnm image: /mnt/sd0/lenet-5/data/3.pgm # 3 is hand-written
nsh> dnnrt_lenet -s /mnt/sd0/lenet-5.nnb /mnt/sd0/3.pgm
load nnb file: /mnt/sd0/lenet-5.nnb
load pnm image: /mnt/sd0/3.pgm # 3 is hand-written
normalization: skipped # the application-side is NOT involved in normalization
...
output[0]=-21.355482
Expand Down
2 changes: 0 additions & 2 deletions examples/dnnrt_lenet/lenet-5/model/.gitignore

This file was deleted.

Binary file added examples/dnnrt_lenet/lenet-5/model/lenet-5.nnb
Binary file not shown.
57 changes: 57 additions & 0 deletions examples/dnnrt_lenet/worker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
############################################################################
# dnnrt_lenet/worker/Makefile
#
# Copyright 2021 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 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
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################

WORKER_ELFS = dnnrt-mp/DNNRT-MP

SUBDIRS = $(dir $(WORKER_ELFS))

define DIR_template
$(1)_$(2):
+$(Q) $(MAKE) -C $(1) $(3) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" SDKDIR="$(SDKDIR)" CROSSDEV=$(CROSSDEV)
endef

.PHONY: clean
all: $(WORKER_ELFS)

# Build workers

$(WORKER_ELFS):
$(Q) $(MAKE) -C $(dir $@) TOPDIR="$(TOPDIR)" SDKDIR="$(SDKDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)

# Clean each subdirectory

clean: $(foreach DIR, $(SUBDIRS), $(DIR)_clean)

$(foreach DIR, $(SUBDIRS), $(eval $(call DIR_template,$(DIR),clean,clean)))
1 change: 1 addition & 0 deletions examples/dnnrt_lenet/worker/dnnrt-mp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DNNRT-MP
59 changes: 59 additions & 0 deletions examples/dnnrt_lenet/worker/dnnrt-mp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
############################################################################
# dnnrt_lenet/worker/dnnrt-mp/Makefile
#
# Copyright 2021 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 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
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################

include $(APPDIR)/Make.defs
-include $(SDKDIR)/Make.defs

BIN = DNNRT-MP
WORKER_DIR = $(SDKDIR)$(DELIM)modules$(DELIM)dnnrt$(DELIM)src-mpcomm$(DELIM)worker
WORKER = $(WORKER_DIR)$(DELIM)dnnrt-mp$(DELIM)$(BIN)

.PHONY: depend clean distclean
all: $(BIN)

depend:
$(Q) $(MAKE) -C $(WORKER_DIR) TOPDIR="$(TOPDIR)" SDKDIR="$(SDKDIR)" depend

$(WORKER): depend
$(Q) $(MAKE) -C $(WORKER_DIR) TOPDIR="$(TOPDIR)" SDKDIR="$(SDKDIR)" APPDIR="$(APPDIR)"

$(BIN): $(WORKER)
$(Q) install $< $@

clean:
$(call DELFILE, $(BIN))
$(call CLEAN)

distclean: clean
2 changes: 1 addition & 1 deletion examples/fwupdate/fwupdate_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static enum fw_type_e get_file_type(char *pathname)
{
return FW_APP;
}
else if (0 == strncasecmp(filename, "bcm20706fw", 10))
else if (0 == strncasecmp(filename, "sysutil", 7))
{
return FW_APP;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/fwupdate/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ get_fw_type () {
filename=`basename $1`
case "$filename" in
nuttx*) echo "0" ;;
bcm20706fw*) echo "0" ;;
sysutil*) echo "0" ;;
sbl*) echo "3" ;;
updater*|usb*) echo "2" ;;
*) echo "1" ;;
Expand Down
5 changes: 5 additions & 0 deletions examples/lte_awsiot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# lte_awsiot/Makefile
#
# Copyright 2019 Sony Corporation
# Copyright 2021 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -36,6 +37,10 @@
include $(APPDIR)/Make.defs
include $(SDKDIR)/Make.defs

# configurations for awsiot
AWSIOTDIR = $(SDKDIR)$(DELIM)..$(DELIM)externals$(DELIM)awsiot
include $(AWSIOTDIR)/awsiot_config.mk

# lte_awsiot built-in application info

PROGNAME = $(CONFIG_EXAMPLES_LTE_AWSIOT_PROGNAME)
Expand Down
Loading

0 comments on commit 5965459

Please sign in to comment.