114{
116
119 " Liviu Ionescu\n");
120
121 port::scheduler::greeting ();
122
126 thread::stack::default_size ());
127#if defined(OS_HAS_INTERRUPTS_STACK)
129 interrupts::stack ()->size ());
130#endif
131
132#if defined(__clang__)
134#else
136#endif
137
138#if defined(__EXCEPTIONS)
140#else
142#endif
144
145 scheduler::initialize ();
146
147
148 main_args.argc = argc;
149 main_args.argv = argv;
150
151#if defined(OS_EXCLUDE_DYNAMIC_MEMORY_ALLOCATIONS)
152
153
154
155
156
157 new (&os_main_thread_)
158 main_thread{
"main",
reinterpret_cast<thread::func_t> (_main_trampoline),
159 nullptr };
160
162
163#else
164
167#pragma GCC diagnostic push
168#if defined(__clang__)
169#pragma clang diagnostic ignored "-Wcast-function-type-strict"
170#endif
172 "main",
reinterpret_cast<thread::func_t> (_main_trampoline),
nullptr,
173 attr);
174#pragma GCC diagnostic pop
175
176#endif
177
178#if !defined(OS_USE_RTOS_PORT_SCHEDULER)
180#endif
181
182
183
184
185 scheduler::start ();
186
187
188}
static constexpr uint32_t frequency_hz
SysTick frequency in Hz.
std::size_t th_stack_size_bytes
Size of the user defined storage for the thread stack, in bytes.
POSIX compliant thread, using the default RTOS allocator.
void *(*)(func_args_t args) func_t
Type of thread function.
#define OS_INTEGER_RTOS_MAIN_STACK_SIZE_BYTES
Define the main thread stack size, in bytes.
void os_startup_create_thread_idle(void)
Create the idle thread.
int puts(const char *s)
Write the string and a line terminator to the trace device.
int printf(const char *format,...)
Write a formatted string to the trace device.
rtos::thread * os_main_thread
#define OS_STRING_RTOS_IMPL_YEAR
#define OS_STRING_RTOS_IMPL_VERSION