GithubHelp home page GithubHelp logo

samsung / tizenrt Goto Github PK

View Code? Open in Web Editor NEW
559.0 67.0 560.0 550.54 MB

TizenRT is a lightweight RTOS-based platform to support low-end IoT devices

License: Apache License 2.0

Makefile 0.59% C 93.18% C++ 0.69% HTML 0.01% Shell 0.19% Batchfile 0.03% Assembly 4.87% Python 0.24% Tcl 0.11% Perl 0.01% Roff 0.01% PowerShell 0.01% Java 0.07% CMake 0.03%

tizenrt's Introduction

TizenRT

License Build Status

TizenRT is lightweight RTOS-based platform to support low-end IoT devices.
Please find project details at Wiki especially documentations page.

Contents

Environment Setup

TizenRT provides the easiest way to build with the use of Docker. There is no need to install the required libraries and toolchains since the provided Docker container already includes everything required for TizenRT development. However, if your development systems are not eligible for running the Docker container, all libraries and toolchains should be manually installed. Please refer to Manual Setup Build Environment.

For more information of libraries in the TizenRT Docker Image, see https://hub.docker.com/r/tizenrt/tizenrt/.

1. Install Docker

To install OS specific Docker engines, see https://docs.docker.com/install/. For example, if you are using Ubuntu, you need to install the Docker engine located at https://docs.docker.com/install/linux/docker-ce/ubuntu/. If you already have a Docker engine, please skip this step.

2. Get TizenRT source code

If you are building TizenRT on a Windows environment, you need to first configure CRLF as shown below:

git config --global core.autocrlf input

Now, clone TizenRT source code as shown below:

git clone https://github.com/Samsung/TizenRT.git
cd TizenRT
TIZENRT_BASEDIR="$PWD"

Note To contribute in this community, you need to create a fork, and clone your forked private repository instead of the main repository. Github guides this by working-with-forks.

How to build

There are two ways to build TizenRT.

Use an interactive tool

TizenRT provides an interactive tool (dbuild.sh) where you are prompted to select a option among multiple choices. According to your selection, it consecutively provides next-step options. When you become familiar to the TizenRT build system, you may use the dbuild.sh script with a specific build option.

Note As the build script is running based on Docker, it requires sudo for root permission. To run Docker without sudo, refer to https://docs.docker.com/install/linux/linux-postinstall/.

To get started, use the dbuild.sh script with the menu option as follows:

cd os
./dbuild.sh menu

This command shows you the complete list of supported boards first as shown below:

======================================================
  "Select Board"
======================================================
  "1. artik053"
  "2. cy4390x"
      ...
  "x. EXIT"
======================================================

After the board selection, you are prompted to select configuration of the given board:

======================================================
  "Select Configuration of artik053"
======================================================
  "1. hello"
  "2. tc"
      ...
  "x. EXIT"
======================================================

Finally, you are prompted to select a build option as shown below:

======================================================
  "Select build Option"
======================================================
  "1. Build with Current Configuration"
  "2. Re-configure"
  "3. Modify Current Configuration"
  "4. Clean Build"
  "5. Clean Build and Re-Configure"
  "6. Build SmartFS Image"
  "d. Download"
  "t. Build Test"
  "x. Exit"
======================================================

Once the board and configuration selection is finished,
you are prompted to select a build option repeatedly until you remove configuration by the Re-configure or Build Dist-Clean option.

Use specific build options

1. Configuration

cd os
./tools/configure.sh <board>/<configuration_set>

This command retrieves the specific pre-configured file named defconfig and Make.defs according to <board>/<configuration_set>.
Once the configuration is done, you can skip this step next time unless you want to change your configuration.
You can see collection of all configuration files at $TIZENRT_BASEDIR/build/configs.
To check all pre-defined configurations, type as follows:

./tools/configure.sh --help
1.1 Additional Configuration (optional)

After basic configuration by 1. Configuration, you can additionally modify your configuration with menuconfig.

./dbuild.sh menuconfig

Note In Docker environment, make menuconfig command from other README files should be replaced with this command. make menuconfig applies only in Manual Setup Build Environment.

2. Compilation

There are two aspects to compilation, namely Build and Clean, which are described as follows:

Build

To compile, simply type the following:

./dbuild.sh

After compilation, built binaries will be located in $TIZENRT_BASEDIR/build/output/bin.

Clean

There are two types of clean commands, clean and distclean.

./dbuild.sh clean

This command removes built files including objects, libraries, .depend, Make.dep, etc.
After modifying configuration with menuconfig, this command is required.

./dbuild.sh distclean

This command includes the clean option and additionally removes configured files including .config, Make.defs and linked folders / files.
Before changing basic configuration with ./configure.sh command, this command is required to delete pre-set configurations.

3. Programming

./dbuild.sh download [OPTION]

TizenRT supports download command to program a binary into a board.
You might be required to set up USB driver. For more information, please refer to Supported board / Emulator.

OPTION designates which flash partitions are flashed.
For example, ALL means programming all of binaries. This also depends on each board.

Advanced

You can give multiple build options to the dbuild.sh script as mentioned below:

./dbuild.sh distclean configure artik053 hello build download all

This executes sequentially multiple commands including

  1. Execute distclean
  2. Configure with artik053/hello
  3. Build
  4. Program all of binaries

Supported Board / Emulator

TizenRT supports multiple boards as well as QEMU.
The linked page for each board includes board-specific environments, programming method, and board information.

ARTIK053 [details]

ARTIK053S [details]

ARTIK055S [details]

CY4390X [details]

ESP32-DevKitC [details]

ESP-WROVER-KIT [details]

iMX RT 1020 EVK [details]

iMX RT 1050 EVK [details]

SIDK_S5JT200 [details]

STM32F407-DISC1 [details]

STM32F429I-DISCO [details]

STM32L4R9AI-DISCO [details]

QEMU [details]

tizenrt's People

Contributors

abhishek-samsung avatar amogh-samsung avatar btheosam avatar chanijjani avatar davidfather avatar dr-venkman avatar edwakuwaku avatar eunbongsong avatar ewoodev avatar hyunjun85 avatar jeongarmy avatar jeongchankim avatar jeongjunsik avatar jisuukim avatar jsdosa avatar juitem avatar junhwanpark avatar junmin-kim avatar junyeonl avatar kishore-sn avatar manoharahk avatar pillip8282 avatar sangwon03 avatar seonghobyeon avatar sinzah avatar sunghan-chang avatar taejun-kwon avatar thapav avatar yihyunjin avatar zhouxinhe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tizenrt's Issues

ISP driver errors

Hi,

I'm trying to use the ISP driver in TizenRT on the Artik 053 but am hitting some errors. For example, isp_write_storage returns ERROR_SSTORAGE_SFS_FWRITE:

int a = isp_write_storage("hello", strlen("hello"), 0);
printf("Result ==> %08x\n", a);

ERROR_SSTORAGE_SFS_FWRITE is also returned with isp_aes_generate_key_securekey:

a = isp_aes_generate_key_securekey(16, 0);
printf("Result ==> %08x\n", a);

There's no documentation so I don't know if I'm supposed to initialize anything.

I2C_TRANSFER description is inaccurate

The documentation for I2C_TRANSFER (include/tinyara/i2c.h) states:

  • Perform a sequence of I2C transfers, each transfer is started with a
  • START and the final transfer is completed with a STOP. Each sequence
  • will be an 'atomic' operation in the sense that any other I2C actions
  • will be serialized and pend until this read completes. Optional.

Since S5J implements it, it should follow the specification. This one doesn't.

  1. Start/stop depends on sequence length/message length (it should not)
  2. try_address does not care for HW errors (hsi2c_stop/hsic_start call hsi2c_wait_xfer_done and do not check the return value), result being multiple start/stop commands get issued

Boot fails for artik053/tash compiled with GCC 5.4

When I compile TizenRT with config artik053/tash it fails during boot with abort.

This is my boot log

U-Boot 2017.01-00065-g11a594a84763 (May 04 2017 - 21:26:44 +0900)

CPU:   Exynos200 @ 320 MHz
Model: ARTIK-053 based on Exynos T20
DRAM:  722 KiB
WARNING: Caches not enabled
BL1 released at 2017-3-13 15:00
Flash: 8 MiB
*** Warning - bad CRC, using default environment

In:    serial@80180000
Out:   serial@80180000
Err:   serial@80180000
Hit any key to stop autoboot:  0 
gpio: pin gpg16 (gpio 46) value is 1
## Starting application at 0x040C8020 ...
s5j_sflash_init: FLASH Quad Enabled
arm_dataabort: 
Data abort. PC: 040c861c DFAR: fffffffc DFSR: 0000080d
up_assert: Assertion failed at file:armv7-r/arm_dataabort.c line: 111 task: �

What is the automated way to build release|debug from a single config?

In nuttx, the flag is R: one wants to build release, they invoke:
nuttx/os$ make R=1
or
nuttx/os$ make R=0

In TizenRT config system (Kconfig files, seen thru menuconfig make target) there are several flags, including:
DEBUG_SYMBOLS DEBUG_FULLOPT DEBUG_NOOPT DEBUG_CUSTOM.
Some of them are not used in the build process (DEBUG_FULLOPT is not used at all).
The sources are built using ARCHOPTIMIZATION and MAXOPTIMIZATION, which are inconsistently set in Make.defs files (i.e.: some set MAXOPTIMIZATION to -O0).

How can one build TizenRT with consistent debug/release flags without changing sources (Make.defs)?

GCC 7.2.0 compilation failure - double_t

When compiling with Linux toolchain, there are build errors like:

math/lib_j1.c: In function ‘pone’:
math/lib_j1.c:363:2: error: unknown type name ‘double_t’; did you mean
‘double’?
  double_t z;
  ^~~~~~~~

UDP broadcast is not supported

Lets assume there are two sockets
port = 32100;
S1 = socket(INET, DGRAM).bind(0.0.0.0, port);
S2 = socket(INET, DGRAM).bind(0.0.0.0, port);
S2.recv();
S1.sendto(message, {INET, DGRAM, 255.255.255.255, port});

S2 never receives the message.

This is due to:
os/net/lwip/src/core/ipv4/ip.c:167:
struct netif *ip_route(ip_addr_t *dest) {
...
if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) {
return netif;
}

The function ip_addr_netcmp() does not support broadcast/multicast adresses.

Another problem is that function udp_sendto_chksum (os/net/lwip/src/core/udp.c:474)
calls the ip_route just once. So if there are more network interfaces to broadcast on, lwip implementation of UDP does nota llow that as well.

Should I split this issue into two?

QEMU Problem.

I use qemu/tash_16m config.
and then run as below and this stuck as below log.
How can i fix this ?
ebsong@ubuntu:~/tizenrt/github/upstream/TizenRT/os$ qemu-system-arm -M lm3s6965evb -kernel ../build/output/bin/tinyara -nographic -gdb tcp::3333
up_assert: Assertion failed at file:armv7-m/up_blocktask.c line: 111 task: ��
up_dumpstate: sp: 20002f38
up_dumpstate: stack base: 00000155
up_dumpstate: stack size: 0000011d
up_dumpstate: ERROR: Stack pointer is not within the allocated stack
mpu_show_regioninfo: *****************************************************************************
mpu_show_regioninfo: REGION_NO. BASE_ADDRESS SIZE REG STATUS ATTRIBUTES
mpu_show_regioninfo: *****************************************************************************
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: 0 0 0 0 0 0
mpu_show_regioninfo: *****************************************************************************

How to understand the pre-built configs for artik053?

There are several provided configs under build/configs/artik053 with different pre-built configurations.
I am confused that what are their purpose? Why not provide one default config with support the artik053's all the HW features for end user?

Thanks very much ahead for your help~

GDB debugging fails for TizenRT/Artik053

I would like to debug TizenRT using GBD and OpenOCD. It fails for me. I compiled application demo and TASH is working over UART but debugging with GDB fails.

I started OpenOCD server using configuration from TizenRT repo:

$ tizenrt/build/configs/artik053/tools/openocd$ ./linux64/openocd -f artik053.cfg -d

When I connect using GDB:

(gdb) target remote localhost:3333

I get output:

#0  0x00000000 in ?? ()

All commands for GDB return errors or zeros.

My full GDB log:

$ arm-none-eabi-gdb tizenrt/build/output/bin/tinyara
GNU gdb (7.10-1ubuntu3+9) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from tizenrt/build/output/bin/tinyara...done.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x00000000 in ?? ()
(gdb) 

My Full OpenOCD log:

$ tizenrt/build/configs/artik053/tools/openocd$ ./linux64/openocd -f artik053.cfg -d
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
User : 13 1 command.c:544 command_print(): debug_level: 3
Debug: 14 1 options.c:181 add_default_dirs(): bindir=/home/heesub/Documents/tinyara/build/configs/artik053/tools/openocd/source/openocd/../openocd-install/bin
Debug: 15 1 options.c:182 add_default_dirs(): pkgdatadir=/home/heesub/Documents/tinyara/build/configs/artik053/tools/openocd/source/openocd/../openocd-install/share/openocd
Debug: 16 1 options.c:183 add_default_dirs(): exepath=/home/piotr/src/iotjs/deps/tizenrt/build/configs/artik053/tools/openocd/linux64
Debug: 17 1 options.c:184 add_default_dirs(): bin2data=../share/openocd
Debug: 18 1 configuration.c:42 add_script_search_dir(): adding /home/piotr/.openocd
Debug: 19 1 configuration.c:42 add_script_search_dir(): adding /home/piotr/src/iotjs/deps/tizenrt/build/configs/artik053/tools/openocd/linux64/../share/openocd/site
Debug: 20 1 configuration.c:42 add_script_search_dir(): adding /home/piotr/src/iotjs/deps/tizenrt/build/configs/artik053/tools/openocd/linux64/../share/openocd/scripts
Debug: 21 1 configuration.c:82 find_file(): found artik053.cfg
Debug: 22 1 configuration.c:82 find_file(): found artik053-usb-ftdi.cfg
Debug: 23 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_interface ftdi
Debug: 24 1 command.c:143 script_debug(): command - interface ocd_interface ftdi
Debug: 26 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_device_desc'...
Debug: 27 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_serial'...
Debug: 28 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_location'...
Debug: 29 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_channel'...
Debug: 30 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_layout_init'...
Debug: 31 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_layout_signal'...
Debug: 32 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_set_signal'...
Debug: 33 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_get_signal'...
Debug: 34 2 command.c:364 register_command_handler(): registering 'ocd_ftdi_vid_pid'...
Debug: 35 2 command.c:364 register_command_handler(): registering 'ocd_ftdi_tdo_sample_edge'...
Debug: 36 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_vid_pid 0x0403 0x6010
Debug: 37 2 command.c:143 script_debug(): command - ftdi_vid_pid ocd_ftdi_vid_pid 0x0403 0x6010
Debug: 39 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_layout_init 0x0008 0x000b
Debug: 40 2 command.c:143 script_debug(): command - ftdi_layout_init ocd_ftdi_layout_init 0x0008 0x000b
Debug: 42 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_layout_signal nTRST -data 0x0200 -oe 0x0200
Debug: 43 2 command.c:143 script_debug(): command - ftdi_layout_signal ocd_ftdi_layout_signal nTRST -data 0x0200 -oe 0x0200
Debug: 45 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080
Debug: 46 2 command.c:143 script_debug(): command - ftdi_layout_signal ocd_ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080
Debug: 48 2 configuration.c:82 find_file(): found s5jt200.cfg
Debug: 49 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 2000
Debug: 50 2 command.c:143 script_debug(): command - adapter_khz ocd_adapter_khz 2000
Debug: 52 2 core.c:1631 jtag_config_khz(): handle jtag khz
Debug: 53 2 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 54 2 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 55 2 command.c:544 command_print(): adapter speed: 2000 kHz
Debug: 56 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 57 2 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Info : 58 2 transport.c:286 jim_transport_select(): auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Debug: 59 2 command.c:364 register_command_handler(): registering 'ocd_jtag_flush_queue_sleep'...
Debug: 60 2 command.c:364 register_command_handler(): registering 'ocd_jtag_rclk'...
Debug: 61 2 command.c:364 register_command_handler(): registering 'ocd_jtag_ntrst_delay'...
Debug: 62 2 command.c:364 register_command_handler(): registering 'ocd_jtag_ntrst_assert_width'...
Debug: 63 2 command.c:364 register_command_handler(): registering 'ocd_scan_chain'...
Debug: 64 2 command.c:364 register_command_handler(): registering 'ocd_jtag_reset'...
Debug: 65 2 command.c:364 register_command_handler(): registering 'ocd_runtest'...
Debug: 66 2 command.c:364 register_command_handler(): registering 'ocd_irscan'...
Debug: 67 2 command.c:364 register_command_handler(): registering 'ocd_verify_ircapture'...
Debug: 68 2 command.c:364 register_command_handler(): registering 'ocd_verify_jtag'...
Debug: 69 2 command.c:364 register_command_handler(): registering 'ocd_tms_sequence'...
Debug: 70 2 command.c:364 register_command_handler(): registering 'ocd_wait_srst_deassert'...
Debug: 71 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 72 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 73 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 74 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 75 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 76 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 77 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 78 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 79 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 80 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 81 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 82 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 83 2 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 84 2 command.c:364 register_command_handler(): registering 'ocd_svf'...
Debug: 85 2 command.c:364 register_command_handler(): registering 'ocd_xsvf'...
Debug: 86 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 87 3 command.c:143 script_debug(): command - ocd_transport ocd_transport select
Debug: 88 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_jtag newtap s5jt200 dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x4ba00477
Debug: 89 3 command.c:143 script_debug(): command - ocd_jtag ocd_jtag newtap s5jt200 dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x4ba00477
Debug: 90 3 tcl.c:549 jim_newtap_cmd(): Creating New Tap, Chip: s5jt200, Tap: dap, Dotted: s5jt200.dap, 8 params
Debug: 91 3 tcl.c:573 jim_newtap_cmd(): Processing option: -irlen
Debug: 92 3 tcl.c:573 jim_newtap_cmd(): Processing option: -ircapture
Debug: 93 3 tcl.c:573 jim_newtap_cmd(): Processing option: -irmask
Debug: 94 3 tcl.c:573 jim_newtap_cmd(): Processing option: -expected-id
Debug: 95 3 core.c:1304 jtag_tap_init(): Created Tap: s5jt200.dap @ abs position 0, irlen 4, capture: 0x1 mask: 0xf
Debug: 96 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target create s5jt200.r4 cortex_r4 -chain-position s5jt200.dap -dbgbase 0x801E0000
Debug: 97 3 command.c:143 script_debug(): command - ocd_target ocd_target create s5jt200.r4 cortex_r4 -chain-position s5jt200.dap -dbgbase 0x801E0000
Debug: 98 3 target.c:1899 target_free_all_working_areas_restore(): freeing all working areas
Debug: 99 3 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 100 3 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 101 3 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 102 3 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 103 3 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 104 3 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 105 3 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 106 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 107 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 108 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 109 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 110 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 111 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 112 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 113 3 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 114 3 command.c:364 register_command_handler(): registering 'ocd_cache_config'...
Debug: 115 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 116 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 117 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 118 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 119 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 120 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 121 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 122 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 123 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 124 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 125 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 126 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 127 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 128 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 129 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 130 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 131 3 command.c:364 register_command_handler(): registering 'ocd_cache'...
Debug: 132 3 command.c:364 register_command_handler(): registering 'ocd_cortex_r4'...
Debug: 133 3 command.c:364 register_command_handler(): registering 'ocd_cortex_r4'...
Debug: 134 3 command.c:364 register_command_handler(): registering 'ocd_cortex_r4'...
Debug: 135 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 136 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 137 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 138 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 139 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 140 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 141 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 142 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 143 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 144 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 145 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 146 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 147 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 148 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 149 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 150 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 151 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 152 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 153 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 154 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 155 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 156 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 157 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 158 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 159 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 160 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 161 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 162 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 163 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 164 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 165 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 166 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 167 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 168 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 169 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 170 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 171 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 172 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 173 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 174 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 175 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 176 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 177 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 178 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 179 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 180 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 181 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 182 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 183 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 184 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 185 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 186 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 187 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 188 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 189 3 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 190 4 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 191 4 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 192 4 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 193 4 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 194 4 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 195 4 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 196 4 command.c:364 register_command_handler(): registering 'ocd_s5jt200.r4'...
Debug: 197 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_s5jt200.r4 configure -event gdb-attach  cortex_r4 dbginit 
Debug: 198 4 command.c:143 script_debug(): command - ocd_s5jt200.r4 ocd_s5jt200.r4 configure -event gdb-attach  cortex_r4 dbginit 
Debug: 199 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_s5jt200.r4 configure -work-area-phys 0x02021000 -work-area-size 0x1000
Debug: 200 4 command.c:143 script_debug(): command - ocd_s5jt200.r4 ocd_s5jt200.r4 configure -work-area-phys 0x02021000 -work-area-size 0x1000
Debug: 201 4 target.c:1899 target_free_all_working_areas_restore(): freeing all working areas
Debug: 202 4 target.c:1899 target_free_all_working_areas_restore(): freeing all working areas
Debug: 203 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_gdb_breakpoint_override hard
Debug: 204 4 command.c:143 script_debug(): command - gdb_breakpoint_override ocd_gdb_breakpoint_override hard
User : 206 4 gdb_server.c:3185 handle_gdb_breakpoint_override_command(): force hard breakpoints
Debug: 207 4 configuration.c:82 find_file(): found partition_map.cfg
Debug: 208 4 configuration.c:82 find_file(): found ./scripts/mem_helper.tcl
Debug: 209 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_add_usage_text mrw address
Debug: 210 4 command.c:143 script_debug(): command - add_usage_text ocd_add_usage_text mrw address
Debug: 212 4 command.c:1098 help_add_command(): added 'mrw' help text
Debug: 213 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_add_help_text mrw Returns value of word in memory.
Debug: 214 4 command.c:143 script_debug(): command - add_help_text ocd_add_help_text mrw Returns value of word in memory.
Debug: 216 4 command.c:1111 help_add_command(): added 'mrw' help text
Debug: 217 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_add_usage_text mrb address
Debug: 218 4 command.c:143 script_debug(): command - add_usage_text ocd_add_usage_text mrb address
Debug: 220 4 command.c:1098 help_add_command(): added 'mrb' help text
Debug: 221 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_add_help_text mrb Returns value of byte in memory.
Debug: 222 4 command.c:143 script_debug(): command - add_help_text ocd_add_help_text mrb Returns value of byte in memory.
Debug: 224 4 command.c:1111 help_add_command(): added 'mrb' help text
Debug: 225 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_add_usage_text mmw address setbits clearbits
Debug: 226 4 command.c:143 script_debug(): command - add_usage_text ocd_add_usage_text mmw address setbits clearbits
Debug: 228 4 command.c:1098 help_add_command(): added 'mmw' help text
Debug: 229 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 230 4 command.c:143 script_debug(): command - add_help_text ocd_add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 232 4 command.c:1111 help_add_command(): added 'mmw' help text
Debug: 233 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_reset_config trst_and_srst srst_push_pull trst_push_pull
Debug: 234 4 command.c:143 script_debug(): command - reset_config ocd_reset_config trst_and_srst srst_push_pull trst_push_pull
User : 236 4 command.c:544 command_print(): trst_and_srst separate srst_gates_jtag trst_push_pull srst_push_pull connect_deassert_srst
Debug: 237 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_debug_level -1
Debug: 238 4 command.c:143 script_debug(): command - debug_level ocd_debug_level -1
debug_level: -1
undefined debug reason 7 - target needs reset

'date' command does not work

Hello.

When I enable 'CONFIG_LIBC_LOCALTIME' option in menuconfig, 'date' command does not work.
I am trying to change the date and time using 'date -s'. However, it is always fixed at 1970. It must be disabled by 'CONFIG_LIBC_LOCALTIME'. Is this normal?

Missing tinyara headers

Hi,
I just had a quick look at TizenRT, and noticed that some included headers are missing, either they should be added or codebase should be cleaned.

Here a list of non available included headers:

tinyara/analog/dac.h
tinyara/binfmt/elf.h
tinyara/drivers/rwbuffer.h
tinyara/errno.h
tinyara/fs/automount.h
tinyara/input/kbd_codec.h
tinyara/input/mouse.h
tinyara/input/touchscreen.h
tinyara/lcd/lcd.h
tinyara/module.h
tinyara/mtd/mtd.h
tinyara/net/arp.h
tinyara/net/igmp.h
tinyara/net/pkt.h
tinyara/net/tcp.h
tinyara/net/udp.h
tinyara/scsi.h
tinyara/sensors/ppd42ns.h

Some are in TizenRT/os/include/ (ie: errno.h) while others are just gone (ie: automount.h) also some symbols are unresolved (ie: arp_out).

Any hints are welcome.

Flashing with "make download ALL" fails for Artik 053

I compiled TizenRT for Artik053 at fresh installed Ubuntu with dependencies installed. It fails to flash Artik053 board with OpenOCD error when make download ALL is executed.

This log is very similar to issue described at artil.io:

https://developer.artik.io/forums/t/how-to-do-onboarding-with-artik053-board/3122

There is not solution described in artik.io or any mention is Tizen RT source code how to solve this issue.

Flash log:

piotr@bdell:~/src/iotjs/deps/tizenrt/os$ make download ALL
openocd is picked from /home/piotr/src/iotjs/deps/tizenrt/os/../build/configs/artik053/tools/openocd/linux64
Binaries are picked from /home/piotr/src/iotjs/deps/tizenrt/os/../build/output/bin
Board path is /home/piotr/src/iotjs/deps/tizenrt/os/../build/configs/artik053
ALL :
~/src/iotjs/deps/tizenrt/build/configs/artik053/tools/openocd ~/src/iotjs/deps/tizenrt/os
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 2000 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
force hard breakpoints
trst_and_srst separate srst_gates_jtag trst_push_pull srst_push_pull connect_deassert_srst
debug_level: -1

Is the arastorage thread safe?

I have two questions about the arastorage:

  1. Is it thread safe? could I share a database of arastorage between two threads without making any protections of critical section?
  2. A relation of arastorage contains only one table, and it couldn't create more tables?

vfork() cant work properly

Hi.

I'm handling with vfork(), found it can't work properly.
Please focus on below code, After vfork(), OS makes two process, is called parent and child.
After vfork(), parent and child is made successfully. But child is on;ly running, parent can't execute until child will be terminated. If child will be terminated after 10 seconds, then parent process would be executed.

int pid;

pid = vfork();

if ( pid == 0 ) {
while (1) {
printf("This is child\n");
sleep(1);
}
} else {
while (1) {
printf("This is parent\n");
sleep(1);
}
}

Thanks you.

pthread_cond_broadcast + pthread_cond_wait BROKEN

PThread conditional variables do not work: I was unable to create a working producer / consumerS paradigm without a deadlock. The same code works perfectly on Linux.

Example:

// Global variables:
pthread_mutex_t mut;
pthread_cond_t cond;

pthread_t producer_th, consumer1_th, consumer2_th;
char sndbuf[30];

// Thread functions:
void *consumer1_threadfunc(void *par)
{
	char locbuf[30];

	printf("CONSUMER1 START\n");
	while (true)
	{
		pthread_mutex_lock(&mut);
		{
			pthread_cond_wait(&cond, &mut);
			memcpy(locbuf, sndbuf, sizeof(sndbuf));
		}
		pthread_mutex_unlock(&mut);
		printf("CONSUMER1: %s\n", locbuf);
	}
	
	return NULL;
}

void *consumer2_threadfunc(void *par)
{
	char locbuf[30];

	printf("CONSUMER2 START\n");
	while (true)
	{
		pthread_mutex_lock(&mut);
		{
			pthread_cond_wait(&cond, &mut);
			memcpy(locbuf, sndbuf, sizeof(sndbuf));
		}
		pthread_mutex_unlock(&mut);
		printf("CONSUMER2: %s\n", locbuf);
	}

	return NULL;
}

void *producer_threadfunc(void *par)
{
	int j = 0;
	while (true)
	{
		pthread_mutex_lock(&mut);
		{
			sprintf(sndbuf, "DATUM %d %10d", ++j, rand());
			printf("> Sending: %s\n", sndbuf);
			pthread_cond_broadcast(&cond);
		}
		pthread_mutex_unlock(&mut);

		sleep(2);
	}
	return NULL;
}


// In main():
 
	pthread_mutex_init(&mut, NULL);
	pthread_cond_init(&cond, NULL);

	pthread_create(&producer_th, NULL, producer_threadfunc, NULL);
	pthread_create(&consumer1_th, NULL, consumer1_threadfunc, NULL);
	pthread_create(&consumer2_th, NULL, consumer2_threadfunc, NULL);

	// main loop
	// ...

Artik Demo Example LD Error

configure.sh artik053/iotivity
make menuconfig -> choose "Artik Demo Examples from Application Configuration Menu"

LD: tinyara
$HOME/tizenrt/TizenRT/os/../build/output/libraries/libapps.a(artik_demo.o): In function wifiAutoConnectInit': $HOME/tizenrt/TizenRT/apps/examples/artik_demo/artik_demo.c:273: undefined reference to dm_conn_register_linkup_cb'
$HOME/tizenrt/TizenRT/apps/examples/artik_demo/artik_demo.c:277: undefined reference to dm_conn_get_interface' $HOME/tizenrt/TizenRT/apps/examples/artik_demo/artik_demo.c:282: undefined reference to WifiIsConnected'
$HOME/tizenrt/TizenRT/apps/examples/artik_demo/artik_demo.c:298: undefined reference to get_security_config' $HOME/tizenrt/TizenRT/os/../build/output/libraries/libapps.a(artik_demo.o): In function artik_demo_run':
$HOME/tizenrt/TizenRT/apps/examples/artik_demo/artik_demo.c:910: undefined reference to dm_conn_get_rssi' $HOME/tizenrt/TizenRT/apps/examples/artik_demo/artik_demo.c:915: undefined reference to dm_conn_get_tx_power'
$HOME/tizenrt/TizenRT/apps/examples/artik_demo/artik_demo.c:920: undefined reference to `dm_conn_get_channel'

Tools/examples not available despite being configured

Configuring an example/tool/system command results in the relevant function being compiled int the TizenRT binary, nothing more.

For some functions it might be enough, for most it isn't. All functions of the proto:
int function(int argc, const char **argv)
make little sense if they are not available through the built-in shell (nsh/tash).
There should be a way (other than adding some code to register each of these functions to tash manually) to have them available after being configured.

Crash upon boot

Latest TizenRT (revision 1a6d47a) crashes Artik053 board upon boot (log below).
Reverting commit 035144d fixes the problem on my board.

U-Boot 2017.01-00065-g11a594a84763 (May 04 2017 - 21:26:44 +0900)

CPU: Exynos200 @ 320 MHz
Model: ARTIK-053 based on Exynos T20
DRAM: 722 KiB
WARNING: Caches not enabled
BL1 released at 2017-3-13 15:00
Flash: 8 MiB
*** Warning - bad CRC, using default environment

In: serial@80180000
Out: serial@80180000
Err: serial@80180000
Hit any key to stop autoboot: 0
gpio: pin gpg16 (gpio 46) value is 1
## Starting application at 0x040C8020 ...
s5j_sflash_init: FLASH Quad Enabled
uart_register: Registering /dev/console
uart_register: Registering /dev/ttyS0
uart_register: Registering /dev/ttyS1
uart_register: Registering /dev/ttyS2
uart_register: Registering /dev/ttyS3
uart_register: Registering /dev/ttyS4
up_assert: Assertion failed at file:driver/mtd/smart.c line: 1280 task: Idle Task
up_dumpstate: Current sp: 0206f728
up_dumpstate: User stack:
up_dumpstate: base: 0206f8c4
up_dumpstate: size: 00000400
up_dumpstate: used: 00000000
up_dumpstate: User Stack
up_stackdump: 0206f720: 040caa10 020480ec 00000002 040caa1c 0206f728 020254fc 00000400 0204
up_stackdump: 0206f740: 042072c4 040caae0 00000500 020255d0 00000500 04228fb0 0000071a 020c
up_stackdump: 0206f760: 0471a000 041783d0 0206f7a0 00000001 00000004 02074ee0 00000000 0000
up_stackdump: 0206f780: 00000000 e6074e90 0207cb85 041789f8 0206f7c8 02074ee0 020254fc 0000
up_stackdump: 0206f7a0: 00000000 03200000 02074f40 04001be8 0207cfa0 04187078 00001000 0000
up_stackdump: 0206f7c0: 04220000 02000000 fffffffb 00000000 020480ec 0417ba5c 0206f814 0408
up_stackdump: 0206f7e0: 040d8c04 0206f814 02074e90 00000004 00000004 02074ee0 00000064 0000
up_stackdump: 0206f800: 0420772c 040cd068 00000000 00000000 01170660 396d6f72 60000100 0200
up_stackdump: 0206f820: 04001000 00000800 02074e90 00064000 020249cc 042075e3 0420759e 0425
up_stackdump: 0206f840: 0000077e 00000009 04170f0c 040cd2c8 02072e50 00000000 040d0b1c 0400
up_stackdump: 0206f860: 04170660 04228c70 04170660 040ccc8c 00000003 040ce1cc 00000003 0418
up_stackdump: 0206f880: 00000000 020480ec 00000002 040ce24c 00000003 040ce260 02071f80 0408
up_stackdump: 0206f8a0: 00000024 00078738 0206f8c8 00000020 020480ec 00000000 00000400 0208
up_stackdump: 0206f8c0: 040c8020 020a7554 00000000 00000000 00000010 80000000 0000dead 0000
up_registerdump: current_regs is Null, up_assert(panic) was called directly.
up_registerdump: SPSR_SVC: 60000153 CPSR : 60000153
up_registerdump: SP_IRQ: 02023800 LR_IRQ: 600001d3 SPSR_IRQ : 60000153
up_registerdump: SP_ABT: 26305425 LR_ABT: 28804a15 SPSR_ABT : 08015806
up_registerdump: SP_UND: 0546acc0 LR_UND: 68440882 SPSR_UND : 06030a8a
up_registerdump: R0: 0202776c 00000020 0000004d 0202776c 020480ec 00000002 040c8020 0000002
up_registerdump: R8: 020c6884 02044ef0 00000000 00000000 00000000 0206f6f0 040ca64c 040ca54
up_registerdump: CPSR: 60000153
up_taskdump: Idle Task: PID=0 Stack Used=0 of 0
up_taskdump: hpwork: PID=1 Stack Used=284 of 2028
up_taskdump: lpwork: PID=2 Stack Used=276 of 2028
up_taskdump: logm: PID=3 Stack Used=324 of 2028

Build failure (sidk_s5jt200/hello)

config.txt
build failure

make[2]: Entering directory '/home/ravi/sbox/gits/github/TizenRT/external/wakaama'
CC: examples/shared/commandline.c
In file included from examples/shared/commandline.c:18:0:
examples/shared/commandline.c: In function 'prv_displayHelp':
examples/shared/commandline.c:74:17: error: invalid type argument of '->' (have 'int')
fprintf(stdout, HELP_COMMAND"\t"HELP_DESC"\r\n");
^
examples/shared/commandline.c:78:21: error: invalid type argument of '->' (have 'int')
fprintf(stdout, "%s\t%s\r\n", commandArray[i].name, commandArray[i].shortDesc);
^
examples/shared/commandline.c:83:17: error: invalid type argument of '->' (have 'int')
fprintf(stdout, "%s\r\n", cmdP->longDesc?cmdP->longDesc:cmdP->shortDesc);
^
examples/shared/commandline.c: In function 'handle_command':
examples/shared/commandline.c:116:21: error: invalid type argument of '->' (have 'int')
fprintf(stdout, UNKNOWN_CMD_MSG"\r\n");
^
Makefile:75: recipe for target 'commandline.o' failed
make[2]: *** [commandline.o] Error 1
make[2]: Leaving directory '/home/ravi/sbox/gits/github/TizenRT/external/wakaama'
Makefile:111: recipe for target 'wakaama_all' failed
make[1]: *** [wakaama_all] Error 2
make[1]: Leaving directory '/home/ravi/sbox/gits/github/TizenRT/external'
LibTargets.mk:173: recipe for target '../external/libexternal.a' failed
make: *** [../external/libexternal.a] Error 2

build options:
./configure.sh sidk_s5jt200/hello
config file attached!

cannot boot after flash all

Hi,
I compile TizenRT for s5jt200 board and flash all binary into the board, but the board can't boot up after flashing, and the serial keep ouputing
UUUUUUUUCB02000016061010170220100000001000000000000000000000FF00000000000000000000000000170B00019A9B51EFCB00098207F0030FC9C804069BBDF5B6FDD6C7F3ZZZZZZZZ
after reset

arastorage can't support update command

The arastorage's command is like the macros below, but if I want to update the record in the database, how could I do? I haven't found an update command for this.

#define AQL_TYPE_CREATE_ATTRIBUTE
#define AQL_TYPE_CREATE_INDEX
#define AQL_TYPE_CREATE_RELATION

#define AQL_TYPE_INSERT

#define AQL_TYPE_REMOVE_ATTRIBUTE
#define AQL_TYPE_REMOVE_INDEX
#define AQL_TYPE_REMOVE_RELATION
#define AQL_TYPE_FLUSH

#define AQL_TYPE_SELECT
#define AQL_TYPE_REMOVE_TUPLES

WIFI_TEST / LWM2M build error

Hello,

I set the following to test wakaama in an external function. It is expected to be defined by WIFI_TEST. Do I need to add another defconfig? Or, are there any settings I need to enable for additional?

  • version:
$ git hist -2
*   5b52209 2017-05-15 | Merge pull request #90 from Samsung/g_irqvector_sizelimit (HEAD -> master, upstream/master, origin/master, origin/HEAD) [sunghan-chang]
|\  
| * 6e2d1ad 2017-05-12 | Limit the g_irqvector size to NR_IRQS [pradeep.ns]
  • branch: master
  • config: artik053/nettest
  • menuconfig:
    External Functions > DM > LWM2M_WAKAAMA
  • build error:
CC:  src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c: In function 'prv_dm_conn_scan_result':
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:410:31: error: 'CONFIG_DM_AP_SSID' undeclared (first use in this function)
   WiFiNetworkJoin((uint8_t *) CONFIG_DM_AP_SSID, strlen(CONFIG_DM_AP_SSID), \
                               ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:410:31: note: each undeclared identifier is reported only once for each function it appears in
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:411:58: error: 'CONFIG_DM_AP_SECURITY' undeclared (first use in this function)
       NULL, (slsi_security_config_t *) getSecurityConfig(CONFIG_DM_AP_SECURITY, \
                                                          ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:412:9: error: 'CONFIG_DM_AP_PASS' undeclared (first use in this function)
         CONFIG_DM_AP_PASS, SLSI_WIFI_STATION_IF));
         ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c: In function 'dm_conn_wifi_scan':
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:476:31: error: 'CONFIG_DM_AP_SSID' undeclared (first use in this function)
   WiFiNetworkJoin((uint8_t *) CONFIG_DM_AP_SSID, strlen(CONFIG_DM_AP_SSID), \
                               ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:477:58: error: 'CONFIG_DM_AP_SECURITY' undeclared (first use in this function)
       NULL, (slsi_security_config_t *) getSecurityConfig(CONFIG_DM_AP_SECURITY, \
                                                          ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:478:9: error: 'CONFIG_DM_AP_PASS' undeclared (first use in this function)
         CONFIG_DM_AP_PASS, SLSI_WIFI_STATION_IF));
         ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c: In function 'dm_conn_wifi_connect':
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:510:36: error: 'CONFIG_DM_AP_SSID' undeclared (first use in this function)
   ret = WiFiNetworkJoin((uint8_t *)CONFIG_DM_AP_SSID, strlen(CONFIG_DM_AP_SSID), \
                                    ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:511:61: error: 'CONFIG_DM_AP_SECURITY' undeclared (first use in this function)
          NULL, (slsi_security_config_t *) getSecurityConfig(CONFIG_DM_AP_SECURITY, CONFIG_DM_AP_PASS, SLSI_WIFI_STATION_IF));
                                                             ^
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:511:84: error: 'CONFIG_DM_AP_PASS' undeclared (first use in this function)
          NULL, (slsi_security_config_t *) getSecurityConfig(CONFIG_DM_AP_SECURITY, CONFIG_DM_AP_PASS, SLSI_WIFI_STATION_IF));
                                                                                    ^
Makefile:55: recipe for target 's5j_dm_connectivity.o' failed

fail-fast rule violation and developer unfriendly environment

TizenRT is not convenient for developers. There is common pattern that in case of missing configuration flag fakes API:
https://github.com/Samsung/TizenRT/blob/master/framework/src/iotbus/iotbus_spi.c#L171

As a result, newcommer instead of getting error during compile time, have to compile, flash, execute code to get information that something is wrong. Usually it will be NULL from open function and that holds no clue what actually happend(wrong config or not supported). This is quite frustrating.

To detect that API is not supported you have to (read TizenRT sources first) call function other than open with NULL as handle and check whether response is IOTBUS_ERROR_NOT_SUPPORTED or IOTBUS_ERROR_INVALID_PARAMETER. I can imagine much better ways to discover that...

Solution:
remove fake API calls. This will cause developer code to fail during compilation, and enforce proper guarding code behind the configuration flags in consistant way.

open() on a directory is not supported

In TizenRT there is no notion of a dirfd.
open(path_to_directory, _, _) returns -1 with errno set to EISDIR.

POSIX (POSIX.1-2008) mandates that open works on directories, returning a descriptor suitable for
directory streaming operations (fstatat, openat, [un]linkat, readlinkat, renameat and the like).

Is TizenRT interested in having this functionality (open on directories) provided?
We (IoT.js) could use this functionality, since some tests require that a directory can be open'ed and resulting fd be able to be stat'ed.

@sunghan-chang Would you please voice your opinion on this one?

I2C read does not work on Artik053

I have some questions regarding I2C implementation on Artik.

  1. Why does read fail to generate a correct I2C transaction? What can I do to fix it?
  2. The i2c driver does not finish the transaction when there is a write of 1 (one) byte. Why?
    How are devices that do not have registers (i.e.: pcf8574) supposed to be handled?
  3. The I2C signals driven by artik053 devkit rise slowly. Is it relevant to the other observed behavior?

Details follow.

First, the i2c_read did not work for me: artik failed to put a transaction onto the bus (not even START has been generated, just three stray SCL pulses -- please note SDA is high all the time). Scope diagram:
short_read

Write works somewhat better, in the sense that there are correct transactions (with an exception) issued onto the bus:
i2c_write

This is what my test suite looks like:
scope_artik

BTW artik devboard I2C output rises slowly, at about 200ns (at 400kHz bus clock) to reach TTL 1. I wonder if this is of any relevance (scope diagram attached):
sharks_n_sub

LWIP issue on EOF

in line https://github.com/Samsung/TizenRT/blob/master/os/net/lwip/src/api/sockets.c#L703 ERR_CLSD is considered a normal operation - peer send EOF, so will not send any more data but it does not close connection and waits for response. But at the same time conn->last_err is set to ERR_CLSD. This is considered as a fatal as per ERR_IS_FATAL macro and prevent do_write from sending back.
The simplest use case is iotjs echo server that gather data from client and when client sends EOF it sends back all gathered data.

My suggestion is to change https://github.com/Samsung/TizenRT/blob/master/os/net/lwip/src/api/sockets.c#L703 from:

				if (err == ERR_CLSD) {
					return 0;
				} else {
					return -1;
				}

to

				if (err == ERR_CLSD) {
					// Normal operation, peer ended, 
                                        // TODO: should call lwip_shutdown(s, SHUT_RD)?
					sock->conn->last_err = ERR_OK;
					return 0;
				} else {
					return -1;
				}

I2C session for a bus can only be used once

At least two issues here:

  • up_i2cinitialize only increases refcount the first time, and s5j_i2cbus_uninitialize asserts recount > 0 (init, uninit, init, uninit crashes)
  • second time the bus is initialized, it does not work (SDA/SCL pins stay high, no matter what)

In order to reproduce, I used i2ctool from the TizenRT github repo.
It does not build (missing up_i2cuninitialize symbol), and is not registered at the tash (needs a 10 or so lines of patch), but once these are resolved i2c tool works.

Iotivity simpleServer hangs up artik board

Hello!
I encountered an issue with iotivity on TizenRT.
Exemplary iotivity server simpleServer hangs up artik board.
I started simpleServer on artik053. After this, there was no ping response from artik.
Version used: 54cabf8
Configuration: artik053/iotivity

Can I flash the binary through UART?

Hi,
Is there anyway to flash the binary with UART? Just like esp8266 or esp32,it can flash binary with openocd through JTAG interface, and it can also flash binary through UART interface. Is there any chance that s5jt200 can flash bianry through UART? Thank you.

Buildbreak at TizenRT HEAD

As of commit 3f599c2 TizenRT cannot be built for iotjs (do you need the defconfig?).
There might be more issues I didn't see with my brief examination.

Option CONFIG_EXAMPLES_SLSIWIFI enabled causes:

CC: nettest_functions.c
nettest_functions.c:29:37: fatal error: slsi_wifi/slsi_wifi_api.h: No such file or directory
#include <slsi_wifi/slsi_wifi_api.h>
^
compilation terminated.
Makefile:86: recipe for target 'nettest_functions.o' failed
make[2]: *** [nettest_functions.o] Error 1
make[2]: Leaving directory '/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/apps/examples/slsiwifi'
Makefile:109: recipe for target 'examples/slsiwifi_all' failed

Option CONFIG_NET_CMDS enabled causes:

make[2]: Entering directory '/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/apps/system/utils'
./netcmd.c:49:29: fatal error: protocols/dhcpc.h: No such file or directory
#include <protocols/dhcpc.h>
^
compilation terminated.
ERROR: arm-none-eabi-gcc failed: 1
command: arm-none-eabi-gcc -M -fno-builtin -mcpu=cortex-r4 -mfpu=vfpv3 -Wall -Werror -Wstrict-prototypes -Wshadow -Wundef -Wno-implicit-function-declaration -Wno-unused-function -Wno-unused-but-set-variable -g -O0 -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -I. -isystem /opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/include -isystem /opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/../framework/include -D__KERNEL__ -pipe -ffunction-sections -fdata-sections -I../../../external/dhcpd/ ./netcmd.c
Makefile:222: recipe for target '.depend' failed
make[2]: *** [.depend] Error 1
make[2]: Leaving directory '/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/apps/system/utils'

Options CONFIG_DM combined with CONFIG_ARCH_CHIP_S5JT200 enabled cause:

make[1]: Entering directory '/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/framework'
src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c:43:29: fatal error: protocols/dhcpc.h: No such file or directory
#include <protocols/dhcpc.h>
^
compilation terminated.
ERROR: arm-none-eabi-gcc failed: 1
command: arm-none-eabi-gcc -M -fno-builtin -mcpu=cortex-r4 -mfpu=vfpv3 -Wall -Werror -Wstrict-prototypes -Wshadow -Wundef -Wno-implicit-function-declaration -Wno-unused-function -Wno-unused-but-set-variable -g -O0 -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -I. -isystem /opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/include -isystem /opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/../framework/include -D__KERNEL__ -pipe -ffunction-sections -fdata-sections -I/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/../framework/include/iotbus -I/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/../framework/include/dm src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c
Makefile:69: recipe for target '.depend' failed
make[1]: *** [.depend] Error 1
make[1]: Leaving directory '/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/framework'

External mbedtls does not build as well (CONFIG_NET_SECURITY_TLS enabled):

make[2]: Entering directory '/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/external/mbedtls'
./aes.c:46:28: fatal error: mbedtls/config.h: No such file or directory
#include "mbedtls/config.h"
^
compilation terminated.
ERROR: arm-none-eabi-gcc failed: 1
command: arm-none-eabi-gcc -M -fno-builtin -mcpu=cortex-r4 -mfpu=vfpv3 -Wall -Werror -Wstrict-prototypes -Wshadow -Wundef -Wno-implicit-function-declaration -Wno-unused-function -Wno-unused-but-set-variable -g -O0 -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -I. -isystem /opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/include -isystem /opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/os/../framework/include -D__KERNEL__ -pipe -ffunction-sections -fdata-sections ./aes.c
Makefile:131: recipe for target '.depend' failed
make[2]: *** [.depend] Error 1
make[2]: Leaving directory '/opt/iotjs/iotjs-nuttx/iotjs/deps/tizenrt/external/mbedtls'
Makefile:112: recipe for target 'mbedtls_depend' failed
make[1]: *** [mbedtls_depend] Error 2

shutdown provided twice

Both
os/net/socket/bsd_socket_api.c
lib/libc/net/lib_shutdown.c
provide "int shutdown(int, int)"
under CONFIG_NET flag.

lib/libc/net/lib_shutdown.c has the function gated by CONFIG_SUTOM_SOCKETS flag.
The implementation is empty.

What is this for?
What is the flag - I could not find it anywhere in the TizenRT sources?

The end result is for me that linking fails due to duplicate symbol.

iotivity some questions

I have compiled iotivity.

The version I tested was:

~/TizenRT/os$ git hist -3
*   a9b9211 2017-06-13 | Merge pull request #183 from jeongchanKim/kernel_gitignore (HEAD -> master, origin/master, origin/HEAD) [sunghan-chang]
|\  
| * f9b4f96 2017-06-13 | Add the file lists in .gitignore  which should be ignored for about built-in apps [jc_.kim]
|/  
*   3c94015 2017-06-13 | Merge pull request #180 from heejin-kim/nw_iotivity [lssgood]

I used config as artik053/iotivity.

  1. Every time I make iotivity, I see that I always create new object files. Is this correct?
  2. After make clean, I saw some object files. After clean, I think all object files should be deleted.
~/TizenRT/os$ find .. -name *.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_subscribe.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_coap_list.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_encode.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_debug.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_option.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_resource.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_str.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_block.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_async.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_hashkey.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_pdu.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_net.o
../external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap_uri.o
  1. There is an unnecessary content after the build. Delete or add gitignore.
os$ git st
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	../external/iotivity/iotivity_1.2-rel/extlibs/mbedtls/mbedtls/

nothing added to commit but untracked files present (use "git add" to track)
  1. When building iotivity, I see a lot of 'warning'. Why do not you remove all the errors by adding the -Werror option?
os$ git diff ../external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript
diff --git a/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript b/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript
index 68aaf09..f039a99 100644
--- a/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript
+++ b/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript
@@ -57,7 +57,7 @@ if env.get('DEBUGSYM') == 'True':
 
 arch_board = ARGUMENTS.get('ARCH_BOARD')
 if arch_board == 'sidk_s5jt200':
-       env.AppendUnique(CCFLAGS = ['-mcpu=cortex-r4', '-mfpu=vfpv3', '-Wall',
+       env.AppendUnique(CCFLAGS = ['-mcpu=cortex-r4', '-mfpu=vfpv3', '-Wall', '-Werror',
                '-Wstrict-prototypes', '-Wshadow', '-Wundef', '-Wno-implicit-function-declaration',
                '-Wno-unused-function', '-Wno-unused-but-set-variable', '-fno-strict-aliasing',
                '-fno-strength-reduce'])

Thanks for porting iotivity.

Not possible to configure kernel

os/kernel/Kconfig loads:

comment "Kernel Latency utility"
source kernel/latency/Kconfig

comment "Kernel Debug and Simulation"
source kernel/debug/Kconfig

both folders are not existing. It is not possible to call make menuconfig

when I 'LIB_SYSCALL' enable, meet build error.

I downloaded the latest version.
If you enable 'System Call' in menuconfig and compile, a build error occurs.
(Same as enabling CONFIG_LIBC_SYSCALL).

os/include/unistd.h: In function '_exit':
proxies/PROXY__exit.c:10:1: error: 'noreturn' function does return [-Werror]
 }
 ^
cc1: all warnings being treated as errors
Makefile:92: recipe for target 'PROXY__exit.o' failed
make[1]: *** [PROXY__exit.o] Error 1

fstat is not supported

For one, fstat is mandated by POSIX.1-2001 and later.

There are some leftovers from the fork source (NuttX has and had the fstat at the point of forking) in the form of:
os/include/sys/stat.h:int fstat(int fd, FAR struct stat *buf)
and there is no actual implementation (linking fails):

/opt/iotjs/integration/iotjs.git/deps/tizenrt/os/../build/output/libraries/libtuv.a(fs.c.obj): In function uv__fs_fstat': /opt/iotjs/integration/iotjs.git/deps/libtuv/src/unix/fs.c:759: undefined reference to fstat'
Makefile:187: recipe for target '../build/output/bin/tinyara' failed
make[1]: *** [../build/output/bin/tinyara] Error 1

The same applies to fstatfs (epoll, symlink, link and a few others), although these do not seem to be commonly used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.