Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
main.c File Reference
#include <zephyr.h>
#include <ztest.h>
#include <kernel_structs.h>
#include <string.h>
#include <stdlib.h>
#include "targets.h"

Macros

#define INFO(fmt, ...)   printk(fmt, ##__VA_ARGS__)
 
#define FUNC_TO_PTR(x)   (void *)(x)
 
#define PTR_TO_FUNC(x)   (int (*)(int))(x)
 
#define DO_BARRIERS()   do { } while (0)
 

Functions

void k_sys_fatal_error_handler (unsigned int reason, const z_arch_esf_t *pEsf)
 Fatal error policy handler. More...
 
static int add_one (int i)
 
static void execute_from_buffer (uint8_t *dst)
 
static void test_write_ro (void)
 Test write to read only section. More...
 
static void test_write_text (void)
 Test to execute on text section. More...
 
static void test_exec_data (void)
 Test execution from data section. More...
 
static void test_exec_stack (void)
 Test execution from stack section. More...
 
static void test_exec_heap (void)
 Test execution from heap. More...
 
void test_main (void)
 

Macro Definition Documentation

◆ DO_BARRIERS

#define DO_BARRIERS ( )    do { } while (0)

◆ FUNC_TO_PTR

#define FUNC_TO_PTR (   x)    (void *)(x)

◆ INFO

#define INFO (   fmt,
  ... 
)    printk(fmt, ##__VA_ARGS__)

◆ PTR_TO_FUNC

#define PTR_TO_FUNC (   x)    (int (*)(int))(x)

Function Documentation

◆ add_one()

static int add_one ( int  i)
static

◆ execute_from_buffer()

static void execute_from_buffer ( uint8_t dst)
static

◆ test_exec_data()

static void test_exec_data ( void  )
static

Test execution from data section.

◆ test_exec_heap()

static void test_exec_heap ( void  )
static

Test execution from heap.

◆ test_exec_stack()

static void test_exec_stack ( void  )
static

Test execution from stack section.

◆ test_main()

void test_main ( void  )

test case main entry

◆ test_write_ro()

static void test_write_ro ( void  )
static

Test write to read only section.

◆ test_write_text()

static void test_write_text ( void  )
static

Test to execute on text section.