rtos/tinyara.git
7 years agoMerge pull request #140 from sunghan-chang/coding_rule
btheosam [Wed, 31 May 2017 04:33:05 +0000 (13:33 +0900)]
Merge pull request #140 from sunghan-chang/coding_rule

fix violations of coding rule

7 years agoMerge pull request #132 from sunghan-chang/defconfig
btheosam [Wed, 31 May 2017 04:25:59 +0000 (13:25 +0900)]
Merge pull request #132 from sunghan-chang/defconfig

update defconfig using latest Kconfig

7 years agoMerge pull request #139 from pradeepns85/ps_command_output_alignment
sunghan-chang [Wed, 31 May 2017 03:34:54 +0000 (12:34 +0900)]
Merge pull request #139 from pradeepns85/ps_command_output_alignment

Cosmetic changes for "ps" command output

7 years agoMerge pull request #141 from jeongchanKim/kernel_pthread
sunghan-chang [Wed, 31 May 2017 03:17:11 +0000 (12:17 +0900)]
Merge pull request #141 from jeongchanKim/kernel_pthread

Fix a problem in pthread_trylock()

7 years agoModify the tc name because of the API name change(pthread_sem_take, pthread_sem_give)
jc_.kim [Wed, 31 May 2017 02:44:05 +0000 (11:44 +0900)]
Modify the tc name because of the API name change(pthread_sem_take, pthread_sem_give)

7 years agoRename pthread_takesemaphore, pthread_givesemaphore to pthread_sem_take, pthread_sem_give
jc_.kim [Wed, 31 May 2017 02:40:48 +0000 (11:40 +0900)]
Rename pthread_takesemaphore, pthread_givesemaphore to pthread_sem_take, pthread_sem_give

7 years agoFix a problem in pthread_trylock()
jc_.kim [Wed, 31 May 2017 00:34:52 +0000 (09:34 +0900)]
Fix a problem in pthread_trylock()

When CONFIG_PTHREAD_MUTEX_UNSAFE=y, the special return value
EAGAIN was not being detected due to differences in reporting of returned values.

7 years agoCosmetic changes for "ps, heapinfo and stkmon" command output
pradeep.ns [Mon, 29 May 2017 16:41:33 +0000 (22:11 +0530)]
Cosmetic changes for "ps, heapinfo and stkmon" command output

New changes can be verified using TASH
1) with CONFIG_TASK_NAME_SIZE=0
TASH>>ps

  PID | PRIO | FLAG |  TYPE   | NP |  STATUS
------|------|------|---------|----|--------
    0 |    0 | FIFO | KTHREAD |    | READY
    1 |  224 | RR   | KTHREAD |    | WAITSIG
    3 |  125 | RR   | TASK    |    | RUNNING

2) with CONFIG_TASK_NAME_SIZE=31

TASH>>ps
PID | PRIO | FLAG |  TYPE   | NP |  STATUS  | NAME
----|------|------|---------|----|----------|----------
  0 |    0 | FIFO | KTHREAD |    | READY    | Idle Task
  1 |  224 | RR   | KTHREAD |    | WAITSIG  | hpwork
  3 |  125 | RR   | TASK    |    | RUNNING  | tash

heap output can be verified as follows

TASH>>heapinfo -a
TASH>>heapinfo -f
TASH>>heapinfo -p

stack monitor output can be verified as follows
TASH>>stkmon
TASH>>Stack Monitor: Running
=============================================================================
  PID |   STATUS |     SIZE | PEAK_STACK |  PEAK_HEAP |    TIME | THREAD NAME
------|----------|----------|------------|------------|---------|------------
   44 | INACTIVE |     2028 |        556 |          0 |    4390 | waiter
   46 | INACTIVE |     2044 |        500 |          0 |    6639 | <pthread>
   45 | INACTIVE |     2044 |        500 |          0 |    6639 | <pthread>
   58 | INACTIVE |     2044 |        452 |          0 |    6795 | <pthread>
   47 | INACTIVE |     2044 |        452 |          0 |    6795 | <pthread>
------|----------|----------|------------|------------|---------|------------
    0 |   ACTIVE |     1024 |       1024 |      59504 |   20740 | Idle Task
    1 |   ACTIVE |     2028 |        156 |          0 |   20742 | hpwork
    3 |   ACTIVE |     4076 |        876 |       3584 |   20742 | tash
   71 |   ACTIVE |     1020 |        524 |          0 |   20743 | StackMonitor

Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>
7 years agoMerge pull request #133 from jeongchanKim/kernel_semaphore
sunghan-chang [Tue, 30 May 2017 04:23:02 +0000 (13:23 +0900)]
Merge pull request #133 from jeongchanKim/kernel_semaphore

Remove unnecessary code in sem_wait and sem_post

7 years agoMerge pull request #138 from pradeepns85/fix_kill_kernelthreads
sunghan-chang [Tue, 30 May 2017 04:18:25 +0000 (13:18 +0900)]
Merge pull request #138 from pradeepns85/fix_kill_kernelthreads

Fix: use task_delete() to kill kernel threads and tasks

7 years agoRemove unnecessary code in sem_wait and sem_post
jc_.kim [Mon, 29 May 2017 10:48:09 +0000 (19:48 +0900)]
Remove unnecessary code in sem_wait and sem_post

sem_wait_for_isr and sem_post_from_isr are not needed
because of using sem protocol

7 years agoMerge pull request #137 from pradeepns85/follow_codingstyle
sunghan-chang [Tue, 30 May 2017 04:10:21 +0000 (13:10 +0900)]
Merge pull request #137 from pradeepns85/follow_codingstyle

Follow coding style in task_delete.c

7 years agoMerge pull request #130 from pradeepns85/bugfix_pthread_schedsetup
sunghan-chang [Tue, 30 May 2017 04:07:07 +0000 (13:07 +0900)]
Merge pull request #130 from pradeepns85/bugfix_pthread_schedsetup

Set correct errno in task_schedsetup and pthread_schedsetup

7 years agofix violations of coding rule
sunghan [Mon, 29 May 2017 13:53:32 +0000 (22:53 +0900)]
fix violations of coding rule

no space after type casting

7 years agoFix: use task_delete() to kill kernel threads and tasks
pradeep.ns [Mon, 29 May 2017 16:18:06 +0000 (21:48 +0530)]
Fix: use task_delete() to kill kernel threads and tasks

pthread_cancel() shouldn't be used to kill kernel threads, it raises
assert if tcb type is other than TCB_FLAG_TTYPE_PTHREAD. refer line no
125 in pthread_cancel.c
task_delete() API takes care of deleting tasks and kernel threads.
refer lineno 151 in task_delete.c
we can verify it using following commands from TASH
killall -9 <kernel thread name> or
kill -9 <pid of kernel thread>

Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>
7 years agoFollow coding style in task_delete.c
pradeep.ns [Mon, 29 May 2017 14:48:55 +0000 (20:18 +0530)]
Follow coding style in task_delete.c

Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>
7 years agoupdate defconfig using latest Kconfig for artik053
sunghan [Mon, 29 May 2017 13:31:00 +0000 (22:31 +0900)]
update defconfig using latest Kconfig for artik053

7 years agoupdate defconfig using latest Kconfig for sidk_s5jt200
sunghan [Mon, 29 May 2017 06:25:02 +0000 (15:25 +0900)]
update defconfig using latest Kconfig for sidk_s5jt200

7 years agoMerge pull request #131 from sunghan-chang/sidk_tash_wlan_download
Taejun-Kwon [Mon, 29 May 2017 06:19:12 +0000 (15:19 +0900)]
Merge pull request #131 from sunghan-chang/sidk_tash_wlan_download

support "make download ALL" for sidk_tash_wlan configuration sets

7 years agosupport "make download ALL" for sidk_tash_wlan configuration sets
sunghan [Mon, 29 May 2017 05:58:18 +0000 (14:58 +0900)]
support "make download ALL" for sidk_tash_wlan configuration sets

7 years agoSet correct errno in task_schedsetup and pthread_schedsetup
pradeep.ns [Fri, 26 May 2017 12:48:14 +0000 (18:18 +0530)]
Set correct errno in task_schedsetup and pthread_schedsetup

Both task_schedsetup() and pthread_schedsetup() sets wrong
error number incase of failure. error no set during invalid
priority check is not considered. And proper error no was not
set if system fails to assign unique new pid to task/thread.

This patch fixes the wrong error no set and sets the correct
error no.

Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>
7 years agoMerge pull request #129 from dr-venkman/master
Taejun-Kwon [Fri, 26 May 2017 11:26:05 +0000 (20:26 +0900)]
Merge pull request #129 from dr-venkman/master

Modified DM utc to fix build errors

7 years agoModified DM utc to fix build errors
dr-venkman [Fri, 26 May 2017 07:27:00 +0000 (16:27 +0900)]
Modified DM utc to fix build errors

7 years agoMerge pull request #126 from sunghan-chang/kconfig
Taejun-Kwon [Fri, 26 May 2017 05:43:53 +0000 (14:43 +0900)]
Merge pull request #126 from sunghan-chang/kconfig

modify Kconfig

7 years agoMerge pull request #125 from dr-venkman/master
Taejun-Kwon [Fri, 26 May 2017 05:42:06 +0000 (14:42 +0900)]
Merge pull request #125 from dr-venkman/master

Added functions to read RSSI and IP address into LWM2M connectivity o…

7 years agoMerge pull request #124 from lssgood/slimLocal
sunghan-chang [Thu, 25 May 2017 07:48:13 +0000 (16:48 +0900)]
Merge pull request #124 from lssgood/slimLocal

Add brief description of header files for doxygen

7 years agoMerge pull request #123 from jeongarmy/fs_mount
sunghan-chang [Thu, 25 May 2017 07:47:38 +0000 (16:47 +0900)]
Merge pull request #123 from jeongarmy/fs_mount

Add and Modify comment about returned value in fs mount function

7 years agoMerge pull request #122 from jeongarmy/utils_kdbg
sunghan-chang [Thu, 25 May 2017 07:47:08 +0000 (16:47 +0900)]
Merge pull request #122 from jeongarmy/utils_kdbg

Update usage and syntax for some kdbg commands

7 years agoMerge pull request #113 from heesub/sprint4-for-swc
sunghan-chang [Thu, 25 May 2017 07:45:04 +0000 (16:45 +0900)]
Merge pull request #113 from heesub/sprint4-for-swc

Sprint4 for swc

7 years agoAdded functions to read RSSI and IP address into LWM2M connectivity object
dr-venkman [Thu, 25 May 2017 03:29:06 +0000 (12:29 +0900)]
Added functions to read RSSI and IP address into LWM2M connectivity object

7 years agoMerge pull request #121 from junmin-kim/kernel_pthread
sunghan-chang [Thu, 25 May 2017 02:09:40 +0000 (11:09 +0900)]
Merge pull request #121 from junmin-kim/kernel_pthread

Fix error in pthread_condwait

7 years agoAdd brief description of header files for doxygen
Sangsoon Lim [Wed, 24 May 2017 10:21:40 +0000 (19:21 +0900)]
Add brief description of header files for doxygen

7 years agoAdd and Modify comment about returned value in fs mount function
Ahreum Jeong [Mon, 22 May 2017 23:04:52 +0000 (08:04 +0900)]
Add and Modify comment about returned value in fs mount function

7 years agoModify syntax and usage of kill and killall commands
Ahreum Jeong [Thu, 18 May 2017 11:45:05 +0000 (20:45 +0900)]
Modify syntax and usage of kill and killall commands
Support a case that no signal is specified for kill, killall commands

7 years agoModify usage of date command, kdbg_date
Ahreum Jeong [Fri, 19 May 2017 02:26:41 +0000 (11:26 +0900)]
Modify usage of date command, kdbg_date

7 years agoModify usage of heapinfo and stkmon commands, kdbg_heapinfo, kdbg_stkmon
Ahreum Jeong [Fri, 19 May 2017 05:12:59 +0000 (14:12 +0900)]
Modify usage of heapinfo and stkmon commands, kdbg_heapinfo, kdbg_stkmon

7 years agoremove duplicated comments for syslog
sunghan [Wed, 24 May 2017 05:30:51 +0000 (14:30 +0900)]
remove duplicated comments for syslog

System Logging Device Options
System Logging

7 years agoadd a comment for wireless driver
sunghan [Wed, 24 May 2017 05:25:52 +0000 (14:25 +0900)]
add a comment for wireless driver

Because of missing title(comment) of wireless, wireless is under ttrace.

7 years agomodify sentence of Kconfig for syntax
sunghan [Wed, 24 May 2017 05:22:34 +0000 (14:22 +0900)]
modify sentence of Kconfig for syntax

7 years agoFix error in pthread_condwait
junmin kim [Wed, 24 May 2017 04:32:55 +0000 (21:32 -0700)]
Fix error in pthread_condwait

pthread_condwait should give mutex, take cond->sem, then take mutex

7 years agoMerge pull request #119 from youngeunpark/master
sunghan-chang [Wed, 24 May 2017 03:58:30 +0000 (12:58 +0900)]
Merge pull request #119 from youngeunpark/master

Update memstats_gnueabil.py to print objects sizes in a sorted manner

7 years agonetcmd: do not print broadcast address
Heesub Shin [Fri, 19 May 2017 03:48:28 +0000 (12:48 +0900)]
netcmd: do not print broadcast address

cmd_ifconfig() prints incorrect broadcast address on its output. This is
mainly because SIOCGIFBRDADDR is not currently implemented in
netdev_ioctl(). Until we can handle it, do not print the broadcast
address on ifconfig.

Change-Id: I63030f551459df2f73f579ab4b85ae449adee056
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonetcmd/dhcpd: fix minor bugs on start/stop dhcpd
Jin-Seong Kim [Tue, 16 May 2017 09:49:39 +0000 (18:49 +0900)]
netcmd/dhcpd: fix minor bugs on start/stop dhcpd

This commit is fix minor bugs on start/stop dhcpd
 - before running dhcpd, interface flags should be IFF_UP
 - if dhcpd is not running, dhcpd stop command shows proper log

Change-Id: Ia21f7a90b38b84702a1f672a0143dabf6d720677
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonet: fix duplicated ioctl codes
Heesub Shin [Thu, 18 May 2017 08:26:57 +0000 (17:26 +0900)]
net: fix duplicated ioctl codes

Some IOCTLs are defined to have duplicated values, overlapping each
other. This should be fixed.

Change-Id: Ied4ddf3799abc2f02104558a61f4f9cb47b11b77
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonet/netdev: rework SIOCGIFCONF support
Heesub Shin [Thu, 18 May 2017 16:26:36 +0000 (01:26 +0900)]
net/netdev: rework SIOCGIFCONF support

I do not know the background history on netdev_foreach_sync(), but it is
reinventing the wheel which we should avoid as always as possible.
TizenRT already provides a general interface, netdev_foreach() and thus
it does not make any sense to introduce netdev_foreach_sync(), breaking
the OS design. Adding a new API or code in such a way all the time will
make the OS bigger and bigger.

This commit also fixes a buffer overflow issue that might occur when not
enough buffer were passed to ioctl().

Change-Id: Id52c328919efc8d5ba57548af323e3d69335ff9e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonet/netdev: simplify netdev_findbyname()
Heesub Shin [Thu, 18 May 2017 07:30:13 +0000 (16:30 +0900)]
net/netdev: simplify netdev_findbyname()

This commit simplifies internal logic of netdev_findbyname() for better
readability.

Change-Id: Ice458a799fd708a127bbb705f99be1eb692caed2
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonet/netdev: do not use printf()
Heesub Shin [Thu, 18 May 2017 07:26:30 +0000 (16:26 +0900)]
net/netdev: do not use printf()

Calling printf() in kernel routine seems insane or crazy.

Change-Id: I61f07d3176d133aa331d5f59f0c7a33879721b21
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonet/netdev: drop netdev_findbyaddr.c
Heesub Shin [Thu, 18 May 2017 07:06:07 +0000 (16:06 +0900)]
net/netdev: drop netdev_findbyaddr.c

Functions defined in netdev_findbyaddr.c are currently not in use. It
has been left abandoned for a long time. Let's remove it for better
maintainability.

Change-Id: Id37c95e6c668b6e72a5344f6b2b39c1398966188
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonet/netdev: get rid of uIP-related debris
Heesub Shin [Thu, 18 May 2017 05:24:25 +0000 (14:24 +0900)]
net/netdev: get rid of uIP-related debris

ipv4_input() and ipv6_input() are driver functions of uIP that was
dropped from TizenRT. Declaring function prototypes of which that are
not actually provided has no point. Let's remove it.

Change-Id: I3e2bdfe495aab312326d8b5592cb6280f2bfc453
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoexamples/tls: add dependency in examples
Junyeon LEE [Thu, 18 May 2017 03:46:57 +0000 (12:46 +0900)]
examples/tls: add dependency in examples

This commit addes TLS configuration dependencies in Kconfig and
example source code.

Change-Id: Ic8342bc0a1bf63fa665ec0c239d6eb0375d8f603
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoartik053: enable CONFIG_S5J_SPI by default
Junhwan Park [Fri, 19 May 2017 05:09:41 +0000 (14:09 +0900)]
artik053: enable CONFIG_S5J_SPI by default

This patch enables CONFIG_S5J_SPI.

Change-Id: I3cbd510bb778d0df5fa462eef6170e4e9b498be7
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoartik053: enable CONFIG_S5J_I2C by default
Junhwan Park [Fri, 19 May 2017 02:42:08 +0000 (11:42 +0900)]
artik053: enable CONFIG_S5J_I2C by default

This patch enables CONFIG_S5J_I2C. To create i2c devices at boot time.

Change-Id: I39a62973d2de0e399d92fe837fcc5bd455312d3f
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoartik053: register i2c devices at boot
Junhwan Park [Wed, 17 May 2017 06:17:37 +0000 (15:17 +0900)]
artik053: register i2c devices at boot

Register I2Cs at board_initialize().

TASH>>ls /dev
 i2c-0
 i2c-1

Change-Id: I71cb13ab205eeb893f74d18d8c777866fa0cbbb6
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoartik053: sidk_s5jt200: initialize ramfs on booting
kim jin hong [Fri, 12 May 2017 07:55:50 +0000 (16:55 +0900)]
artik053: sidk_s5jt200: initialize ramfs on booting

Initialize rammtd and mount ramfs on booting. Because application cannot
access kernel or driver function. If user enable CONFIG_RAMMTD, It
automacally enable ramfs and mount to RAMMTD_MOUNT_POINT. Application
write or erase file on runtime by file description.

Change-Id: I03e8d979d8514b1659d0eddb82397a38cf25b115
Signed-off-by: kim jin hong <jh0703.kim@samsung.com>
7 years agoexamples: introduce mtdpart
EunBong Song [Wed, 17 May 2017 05:09:47 +0000 (14:09 +0900)]
examples: introduce mtdpart

This patch introduces mtdpart example. This comes from nuttx community.
This examples can test rammtd, bch, mtdpart functions.

Change-Id: Iaee478d202151a770ccd93b74ab14fd62e499059
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agodrivers/bch: fix incorrect return value on DIOC_GETPRIV
EunBong Song [Tue, 16 May 2017 11:47:41 +0000 (20:47 +0900)]
drivers/bch: fix incorrect return value on DIOC_GETPRIV

bch_ioctl() should return OK, if DIOC_GETPRIV command succeeds.

Change-Id: I71a315a5932699eacdf7ff214376b4501d205fc6
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agodrivers/bch: fix linking error
EunBong Song [Tue, 16 May 2017 11:28:42 +0000 (20:28 +0900)]
drivers/bch: fix linking error

This patch fixes a linking error of bchdev_unregister.c.
Change _err to fdbg.

Change-Id: I7643bada69bf8dba80ec3bc441ca4c9933e12e6d
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoartik053: sidk_s5jt200: adjust CONFIG_USEC_PER_TICK
Heesub Shin [Wed, 17 May 2017 08:32:15 +0000 (17:32 +0900)]
artik053: sidk_s5jt200: adjust CONFIG_USEC_PER_TICK

We use an external crystal of 32,768Hz as a source clock of RTC which
generates the systick. As its resolution is quite low, OS time tick
cannot be generated exactly at 10ms period. Thus, we need to adjust
CONFIG_USEC_PER_TICK to make it have more accurate value.

Change-Id: I4ecd8ac25eba27ded9a15f5f016d7611ffa4affc
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/i2c: delete debug memssages
Junhwan Park [Wed, 17 May 2017 10:08:58 +0000 (19:08 +0900)]
s5j/i2c: delete debug memssages

Debug messages from bsp are unnecessary.

Change-Id: I209251faf8875485fbff4f89fd4ae1b7231562dd
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agos5j/rtc: use XRTCXTO as a source clock of RTC
Heesub Shin [Wed, 17 May 2017 08:03:47 +0000 (17:03 +0900)]
s5j/rtc: use XRTCXTO as a source clock of RTC

OSC_CON[16] should be set to 1 in order to use the external crystal as a
source clock of RTC. Otherwise, Fout clock from the internal ring OSC
which has quite large error margin is provided to RTC, causing the
system time to go slowly.

Change-Id: If01563b8bd33534ff517d1c3519039e3a000c22f
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoclock: fix incorrect calculation on timespec
Heesub Shin [Wed, 17 May 2017 03:54:37 +0000 (12:54 +0900)]
clock: fix incorrect calculation on timespec

Here, TICK2USEC() should be used instead of TICK2MSEC(). This results in
a subtle bug that incorrectly calculating timespec when period of the
system clock tick is not divided evenly by 1000us.

Change-Id: Idde97d06108dfff6b96327a48f3aa7817a8542e4
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: do not look into kernel dir
Heesub Shin [Tue, 16 May 2017 08:17:05 +0000 (17:17 +0900)]
artik053: do not look into kernel dir

It seems that os/sched was accidentally added to include path. We don't
need to do that.

Change-Id: I89f3c80b73a8d26426210a22e7d1a9d8238758e1
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: remove files not in use
Heesub Shin [Tue, 16 May 2017 08:07:39 +0000 (17:07 +0900)]
artik053: remove files not in use

fota.h and partitions.h are not in use. Let's remove 'em all.

Change-Id: I797ccb44cc592112e9b286fc8fe24b3f8a413acb
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: fix trivial coding style issues
Heesub Shin [Tue, 16 May 2017 08:03:52 +0000 (17:03 +0900)]
artik053: fix trivial coding style issues

Fixes trivial coding style issue for better readability and consistency.
This does not introduce any functional differences.

Change-Id: Idf2ad476cf15d15b9e98e1043381869e63b8a51e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/mac: clean up unnecessary include
Heesub Shin [Tue, 16 May 2017 07:50:22 +0000 (16:50 +0900)]
s5j/mac: clean up unnecessary include

Change-Id: Ieef1b9623e3136fbe5504310d2adeb06f20cadfb
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/mac: drop udp_initialize() and udp_free()
Heesub Shin [Tue, 16 May 2017 07:48:04 +0000 (16:48 +0900)]
s5j/mac: drop udp_initialize() and udp_free()

udp_initialize() and udp_free() are never called and not in use.

Change-Id: I230ce1837f5cde920d9d7a1656cdf79a4a9d3950
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: fix trivial coding style issues
Heesub Shin [Tue, 16 May 2017 07:44:22 +0000 (16:44 +0900)]
s5j: fix trivial coding style issues

Fixes trivial coding style issues like indentation.

Change-Id: I1335726d95d8fe44be015152dbfa56a8803b5401
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/Kconfig: make ARCH_HAVE_TICKLESS invisible
Heesub Shin [Tue, 16 May 2017 06:23:57 +0000 (15:23 +0900)]
kernel/Kconfig: make ARCH_HAVE_TICKLESS invisible

CONFIG_ARCH_HAVE_TICKLESS should be invisible and selected only by
another Kconfig entry that is architecture-specific. In other words, it
is not a user-configurable kconfig entry.

Change-Id: Icfd9ebb64618cc5e94bd21a6ab5113a32092ba0b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: do not set ARCH_HAVE_FPU=y
Heesub Shin [Tue, 16 May 2017 06:07:46 +0000 (15:07 +0900)]
s5j: do not set ARCH_HAVE_FPU=y

Cortex-R4 core in S5J does not have floating-point unit. Setting
ARCH_HAVE_FPU=y in defconfig is misleading users.

Change-Id: I5596cb99ac7f0e12bd5db0d2b20c6a29f29f99af
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: add to support drive strength on pins
Heesub Shin [Tue, 16 May 2017 05:11:18 +0000 (14:11 +0900)]
s5j/gpio: add to support drive strength on pins

This commit introduces s5j_setdrv() that sets the slew rates on each
GPIO pin when it is configured as an output or an alternative function.

Change-Id: Ide2a9ad13e64ffb98af0b308753f5bfcde5e0be7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: specify default drive strength values
Heesub Shin [Tue, 16 May 2017 05:05:52 +0000 (14:05 +0900)]
s5j/gpio: specify default drive strength values

So far, the driver strength has been ignored or not set when we
configure GPIO pins. As a preparation step for supporting it, this
commit specifies default value of slew rate for each GPIO pins when it
is configured as an alternative function. This commit will not have any
effects until subsequent commit is merged.

Change-Id: Idcf6b1365ed8d9abae40377565b0c1702860fc19
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: remove constants redundantly defined
Heesub Shin [Tue, 16 May 2017 05:02:22 +0000 (14:02 +0900)]
s5j/gpio: remove constants redundantly defined

GPIO_PWM_TOUTx are redundantly defined in s5jt200_pinconfig.h.

Change-Id: Id33d0e1fb5a14418fef7899cc985a564f294e7dd
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: fix GPIO_DRV_PIN_XXX() macros
Heesub Shin [Tue, 16 May 2017 04:58:20 +0000 (13:58 +0900)]
s5j/gpio: fix GPIO_DRV_PIN_XXX() macros

GPIO_DRV_PIN_SHIFT() and GPIO_DRV_PIN_MASK() macros have been broken for
a long time since they were first introduced. Their definitions are
completely wrong. Let's fix them.

Change-Id: Ia4be3edccbae4eadac251205d723c6555ee57f70
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonetutils/mqtt: fix violations of coding style
Wonsang Ryou [Fri, 12 May 2017 12:08:13 +0000 (21:08 +0900)]
netutils/mqtt: fix violations of coding style

This patch fixes violations of coding style.

Change-Id: I06dd744e37f61eb8244f664f5e0574727d7c9232
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agolwip: fix wrong error return process of sem_tickwait
EunBong Song [Tue, 16 May 2017 01:28:50 +0000 (10:28 +0900)]
lwip: fix wrong error return process of sem_tickwait

In case of timeout, sem_tickwait returns -ETIMEDOUT and does not set
errno to ETIMEDOUT. But sys_arch_sem_wait decides timeout by errno. This
patch fixes this problem.

Change-Id: I26f609b64647035e8d8c14016f81f33b00dce1d4
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agolwip: change stats_display() to original prototype
EunBong Song [Fri, 12 May 2017 09:24:31 +0000 (18:24 +0900)]
lwip: change stats_display() to original prototype

This patch change stats_display() to original LwIP open source.

Change-Id: Ic7564e2082f8d36eaf66491fe564a9ad7a10cd6e
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agolwip: fix up lwip debug macros
EunBong Song [Fri, 12 May 2017 08:26:12 +0000 (17:26 +0900)]
lwip: fix up lwip debug macros

For turning on/off debug, should use LWIP_DBG_ON/LWIP_DBG_OFF.

Change-Id: Ic4764da6eb924a80e7843b206a4ef01c2791f114
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agolwip: add Kconfig knobs for adjusting debug level
EunBong Song [Fri, 12 May 2017 08:24:45 +0000 (17:24 +0900)]
lwip: add Kconfig knobs for adjusting debug level

This patch adds LwIP debug level menu.

Change-Id: I3927b249b97c4c4a9cfc1ad3fa02f339854bc071
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agolwip: fix typos and remove unused code
EunBong Song [Fri, 12 May 2017 08:23:33 +0000 (17:23 +0900)]
lwip: fix typos and remove unused code

Change CONFIG_DEBUG_LWIP_ERROR to CONFIG_NET_LWIP_DEBUG.
DEBUG_LWIP_WARN, DEBUG_LWIP_INFO, DEBUG_LWIP_ERROR are not used anymore
so remove it.

Change-Id: I4b49822670c4d5904b1d36c8be34ad0230ac89a5
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonetutils/dhcpd: change select timeout from 60s to 10s
Jin-Seong Kim [Thu, 20 Apr 2017 04:22:56 +0000 (13:22 +0900)]
netutils/dhcpd: change select timeout from 60s to 10s

This commit is to change select timeout from 60s to 10s
 - 60s timeout is too long to stop dhcpd
 - 10s is enough time to wait for a dhcp handshake

Change-Id: I0d1f7d1b86ba6e46ac874fa364e86e9e9418a642
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/mqtt: set the mqtt protocol version when initilizing mqtt
Wonsang Ryou [Fri, 12 May 2017 11:52:53 +0000 (20:52 +0900)]
netutils/mqtt: set the mqtt protocol version when initilizing mqtt

This patch makes mqtt_init_client() set the mqtt protocol version.

Change-Id: Ib8bcc9377ae63f9245c8ce3df16481358c399956
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoartik053: sidk_s5jt200: change maximum tasks to 32
Junyeon LEE [Mon, 15 May 2017 11:11:13 +0000 (20:11 +0900)]
artik053: sidk_s5jt200: change maximum tasks to 32

This commit changes the maximun number of tasks from 16 to 32. 16 tasks
are too small to operate HTTPS server with WiFi.

Change-Id: I6ce0998ff177ddf9e1e954000a53d10ce1b42f52
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/webserver: fix webserver closing bug
Junyeon LEE [Fri, 19 May 2017 16:17:52 +0000 (01:17 +0900)]
netutils/webserver: fix webserver closing bug

This commit fixes an unresolved webserver issue. When closing webserver,
http_server_stop() repeats pthread_kill() every 100ms regardless of
webserver's thread status. Because this repeatation has possibilities
to make improper thread and webserver status, clean up it.

Change-Id: I84fc088dc3c36f0ae0da5b2fe9443ca5a71c7db1
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/webserver: fix closing function
Junyeon LEE [Fri, 12 May 2017 15:39:20 +0000 (00:39 +0900)]
netutils/webserver: fix closing function

When closing a webserver, sometimes the closing function ends up
in an infinite loop. This commit fixes the way of closing webserver.

Change-Id: Iff1d6420aa07e4fcbb4aef1252296d8c3e236a84
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/http: clean up the usage
Junyeon LEE [Fri, 12 May 2017 15:35:06 +0000 (00:35 +0900)]
examples/http: clean up the usage

This commit cleans up the webserver and client examples usage and
improvement to check wrong input parameter.

Change-Id: Ie06315c4c18adc54bf5a2f030676ba75196f5eb0
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/websocket: clean up the usage
Junyeon LEE [Fri, 12 May 2017 14:49:14 +0000 (23:49 +0900)]
examples/websocket: clean up the usage

This commit cleans up the websocket example usage and
improvement to check wrong input parameter.

Change-Id: I2b35bc3ecf03f1a26867a1d64de40783ea678ec8
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/tls: supporting ECDSA ciphersuites
Junyeon LEE [Fri, 12 May 2017 14:34:11 +0000 (23:34 +0900)]
examples/tls: supporting ECDSA ciphersuites

With this commit, tls server and client examples support
the ECDSA releated ciphersuite and unsupport ECDH-ECDSA suite
with HW_ECDH_PARAM.

Change-Id: I832d710b4cc76917a97842def9297c1f4512ae2e
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/slsiwifi: fix ThreadEXEC option
Junhwan Park [Mon, 15 May 2017 08:04:34 +0000 (17:04 +0900)]
examples/slsiwifi: fix ThreadEXEC option

slsi_wifi_main should work with SYNC. Otherwise, the normal operation of
wifi does not work.

Change-Id: I3d0a4db510f31a0280a0338ce3886e6b06b4781a
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoartik053/openocd: apply custom patches when building
Heesub Shin [Mon, 15 May 2017 08:47:18 +0000 (17:47 +0900)]
artik053/openocd: apply custom patches when building

In order to use OpenOCD on ARTIK-053, we need custom modification to it.
This commit changes the build script so that our custom patches could be
applied before building.

Change-Id: Ia8f7fcd91fec2761b4fe29018ad1856b979d9f39
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053/openocd: introduce custom patches artik-specific
Heesub Shin [Mon, 15 May 2017 08:41:36 +0000 (17:41 +0900)]
artik053/openocd: introduce custom patches artik-specific

Patch files that contain custom modification that is artik-specific will
be managed under 'patches' directory. For now, there is only 1 that
fixes errors when creating tap, but will be added more in the future.

Change-Id: I5cac91f1afa87fbf8fbc497dab8c428bd8a0fa38
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: sidk_s5jt200: set CONFIG_BUILTIN_APPS=y by default
Heesub Shin [Mon, 15 May 2017 07:43:28 +0000 (16:43 +0900)]
artik053: sidk_s5jt200: set CONFIG_BUILTIN_APPS=y by default

Recently, a Kconfig knob CONFIG_BUILTIN_APPS has been added, but it is
not in defconfig, resulting in missing tash commands.

Change-Id: Id70deb96320391ccfde6b7a3d0eac6994fc941d3
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: remove CONFIG_S5J_DMA
Heesub Shin [Fri, 12 May 2017 07:15:13 +0000 (16:15 +0900)]
s5j: remove CONFIG_S5J_DMA

For now, driver implementation for DMA-330 (aka PL-330) is missing in
S5J, but Kconfig entry for it remains, making users confused. Let's
remove it. This also fixes compilation errors when CONFIG_S5J_DMA=y:

    make[1]: *** No rule to make target 's5j_dma.c', needed by 's5j_dma.o'.  Stop.
    make[1]: Leaving directory '/home/heesub/Documents/artik053/tizenrt/os/arch/arm/src'
    LibTargets.mk:236: recipe for target 'arch/arm/src/libarch.a' failed
    make: *** [arch/arm/src/libarch.a] Error 2

Change-Id: I0761e9d877fa1c972627bfec0ba691d29672a93f
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoexamples/timer: fix resource leak
Junhwan Park [Fri, 12 May 2017 08:57:52 +0000 (17:57 +0900)]
examples/timer: fix resource leak

This patch include preventing reasource leak.

Change-Id: I98bd1abf25e5e4371c75ae03b6e8744b70fd2da3
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoexamples/timer: initialize index of options
Jihun Ahn [Fri, 12 May 2017 06:53:34 +0000 (15:53 +0900)]
examples/timer: initialize index of options

Currently, index isn't initialized, it caused abnormal behavior after
someone calls getopt().
So, this commit add initialize the optind.

Change-Id: I71afe5a90827cf5719ef28c56d5202af2e587d7f
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agoexamples: add a sample application for showing timer usage
Jihun Ahn [Thu, 4 May 2017 12:53:02 +0000 (21:53 +0900)]
examples: add a sample application for showing timer usage

This commit adds an example project that performs timer control,
triggering timers and registering callback that is executed when the
timer expires. In order to use it, CONFIG_TIMER should be enabled.

Change-Id: I9feee9b90ec940d71b33bea5753edfbd92c29684
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agosidk_s5jt200: initialize timers at boot
Jihun Ahn [Mon, 8 May 2017 08:50:26 +0000 (17:50 +0900)]
sidk_s5jt200: initialize timers at boot

Now that the MCT of S5J is supported, let's initialize timers at boot so
that users may access them through /dev/timerN.

Change-Id: If10e25b3b0633071a21b875fc81263c80925c238
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: initialize timers at boot
Jihun Ahn [Mon, 8 May 2017 08:39:08 +0000 (17:39 +0900)]
artik053: initialize timers at boot

Now that the MCT of S5J is supported, let's initialize timers at boot so
that users may access them through /dev/timerN.

Change-Id: I48adf261e9c4358070b5992e51a3385013ffd55a
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: add device driver for mct
Jihun Ahn [Mon, 8 May 2017 08:38:21 +0000 (17:38 +0900)]
s5j: add device driver for mct

S5J has the Multi-core Timer which consists of one global timer and four
local timers. This commit introduces a device driver implementation for
it. For now, only local timers are supported.

Change-Id: I49bb642e9d4f65ba680aefb9798619e899f7d126
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agofs/mtd: fix malformed output of /proc/partitions
Heesub Shin [Tue, 16 May 2017 03:49:07 +0000 (12:49 +0900)]
fs/mtd: fix malformed output of /proc/partitions

Output of /proc/partitions is malformed due to incorrect buffer
handling. This commit fixes it.

Change-Id: I4e79d9e40c6ccd3c0698c461ef4a1d0f02db461d
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agofs: add filesystem usage command
Junhwan Park [Thu, 11 May 2017 10:21:49 +0000 (19:21 +0900)]
fs: add filesystem usage command

This patch includes filesystem usage command. It similar to 'df' in
linux.

TASH>>df -h
TASH>>df

Change-Id: I69e424337223eb556ad7c3c1ec4a258d1f85daa3
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>