rtos/tinyara.git
7 years agoexamples/sensorbd_demo: use poll() to detect button actions
Heesub Shin [Mon, 24 Apr 2017 00:32:09 +0000 (09:32 +0900)]
examples/sensorbd_demo: use poll() to detect button actions

Rather than reading /dev/gpioX repeatedly with timeouts, using poll()
would be better to show GPIO functionality.

Change-Id: Id3318d821d4fcedd640161d3238a981f507109cf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoexamples/sensorbd_demo: rename example source file
Heesub Shin [Mon, 24 Apr 2017 00:22:15 +0000 (09:22 +0900)]
examples/sensorbd_demo: rename example source file

This commit renames gpio_swtich.c to gpio_buttons.c.

Change-Id: I517a255f7133f27861fdedaf3d62afe5d37a4484
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoexamples/sensorbd_demo: fix a link error
Heesub Shin [Sun, 23 Apr 2017 09:39:19 +0000 (18:39 +0900)]
examples/sensorbd_demo: fix a link error

powfl() should be 'static inline' to avoid a link error as following:

    LD: tinyara
    /home/heesub/Documents/tinyara/os/../build/output/libraries/libapps.a(i2c_tcs34725.o): In function `tcs34725_calctemperature':
    /home/heesub/Documents/tinyara/apps/examples/sensorbd_demo/examples/i2c_tcs34725.c:169: undefined reference to `powfl'
    /home/heesub/Documents/tinyara/apps/examples/sensorbd_demo/examples/i2c_tcs34725.c:169: undefined reference to `powfl'
    Makefile:187: recipe for target '../build/output/bin/tinyara' failed
    make[1]: *** [../build/output/bin/tinyara] Error 1
    make[1]: Leaving directory '/home/heesub/Documents/tinyara/os/arch/arm/src'
    Makefile.unix:470: recipe for target 'pass2' failed

This commit fixes it.

Change-Id: Id2afe41992fcace21d79676efc2589a40f718845
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/gpio: s5j/gpio: rework gpio driver
Heesub Shin [Sun, 23 Apr 2017 02:05:44 +0000 (11:05 +0900)]
drivers/gpio: s5j/gpio: rework gpio driver

This commit rewrites upper- and lower-half GPIO drivers in completely
new. Overall, this results in a reduction of around 5K in the BSP binary
footprints:

    Before:
        text    data     bss     dec     hex filename
        4484     784       0    5268    1494 s5j_gpio.o
        2624       0     268    2892     b4c s5j_gpio_lowerhalf.o

    After:
        text    data     bss     dec     hex filename
        2448       0       0    2448     990 s5j_gpio.o
        1032       0       0    1032     408 s5j_gpio_lowerhalf.o

Change-Id: Iac4fc0f86130cde721a984929f8e0aafe3755d69
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/gpio: drop to support gpio export/unexport
Heesub Shin [Tue, 18 Apr 2017 04:49:56 +0000 (13:49 +0900)]
drivers/gpio: drop to support gpio export/unexport

Let's remove the feature that exports and unexports GPIO devices through
/dev/gpio_export and /dev/gpio_unexport. Nobody is using it.

Change-Id: Idf4364387efcf878384b55eedea03601e3ed3328
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: remove CONFIG_S5J_GPIO
Heesub Shin [Sun, 23 Apr 2017 02:06:27 +0000 (11:06 +0900)]
s5j/gpio: remove CONFIG_S5J_GPIO

In S5J, GPIO driver is controlling pinmux configuration for other
peripherals. Without it, the entire system cannot work. Thus, having
GPIO or not actually configurable. It should be enabled always. On the
other hands, the lower-half GPIO driver can be excluded from the
compilation when the upper-half driver is disabled.

Change-Id: I81b3d196b4e9091f86f2d9006ee37c020c8df5b9
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: remove to support GPIO_CMD_GET_XXX
Heesub Shin [Thu, 13 Apr 2017 13:56:34 +0000 (22:56 +0900)]
s5j/gpio: remove to support GPIO_CMD_GET_XXX

Now that the nobody use GPIO_CMD_GET_EDGE, GPIO_CMD_GET_DRIVE, and
GPIO_CMD_GET_DIRECTION, we can drop them.

Change-Id: I09e061f1d0386440a118d3e7f4f4db7090377a40
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: assign IRQ slot to each WEINT signal
Heesub Shin [Thu, 13 Apr 2017 13:24:29 +0000 (22:24 +0900)]
s5j/gpio: assign IRQ slot to each WEINT signal

Change-Id: I661bf9feec1c0d39d11947d257cbd339ced1514a
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: do not configure pinmux
Heesub Shin [Tue, 18 Apr 2017 05:56:22 +0000 (14:56 +0900)]
s5j/sflash: do not configure pinmux

As it is already configured at BL0/BL1/BL2 stages, we do not need to
configure pinmux for SFLASH again.

Change-Id: I627e59e3c9a04a3c770c893bc833d9cc042df3f5
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: drop to support button
Heesub Shin [Mon, 24 Apr 2017 05:14:16 +0000 (14:14 +0900)]
sidk_s5jt200: drop to support button

S5J does not support the lower-half driver for NuttX button. So, there
is no point in having the implementation of board_button_initialize() or
board_buttons(). Let's drop them.

Change-Id: Ic73e8884b11ed7a31b0c00bb83c10355a1310962
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoiotbus: do not query GPIO params already set
Heesub Shin [Thu, 13 Apr 2017 13:39:24 +0000 (22:39 +0900)]
iotbus: do not query GPIO params already set

There is no point in querying GPIO parameters that are already set. It
is redundant and unnecessary because the device structure always tracks
those information. Rather than querying GPIO driver, simply returning
values in the device structure will be enough.

This is a preparation step for redesigning GPIO layer.

Change-Id: Ic454d7d81b0d3f00bea41e1e1e9a2eb5a8e84504
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoexamples/sensorbd_demo: add adc example
Junhwan Park [Fri, 21 Apr 2017 02:34:17 +0000 (11:34 +0900)]
examples/sensorbd_demo: add adc example

Can not test adc with sensor board. This is because only ADC0-3 channels
are available. However, to test basic adc sampling I add this patch.

Change-Id: Id919b724ad8744b85ccec15469582cd91f4af2dd
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agobuiltin: fix tash builtin application
Junhwan Park [Thu, 20 Apr 2017 11:12:54 +0000 (20:12 +0900)]
builtin: fix tash builtin application

Fixed an issue where menuconfig would run abnormally when the registered
application was deleted again.

Change-Id: I5b75c06c273561adabd58aaf966239a2f6de85b4
Fixes: 3f9534358cc9 ("builtin: add tash builtin application")
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoartik053: add missing inclusion of s5j_adc.h
Junhwan Park [Fri, 21 Apr 2017 02:03:13 +0000 (11:03 +0900)]
artik053: add missing inclusion of s5j_adc.h

Otherwise, it triggers a compilation error.

Change-Id: Ia46b13acaee1d50094d071dff80da59c8833f410
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agonetutils/mdns: fix some defects
Wonsang Ryou [Thu, 20 Apr 2017 11:09:42 +0000 (20:09 +0900)]
netutils/mdns: fix some defects

This patch fixes the following defects in mdns.
  - uninitialized data can be read from local varible 'taile'.
  - pointer 'c_tail' can be dereferenced.
  - the return value of strstr() is not checked.

Change-Id: I0b7b47b52ed66ad80f9deacc56e5607a95def01b
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoexamples/mdns_test: fix link error
Wonsang Ryou [Thu, 20 Apr 2017 10:44:01 +0000 (19:44 +0900)]
examples/mdns_test: fix link error

This patch adds "#include <stdlib.h>" in order to fix the following
link error.

  mdns_main.c:206: undefined reference to `atoi'

Change-Id: I4a8efdecfdfc2dd8736f9754557e87db854d5a65
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agonet/tls: removes pthread macro in security api.
Junyeon LEE [Thu, 20 Apr 2017 09:11:06 +0000 (18:11 +0900)]
net/tls: removes pthread macro in security api.

This commit removes pthread lock and unlock macro in security api.
Because those macros are including return command, with those macro,
user can't release the allocate memory.

Change-Id: I740a31812106e0de941439000ae41c3d0809dc21
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/websocket: fixes minor issues in websocket
Junyeon LEE [Thu, 20 Apr 2017 08:32:37 +0000 (17:32 +0900)]
netutils/websocket: fixes minor issues in websocket

This commit fixes minor issues in websocket library.
 . clearify socket close routine
 . clearify the context compare

Change-Id: I9a6ccf5504f4615bdb5d737c96eaa46c73c1a58a
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutile/webserver: fixes mq_open returns
Junyeon LEE [Thu, 20 Apr 2017 06:55:12 +0000 (15:55 +0900)]
netutile/webserver: fixes mq_open returns

This commit fixes the return value of http_server_mq_open function.

Change-Id: I47feec16a98bebd40a504e8cdca5ba932fcc23c4
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexternal/wakaama: add an lwm2m server application
Seongeun Choi [Thu, 20 Apr 2017 00:59:28 +0000 (09:59 +0900)]
external/wakaama: add an lwm2m server application

This commit is initial commit to support lwm2mserver example.

Change-Id: Ib0134f3a816125858a7978633464134dcd567c6d
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
7 years agonetutils/webclient: fixes minor problem in wget_base
Junyeon LEE [Thu, 20 Apr 2017 07:42:39 +0000 (16:42 +0900)]
netutils/webclient: fixes minor problem in wget_base

This commit fixes minor two bugs in wget base function.
 . response structure has possible to be released twice
 . use uninitiailized entity data

Change-Id: Icd88b471ce11161b5f7366316759a3f762d1ee98
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/lwip: fix static analysis issues
EunBong Song [Thu, 20 Apr 2017 07:05:51 +0000 (16:05 +0900)]
net/lwip: fix static analysis issues

This patch fixes static analysis problem.

All credits should go to Simon Goldschmidt who wrote the original commit.

Change-Id: Ib40d786c9bce93c1c4a87ee0d42b74c2297545e6
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
[Song: backported 3f016fcc from LwIP]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonet/tls: fixes memory leakage in ecdh.c
Junyeon LEE [Thu, 20 Apr 2017 06:02:30 +0000 (15:02 +0900)]
net/tls: fixes memory leakage in ecdh.c

This commit fixes memory leakage error in tls/ecdh.c.

 . Dynamic memory referenced by 'ecc_pub.publickey_y' was allocated at
   ecdh.c:345 by calling function 'malloc' and lost at ecdh.c:348.

Change-Id: Iceff846e34a2acd94a323bc50a5a85ef6d498c16
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/dtls_client: support tash argument for testing
Junyeon LEE [Wed, 19 Apr 2017 09:55:37 +0000 (18:55 +0900)]
examples/dtls_client: support tash argument for testing

After this commit, dtls client example supports ip address input.

Change-Id: I869e5dc26a862486b2ab40694c5968b7ea03c9f0
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: improve error handling in mbedtls_dhm_calc_secret()
Junyeon LEE [Thu, 20 Apr 2017 07:00:02 +0000 (16:00 +0900)]
net/tls: improve error handling in mbedtls_dhm_calc_secret()

In case of ctx is NULL or output_size is specified less than expected,
we'd rather bail out earlier without bothering with
see_supported_dhm_size().

Change-Id: I222a7a997de2ce6e27d2525c86a5e6fc9557b147
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: introduction of easy_tls apis
Junyeon LEE [Tue, 18 Apr 2017 09:03:13 +0000 (18:03 +0900)]
net/tls: introduction of easy_tls apis

This commit is initial version of easy tls api. easy tls api
is for using and understanding ssl/tls library easily. Please
use mbedtls api directly for setting more details.

Supporting options
 . set authentication mode
 . set debug level
 . set host name
 . set server/client mode
 . select TLS/DTLS

Change-Id: I91292af7ef9b2f5b7773e098a0f8779977bf6882
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agosidk_s5jt200: support openocd 0.10
Jihoon Park [Thu, 20 Apr 2017 00:36:44 +0000 (09:36 +0900)]
sidk_s5jt200: support openocd 0.10

added openocd 0.10 version for sidk s5jt200 evaluation board, cmm for T
race 32 debug file will not be supported anymore.

Change-Id: I7a7fad9bbff22bd2f428583628f955b6469b9623
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agonetutils/wifi: reduce mutex scope in WiFiRegisterLinkCallback()
Siwon Kang [Wed, 19 Apr 2017 00:30:28 +0000 (09:30 +0900)]
netutils/wifi: reduce mutex scope in WiFiRegisterLinkCallback()

Unnecessary large scope of mutex in WiFiRegisterLinkCallback() gets
reduced. This also fixes deadlock issue caused by violation of
nested function call by registered callback function.

Change-Id: Ibb25a33784121a9f4a82aa61b4697358c298d8d0
Signed-off-by: Siwon Kang <sw0809.kang@samsung.com>
7 years agonetutils/ntpclient: modify debug message options
Wonsang Ryou [Wed, 19 Apr 2017 02:33:57 +0000 (11:33 +0900)]
netutils/ntpclient: modify debug message options

This patch removes the local debug options on the following messages
  - error messages of sendto() and recvfrom()
  - 'Set time' message

The above messages will be always shown when CONFIG_DEBUG_NET_ERROR
is enabled.

Change-Id: Ib06b356c00f148086955440210d4f2ca4d6533b1
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agosidk_s5jt200/sidk_tash_wlan: enable netdb dns client
Jin-Seong Kim [Wed, 19 Apr 2017 01:21:30 +0000 (10:21 +0900)]
sidk_s5jt200/sidk_tash_wlan: enable netdb dns client

This commit is to enable netdb dns client configuration
 - to fully support netdb library, dns client is needed

Change-Id: I5e28993ea7c472a0e9f102f7f3c25d26f9e8734f
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agosemaphore: keep errno unless an error occurs
EunBong Song [Wed, 19 Apr 2017 01:03:22 +0000 (10:03 +0900)]
semaphore: keep errno unless an error occurs

sem_wait() and sem_trywait() no longer modify the errno value UNLESS an
error occurs. This allows these functions to be used internally without
clobbering the errno value.

All credits should go to Freddie Chopin who wrote the original commit.

Change-Id: I6893cef28274f456bfeba553090821face23f930
Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: backported 484a1b61 from NuttX]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agosemaphore: do not overwrite errno in sem_timedwait()
EunBong Song [Wed, 19 Apr 2017 00:57:53 +0000 (09:57 +0900)]
semaphore: do not overwrite errno in sem_timedwait()

This patch fixes problem that the errno value was being overwritten by
subsequent actions so that the returned errno value was incorrect.
All credits should go to Gregory Nutt who wrote the original commit.

Change-Id: I6ed3177e471f3ecb7aa79ada88c64b3db867ec28
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: backported 127951e0 from NuttX]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoartik053/nettest: enable netdb dns client
Jin-Seong Kim [Wed, 19 Apr 2017 01:14:17 +0000 (10:14 +0900)]
artik053/nettest: enable netdb dns client

This commit is to enable netdb dns client configuration
 - to fully support netdb library, dns client is needed

Change-Id: I25eb00b3d75fa6b85cdbf654089501c5074154f0
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agos5j/serial: clean serial driver code
Junhwan Park [Mon, 17 Apr 2017 10:29:43 +0000 (19:29 +0900)]
s5j/serial: clean serial driver code

I removed unused pieces of code. And reduced code size. I will try to
further reduce ther code size in the future.

Change-Id: I7c4c3c334d1afad5a339b90ae7322375a5fffd3a
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoexamples/workqueue: fix incorrect function prototypes of the callbacks
Junhwan Park [Tue, 18 Apr 2017 01:58:55 +0000 (10:58 +0900)]
examples/workqueue: fix incorrect function prototypes of the callbacks

When using the work_queue function, you must register the callback
function in worker_t format.

Change-Id: I1738aa7c3730debe51daeae2f911b84ff2f55eec
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agonet: modify network Kconfig entries for System configurations
kang [Mon, 17 Apr 2017 06:32:55 +0000 (15:32 +0900)]
net: modify network Kconfig entries for System configurations

Configuration sync with TizenRT

Change-Id: Ic3870405503f212a368f23595b254cd406e83cc8
Signed-off-by: kang <pilseob.kang@samsung.com>
7 years agosensorbd_demo: apply builtin in Makefile
Junhwan Park [Wed, 19 Apr 2017 08:26:24 +0000 (17:26 +0900)]
sensorbd_demo: apply builtin in Makefile

Among the application programs, sensorbd_demo is the first builtin to be
applied.

Change-Id: I7d38dc190e433c9e25962e0cf259f090131f669c
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agobuiltin: add tash builtin application
Junhwan Park [Wed, 19 Apr 2017 03:58:08 +0000 (12:58 +0900)]
builtin: add tash builtin application

The existing tizenRT was made by tash_cmd_install command each time the
application was registered. When you apply this patch, menuconfig will
be able to register to tash as soon as you select it. However, when the
developer registers an application, the following format should be added
in the Makefile.

$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(APPNAME)_main,$(THREADEXEC))

context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat

Change-Id: I09e77e608e3dfeac5e14c7222105ae3404fd0039
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agosensorbd_demo: Use wildcards Make.defs
Junhwan Park [Tue, 18 Apr 2017 05:51:27 +0000 (14:51 +0900)]
sensorbd_demo: Use wildcards Make.defs

The 'Make.defs' file management policy in apps/examples has been
changed.

Change-Id: I821cc494f75fcb127a9094f46f97f2b24f3474a3
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoexamples/tls_client: parsing ARTIK cloud key and cert
Junyeon LEE [Mon, 17 Apr 2017 07:56:34 +0000 (16:56 +0900)]
examples/tls_client: parsing ARTIK cloud key and cert

This commit addes initialize routine to connect with ARTIK cloud and
releated definition.

Change-Id: I3402df30a3ec39ed1b29068dfc9940d30e73276a
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: remove unused configurations
Junyeon LEE [Mon, 17 Apr 2017 07:46:58 +0000 (16:46 +0900)]
net/tls: remove unused configurations

This commit removes HW_HASH and HW_ECDSA_SIGN in tls. HW_HASH has
no plan to support and HW_ECDSA_SIGN is only for creating ARTIK_CLOUD
session. Now that hardware based ECDSA sign will be done only if user
set the ARTIK key index in application. Except this case, ECDSA sign
will be done with software.

Change-Id: I844651e1311007381ee1917d5e014b66b3e918d9
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/websocket: fixes wrong buffer size of inet_ntop
Junyeon LEE [Mon, 17 Apr 2017 04:28:08 +0000 (13:28 +0900)]
netutils/websocket: fixes wrong buffer size of inet_ntop

This commit fixes wrong input size in inet_ntop and adds libc
dependency.

Change-Id: Ic9b567832b202209c1bb8aa9f5aef2c3e23cae4b
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoRevert "Update logm module"
ahreum.jeong [Tue, 2 May 2017 03:20:09 +0000 (12:20 +0900)]
Revert "Update logm module"

This reverts commit 179f2dacfb2f38fbb11a02f54f0768ac8fc6d2e0.

7 years agoUpdate logm module
ahreum.jeong [Tue, 2 May 2017 02:37:50 +0000 (11:37 +0900)]
Update logm module
 - Change logics of buffer usage
 - Add tash commands for logm configuration in run-time
 - Add prepending timestamp to messages

7 years agoMerge pull request #61 from Samsung/common_download
btheosam [Fri, 28 Apr 2017 12:05:19 +0000 (21:05 +0900)]
Merge pull request #61 from Samsung/common_download

refactoring download script

7 years agorefactoring download script
sunghan [Fri, 28 Apr 2017 11:58:01 +0000 (20:58 +0900)]
refactoring download script

7 years agocheck binary existence on flash procedure
sunghan [Fri, 28 Apr 2017 10:58:42 +0000 (19:58 +0900)]
check binary existence on flash procedure

7 years agoMerge pull request #60 from Samsung/common_download
btheosam [Fri, 28 Apr 2017 08:58:48 +0000 (17:58 +0900)]
Merge pull request #60 from Samsung/common_download

remove building when download is executed

7 years agoremove building when download is executed
sunghan [Fri, 28 Apr 2017 08:55:16 +0000 (17:55 +0900)]
remove building when download is executed

7 years agoMerge pull request #59 from Samsung/kernel_pm
sunghan-chang [Fri, 28 Apr 2017 05:49:44 +0000 (14:49 +0900)]
Merge pull request #59 from Samsung/kernel_pm

bug fix about power manager in pm.h

7 years agobug fix about power manager in pm.h
Jaesik [Fri, 28 Apr 2017 05:19:37 +0000 (14:19 +0900)]
bug fix about power manager in pm.h

it was written as a conditional statement,
and the ifndef was used incorrectly
change ifndef to if

Signed-off-by: Jaesik <jaesick.shin@samsung.com>
7 years agoMerge pull request #58 from Samsung/common_license
btheosam [Fri, 28 Apr 2017 04:25:13 +0000 (13:25 +0900)]
Merge pull request #58 from Samsung/common_license

Add LICENSE

7 years agoAdd LICENSE
sunghan [Fri, 28 Apr 2017 04:19:11 +0000 (13:19 +0900)]
Add LICENSE

7 years agoMerge pull request #57 from Samsung/dm_connectivity_branch
Taejun-Kwon [Thu, 27 Apr 2017 11:34:42 +0000 (20:34 +0900)]
Merge pull request #57 from Samsung/dm_connectivity_branch

[Title] Modified Kconfig in external to add DM WiFi settings

7 years ago[Title] Modified Kconfig in external to add DM WiFi settings
Venkatraman Iyer [Thu, 27 Apr 2017 11:31:10 +0000 (20:31 +0900)]
[Title] Modified Kconfig in external to add DM WiFi settings

[Description] WiFi settings for Device Management were defined under apps/examples folder. They are now moved to external folder where they should belong.

7 years agoMerge pull request #50 from Samsung/dm_connectivity_branch
Taejun-Kwon [Thu, 27 Apr 2017 11:08:24 +0000 (20:08 +0900)]
Merge pull request #50 from Samsung/dm_connectivity_branch

[Title] New DM connectivity APIs for WiFi start, DHCP and scan

7 years ago[Title] New DM connectivity APIs for WiFi start, DHCP and scan
Venkatraman Iyer [Mon, 24 Apr 2017 10:52:20 +0000 (19:52 +0900)]
[Title] New DM connectivity APIs for WiFi start, DHCP and scan

[Description] Added new APIs to DM module to start device in WiFi STA mode, perform DHCP and WiFi channel scans

7 years agoMerge pull request #46 from Samsung/common_make
sunghan-chang [Thu, 27 Apr 2017 09:59:20 +0000 (18:59 +0900)]
Merge pull request #46 from Samsung/common_make

Autogenerate Kconfig

7 years agoMerge pull request #56 from Samsung/Download_support
sunghan-chang [Thu, 27 Apr 2017 09:20:44 +0000 (18:20 +0900)]
Merge pull request #56 from Samsung/Download_support

Download script and support

7 years agoDownload script and support
bsvt [Thu, 27 Apr 2017 08:55:24 +0000 (17:55 +0900)]
Download script and support

7 years agoAutogenerate directory Kconfig
junmin kim [Sat, 15 Apr 2017 06:16:02 +0000 (23:16 -0700)]
Autogenerate directory Kconfig

1. Autogenerate target : Kconfig in apps, apps/examples, apps/netutils, apps/system
2. Add empty preconfig rules at leaf Makefiles
3. Move entry Kconfig
4. Autogenerate Kconfig_ENTRY

7 years agoMerge pull request #54 from Samsung/kernel_libtime
sunghan-chang [Thu, 27 Apr 2017 06:17:05 +0000 (15:17 +0900)]
Merge pull request #54 from Samsung/kernel_libtime

Add a description for clock_daysbeforemonth

7 years agoAdd a description for clock_daysbeforemonth
jc_.kim [Thu, 27 Apr 2017 05:59:23 +0000 (14:59 +0900)]
Add a description for clock_daysbeforemonth

Month starts from 0 to 11(Jan to Dec)

7 years agoMerge pull request #52 from heesub/fix-rtc
sunghan-chang [Thu, 27 Apr 2017 05:18:56 +0000 (14:18 +0900)]
Merge pull request #52 from heesub/fix-rtc

Fix rtc

7 years agos5j/rtc: initialize BCDYEAR at boot
Heesub Shin [Tue, 25 Apr 2017 14:50:52 +0000 (23:50 +0900)]
s5j/rtc: initialize BCDYEAR at boot

On power-on-reset, BCDYEAR in RTC is set to zero which means year 1900.
Since the date and time conversion functions can handle date only after
1970. We need to set BCDYEAR to something greater than that. Year 2010
seems reasonable.

Change-Id: If45985b13900a7de0b0cebc043119c4af94378bb
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/rtc: reset BCDMON and BCDDAY explicitly
Heesub Shin [Tue, 25 Apr 2017 14:23:09 +0000 (23:23 +0900)]
s5j/rtc: reset BCDMON and BCDDAY explicitly

BCDMON and BCDDAY are set to zero on power-on-reset, which is completely
invalid. This is a kind of hardware errata. Both should be initialized
to 1. This is problematic when we convert RTC time to timespec, because
it leads to underflow. To workaround this problem, we need to explicitly
initialize them to a valid value at boot.

Change-Id: Iab956102cb280211a8a17f9955f23c0e8132a937
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agolibc/time: fix incorrect time conversion
Heesub Shin [Tue, 25 Apr 2017 13:45:45 +0000 (22:45 +0900)]
libc/time: fix incorrect time conversion

Epoch timestamp is being converted to an incorrect date and time. For
example, clock_gettime() converts 1483228881 to '01 Feb 2017', but it
should be '01 Jan 2017'. The culprit is 1796a25e ("Correct a problem in
clock_gettime...") which was reverted at upstream already. We also need
to revert it.

Change-Id: I6b7d5b1e89a4432bc1eedebc72e090acdb59f04e
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 57ad019f from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoMerge pull request #51 from Samsung/kernel_os/drivers
Taejun-Kwon [Wed, 26 Apr 2017 07:22:05 +0000 (16:22 +0900)]
Merge pull request #51 from Samsung/kernel_os/drivers

Fix typos in files of os/drivers

7 years agoFix typos in files of os/drivers
Chanhee [Tue, 25 Apr 2017 06:17:03 +0000 (15:17 +0900)]
Fix typos in files of os/drivers

typo: numer -> number, attribtes -> attributes

7 years agoMerge pull request #48 from Samsung/common
btheosam [Fri, 21 Apr 2017 04:24:03 +0000 (13:24 +0900)]
Merge pull request #48 from Samsung/common

Common

7 years agofix violations of coding style
sunghan [Fri, 21 Apr 2017 02:25:22 +0000 (11:25 +0900)]
fix violations of coding style

7 years agoMerge pull request #49 from heesub/fix-artik053
sunghan-chang [Fri, 21 Apr 2017 02:37:54 +0000 (11:37 +0900)]
Merge pull request #49 from heesub/fix-artik053

Fix artik053

7 years agowpa_supplicant: ignore Make.defs if it does not exist
Heesub Shin [Thu, 20 Apr 2017 16:15:49 +0000 (01:15 +0900)]
wpa_supplicant: ignore Make.defs if it does not exist

Use the '-include' directive instead of 'include' to suppress error
messages from make as following:

    make[2]: Entering directory '/home/heesub/Documents/tinyara/apps/wpa_supplicant'
    Makefile:36: /home/heesub/Documents/tinyara/os/Make.defs: No such file or directory
    make[2]: *** No rule to make target '/home/heesub/Documents/tinyara/os/Make.defs'.  Stop.
    make[2]: Leaving directory '/home/heesub/Documents/tinyara/apps/wpa_supplicant'
    Makefile:107: recipe for target 'wpa_supplicant/_clean' failed
    make[1]: *** [wpa_supplicant/_clean] Error 2

I am not sure that including Make.defs at $(TOPDIR) is really necessary.
Otherwise, it might be better to remove the inclusion.

Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoexamples/iperf: fix a compilation error
Heesub Shin [Thu, 20 Apr 2017 16:13:25 +0000 (01:13 +0900)]
examples/iperf: fix a compilation error

When compiling iperf_tcp_info.c, compiler complains:

CC: iperf_tcp_info.c
    In file included from /usr/include/newlib/machine/endian.h:5:0,
                     from /usr/include/newlib/sys/param.h:7,
                     from iperf_tcp_info.c:65:
    /usr/include/newlib/sys/_types.h:168:5: error: unknown type name 'wint_t'
         wint_t __wch;
         ^
    Makefile:80: recipe for target 'iperf_tcp_info.o' failed
    make[2]: *** [iperf_tcp_info.o] Error 1
    make[2]: Leaving directory '/home/heesub/Documents/tinyara/apps/examples/iperf'
    Makefile:103: recipe for target 'examples/iperf_all' failed
    make[1]: *** [examples/iperf_all] Error 2
    make[1]: Leaving directory '/home/heesub/Documents/tinyara/apps'
    LibTargets.mk:149: recipe for target '../apps/libapps.a' failed
    make: *** [../apps/libapps.a] Error 2

It is strange that we have never seen this error before and hard to
figure out why it is happening at this time. Simply removing the
inclusion of param.h fixes this issue.

Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/net: fix trivial Kconfig syntax error
Heesub Shin [Thu, 20 Apr 2017 15:56:06 +0000 (00:56 +0900)]
drivers/net: fix trivial Kconfig syntax error

Numerical range in Kconfig do not need to have a comma between start and
end value [1]. This commit fixes weird warnings that 'make menuconfig'
spits out as following:

    drivers/net/Kconfig:130:warning: ignoring unsupported character ','
    drivers/net/Kconfig:199:warning: ignoring unsupported character ','

[1] https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt

Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agomodify file permission to 644
sunghan [Thu, 20 Apr 2017 13:32:45 +0000 (22:32 +0900)]
modify file permission to 644

*.c, *.h, defconfig, Make.defs, Kconfig

7 years agomodify README for ARTIK 053
sunghan [Thu, 20 Apr 2017 13:28:16 +0000 (22:28 +0900)]
modify README for ARTIK 053

That means that we need to program (flash) binaries, not prepare binaries.

7 years agoMerge pull request #47 from Samsung/ARTIK053
Juitem JoonWoo Kim [Thu, 20 Apr 2017 12:33:57 +0000 (21:33 +0900)]
Merge pull request #47 from Samsung/ARTIK053

Artik053, confrim

7 years agoupdate README files for artik053
sunghan [Thu, 20 Apr 2017 08:44:10 +0000 (17:44 +0900)]
update README files for artik053

7 years agofix violation of Tizen coding rule and add including config.h
sunghan [Tue, 18 Apr 2017 13:47:32 +0000 (22:47 +0900)]
fix violation of Tizen coding rule and add including config.h

7 years agos5j/spi: clean spi driver code
Junhwan Park [Fri, 14 Apr 2017 05:01:32 +0000 (14:01 +0900)]
s5j/spi: clean spi driver code

I removed unused pieces of code. And reduced code size. I will try to
further reduce the code size in the future.

Change-Id: I18ca5f9e462e0c40e72d0297dd0bc76e82650146
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agofs: remove fs_utils.c
EunBong Song [Fri, 7 Apr 2017 05:22:09 +0000 (14:22 +0900)]
fs: remove fs_utils.c

fs_initiate(), fs_clean(), fs_erase(), fs_recover() functions are API
functions for application. But these functions call kernel space
functions and this can break protection build. And also these functions
do not work proprely with new MTD layers. And also these functions
support only smartfs not all file systems even though function's prefix
is fs_xxx. I think it's better to remove these functions and
re-implement if there is a request for these functions.

Change-Id: I410684d7b789b743707c0cb03ed3d2ec4a8fd729
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexamples: refactor mdns_test and ntpclient_test
Wonsang Ryou [Fri, 14 Apr 2017 08:38:04 +0000 (17:38 +0900)]
examples: refactor mdns_test and ntpclient_test

This patch reduces complexity and improves readability by separating
the command process functions from mdns_main() and ntpclient_main().

Change-Id: I5914766e93cca61d8a9d64c0928d5f2bb9529a12
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoexamples/mqtt_test: refactor for reducing complexity
Wonsang Ryou [Fri, 14 Apr 2017 07:58:22 +0000 (16:58 +0900)]
examples/mqtt_test: refactor for reducing complexity

This patch reduces complexity and improves readability by separating
the several functions from mqtt client tasks.

Change-Id: I2e8bda321136581788337b226056bd19e70b049d
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoexamples/sensorbd_demo: fix spi example
Junhwan Park [Fri, 14 Apr 2017 05:06:42 +0000 (14:06 +0900)]
examples/sensorbd_demo: fix spi example

Fix spi examples on sensor board.

Change-Id: I6d89f63ab9975e3b208ffab86e883c929b115a54
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agonet: clean up network Kconfig entries
kang [Fri, 14 Apr 2017 07:58:24 +0000 (16:58 +0900)]
net: clean up network Kconfig entries

Configuration sync with Tizen RT spin git for IP, mbox, debug and
statistics.

Change-Id: I1a92fde80848186b078f112e3fba8c661c52d529
Signed-off-by: kang <pilseob.kang@samsung.com>
7 years agoexternal/wakaama: delete tests folder that is not in use
Jin-Seong Kim [Fri, 14 Apr 2017 07:25:03 +0000 (16:25 +0900)]
external/wakaama: delete tests folder that is not in use

This commit deletes 'tests' folder that is not in use.

Change-Id: I67937016eba112ddb58c43109c7f4d216cff1b4c
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agos5j/serial: fix g_uart_priv
Junhwan Park [Fri, 14 Apr 2017 06:49:40 +0000 (15:49 +0900)]
s5j/serial: fix g_uart_priv

The value for each port in g_uart_priv was wrong. Fixed to correct
setting by port.

Change-Id: I3a43403b1c3714e61b8e9e5f6f4930ee14bbf010
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agos5j/i2c: fix g_s5j_i2c_priv
Junhwan Park [Fri, 14 Apr 2017 05:35:40 +0000 (14:35 +0900)]
s5j/i2c: fix g_s5j_i2c_priv

the array 'g_s5j_i2c_priv[2]' is accessed at port 3, which is out of
bounds. The S5J's I2C has ports 0 to 3.

Change-Id: I49166fc8301722a531a758319f15e5123d6a5058
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agobuild: do not recompile untouched source files
Wonsang Ryou [Fri, 14 Apr 2017 04:05:45 +0000 (13:05 +0900)]
build: do not recompile untouched source files

When the object files' build rule whose name includes sub directory
path, in the build rule for object files, "notdir" command causes the
mismatch between the build rule's name and the generated object file
path. So, the build rule for binary regards the object files as the
files not compiled and rebuilds on every build time even if the
object files are not modified.

This patch removes sub directory path from the source code name. And it
also removes "notdir" command from the build rule for object files.

Change-Id: I53874c480d0422ade1c0ecdbbf55f03a1e19419c
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agonetutils/mqtt: delete an unnecessary Makefile
Wonsang Ryou [Fri, 14 Apr 2017 05:06:27 +0000 (14:06 +0900)]
netutils/mqtt: delete an unnecessary Makefile

This commit deletes an unnecessary Makefile in mqtt library directory.

Change-Id: I707bd52ddd0a338f3d15f2e23a8f5310288548ca
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoexternal/wakaama: remove tinydtls library
Junyeon LEE [Fri, 14 Apr 2017 04:31:22 +0000 (13:31 +0900)]
external/wakaama: remove tinydtls library

This commit removes tinydtls full source code in wakaama. Because TizenRT
supports mbedtls for network security, there is no more need to use Tinydtls.

Change-Id: Ie049ee17a5b9b523b47e16a18ea72614025fc190
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexternal/Kconfig: add wakaama security configuration
Junyeon LEE [Fri, 14 Apr 2017 04:28:06 +0000 (13:28 +0900)]
external/Kconfig: add wakaama security configuration

This commit adds wakaama security configuration for supporting
TLS and DTLS.

Change-Id: I12b1fa30b2ea791c2029641f31b94ba24f08ebe7
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexternal/wakaama: separate core and example configuration
Jin-Seong Kim [Fri, 14 Apr 2017 05:38:28 +0000 (14:38 +0900)]
external/wakaama: separate core and example configuration

This commit is patches to separate core and example configuration
 - add CONFIG_LWM2M_WAKAAMA to compile wakaama core functions only
 - remove not-supported configuration to prevent wrong configuration
   (CONFIG_LWM2M_BOOTSTRAP)
 - fixes build dependencies between dm frameworks and wakaama

Change-Id: I57d9dae42287c8ae758029bf3f6b3ff72e22f08f
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agopthread: apply some missing patches from Nuttx
EunBong Song [Fri, 14 Apr 2017 01:31:46 +0000 (10:31 +0900)]
pthread: apply some missing patches from Nuttx

This patch adds pthread_mutexattr_getrobust.c and
pthread_mutexattr_setrobust.c and initialization of attr->robust in
pthread_mutexattr_init().

All credits should go to Gregory Nutt who wrote the original commit.

Change-Id: I02b979e0bd4e30d6e91eaf91941e3bcd6ac7e7c4
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: backported 666208cfd1196ddb and b4d378ad from NuttX]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agopthread: disable priority inheritance for contained semaphore
EunBong Song [Thu, 13 Apr 2017 23:50:39 +0000 (08:50 +0900)]
pthread: disable priority inheritance for contained semaphore

Provide do-nothing stubs for mutex attribute interfaces if features not
enabled. pthread_cond includes a signaling semaphore and should call
sem_setprotocol.

All credits should go to Gregory Nutt who wrote the original commit.

Change-Id: Ib6bcc4d63e8decd6f60e1bc944aecca88037fdc7
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: backported 796969f6 from NuttX]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexamples/webserver: register default callback functions
Junyeon LEE [Thu, 13 Apr 2017 09:24:00 +0000 (18:24 +0900)]
examples/webserver: register default callback functions

This commit addes default callbacks in server example for testing.

Change-Id: Icceb0fa2f7a93df7b81e0ad31ffa83f5ab46e06b
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agobuild: fix 'make clean'
Wonsang Ryou [Thu, 13 Apr 2017 23:51:29 +0000 (08:51 +0900)]
build: fix 'make clean'

This patch fixes the problem that some *.o files aren't cleaned after
"make clean" in mqtt and sss modules.

The "CLEAN" function of Makefile cleans object files only in current
directory. That's why the files of sub directories aren't cleaned by
"CLEAN" function. This patch all object files make be generated in the
directory in which Makefile exists.

Change-Id: I50d9f95ca255b2c0d1aaf33a470f4d2f4ab5bb40
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agolibc/netdb: fix memory leakage
Junyeon LEE [Thu, 13 Apr 2017 05:37:04 +0000 (14:37 +0900)]
libc/netdb: fix memory leakage

This patch fixes improper free in freeaddrinfo().

Change-Id: Icf6a94967a19b5de936d46fd954b64ce34d8bab0
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/lwip: rename NET_ARP_TRUST_IP_MAC to NET_ETHARP_TRUST_IP_MAC
EunBong Song [Thu, 13 Apr 2017 07:34:22 +0000 (16:34 +0900)]
net/lwip: rename NET_ARP_TRUST_IP_MAC to NET_ETHARP_TRUST_IP_MAC

In Kconfig NET_ETHARP_TRUST_IP_MAC is defined. However, in lwipopts.h
NET_ARP_TRUST_IP_MAC is used. This patch changes NET_ARP_TRUST_IP_MAC to
NET_ETHARP_TRUST_IP_MAC.

Change-Id: I3e2384be95e38eaab35cdbd4d6b91d83b9397c34
Signed-off-by: EunBong Song <eunb.song@samsung.com>