group::SYS_DEV

This driver provides details about the currently installed operating system.

Details

defineSYS_VERSION


defineSYS_IOC_CHAR


defineI_SYS_GETVERSION


defineI_SYS_GETINFO


defineI_SYS_26_GETINFO


defineI_SYS_23_GETINFO


defineI_SYS_SETATTR


defineI_SYS_SETACTION


defineI_SYS_GETTASK

This request gets the information about the specified task.

sys_task_t task;
task.tid = 1;
ioctl(fd, I_SYS_GETTASK, &task);

defineI_SYS_KILL

This request sends a signal to all the tasks in the specified process group.


defineI_SYS_PTHREADKILL

This request sends a signal to a single task (thread)


defineI_SYS_GETID

Read the system ID’s globally unique cloud identifier


defineI_SYS_GETPROCESS

This requests checks to see if the named process is currently running.

sys_process_t p;
strcpy(p.name, "hello");
ioctl(fd, I_SYS_ISRUNNING, &p);
if( p.pid < 0 ){
     //process is not running
}

defineI_SYS_SUDO

This request temporarily changes the effective user ID to root. As root certain system functions are available that would not available to the user. For example, as root, an application can set an interrupt callback that is executed in privileged mode.

sys_sudo_t passwd;
strcpy(passwd.key, "the password");
if( ioctl(fd, I_SYS_SUDO, &passwd) < 0 ){
     //failed to accept password
}

defineI_SYS_GETBOARDCONFIG

This copies the sos_board_config_t data that is set by the board support package.

sos_board_config_t config;
ioctl(core_fd, I_SYS_GETBOARDCONFIG, &config);

defineI_SYS_TOTAL


enum@31

  • SYS_FLAG_IS_STDIO_FIFO Indicates STDIO are independent FIFOs (board config flag)
  • SYS_FLAG_IS_STDIO_VCP Deprecated (board config flag)
  • SYS_FLAG_IS_WDT_DISABLED Disables the WDT (board config flag)
  • SYS_FLAG_IS_REQUEST Deprecated (board config flag)
  • SYS_FLAG_IS_TRACE Deprecated (board config flag)
  • SYS_FLAG_IS_STDIO_CFIFO STDIO is a with channels 0:stdout 1:stdin 2: stderr (board config flag)
  • SYS_FLAG_IS_STDIO_CFIFO_SHARE_OUTERR Used with SYS_FLAG_IS_STDIO_CFIFO to indicate stderr and stdout are the same channel (0) (board config flag)
  • SYS_FLAG_IS_ACTIVE_ON_IDLE Don’t stop the CPU when the system is idle (board config flag)

enum@32

  • SYS_FLAG_SET_MEMORY_REGION
  • SYS_FLAG_IS_READ_ALLOWED
  • SYS_FLAG_IS_WRITE_ALLOWED
  • SYS_FLAG_IS_FLASH
  • SYS_FLAG_IS_EXTERNAL


date: “2019-06-27” layout: post title: struct::sys_info_t katex: true

categories: struct

Methods

Details

public charkernel_version

The OS (kernel) Version


public charsys_version

The System (board) Version


public chararch

The target architecture (v7m, v7em, v7em_f4ss, v7em_f4sh, v7em_f5ss, v7em_f5sh, v7em_f5ds, v7em_f5dh)


public u32signature

Ths OS library signature used to ensure proper build system is used for applications


public u32security

Security flags (see sys_security_flags_t)


public u32cpu_freq

The CPU clock frequency


public u32sys_mem_size

The number of bytes in RAM shared across OS and other processes


public charstdout_name

Default value for the standard output


public charstdin_name

Default value for the standard output


public charname

Device Name


public charid

Globally unique Cloud Kernel ID value


public mcu_sn_tserial

Device Serial number


public u32o_flags

System flags


public u32hardware_id

Hardware ID of the board


public chartrace_name

Name of device used for tracing


public charbsp_git_hash

Git Hash for the board support package


public charsos_git_hash

Git Hash for the SOS build


public charmcu_git_hash

Git Hash for the linked MCU library


public u32o_mcu_board_config_flags

Flags set by mcu board configuration


public u32resd



date: “2019-06-27” layout: post title: struct::sys_26_info_t katex: true

categories: struct

This structure defines the system attributes.

Methods

Details

public charkernel_version

The OS (kernel) Version


public charsys_version

The System (board) Version


public chararch

The target architecture (lpc17xx, lpc13xx, etc)


public u32signature

Ths OS library signature used to ensure proper build system is used for applications


public u32security

Security flags (see sys_security_flags_t)


public u32cpu_freq

The CPU clock frequency


public u32sys_mem_size

The number of bytes in RAM shared across OS and other processes


public charstdout_name

Default value for the standard output


public charstdin_name

Default value for the standard output


public charname

Device Name


public charid

Globally unique Cloud Kernel ID value


public mcu_sn_tserial

Device Serial number


public u32o_flags

System flags


public u32hardware_id

Hardware ID of the board



date: “2019-06-27” layout: post title: struct::sys_23_info_t katex: true

categories: struct

Methods

Details

public charversion

The OS (kernel) Version


public charsys_version

The System (board) Version


public chararch

The target architecture (lpc17xx, lpc13xx, etc)


public u32signature

Ths OS library signature used to ensure proper build system is used for applications


public u32security

Security flags (see sys_security_flags_t)


public u32cpu_freq

The CPU clock frequency


public u32sys_mem_size

The number of bytes in RAM shared across OS and other processes


public charstdout_name

Default value for the standard output


public charstdin_name

Default value for the standard output


public charname

Device Name


public mcu_sn_tserial

Device Serial number


public u32o_flags

System flags



date: “2019-06-27” layout: post title: struct::sys_id_t katex: true

categories: struct

Methods

  • public charid

Details

public charid

Globally unique Cloud Kernel ID value



date: “2019-06-27” layout: post title: struct::sys_attr_t katex: true

categories: struct

Methods

Details

public u32o_flags

Flags used with I_SYS_SETATTR


public u32address


public u32size


public u16region


public u16resd16


public u32resd



date: “2019-06-27” layout: post title: struct::sys_taskattr_t katex: true

categories: struct

This structure contains the task attributes used with I_SYS_GETTASK.

Methods

Details

public u32pid


public u32tid


public u64timer


public u32mem_loc


public u32mem_size


public u32malloc_loc


public u32stack_ptr


public u8prio


public u8prio_ceiling


public u8is_active


public u8is_thread


public u8is_enabled


public charname



date: “2019-06-27” layout: post title: struct::sys_killattr_t katex: true

categories: struct

This structure is used with the I_SYS_KILL and I_SYS_PHTHREADKILL requests.

Methods

Details

public u32id


public u32si_signo


public s32si_sigcode


public s32si_sigvalue



date: “2019-06-27” layout: post title: struct::sys_process_t katex: true

categories: struct

This structure is used for checking the status of a named process. It is used with the I_SYS_GETPROCESS request.

Methods

Details

public charname


public s32pid


public s32pthread_id



date: “2019-06-27” layout: post title: struct::sys_sudo_t katex: true

categories: struct

This data structure is used with I_SYS_UNLOCK. A successful request will unlock the security features (see security in sys_info_t) of the device giving access to certain parts of the device.

Methods

Details

public u8key


X

Thanks for Coming!

Subscribe to news and updates