F9 microkernel app development part 1

50 %
50 %
Information about F9 microkernel app development part 1
Technology

Published on April 16, 2014

Author: benuxwei

Source: slideshare.net

Description

Brief about app development of F9 Microkernel

Part  1  :  App  Development   ben6   2014-­‐03-­‐10   F9-­‐Microkernel  

Agenda   •  F9  user  mode  API  introduc?on   •  F9  API  for  basic  app   •  Analyzing  l4test  app   •  Your  first  f9  app  prac?ce   F9  

F9  user  mode  API  introduc?on   •  Due  to  F9-­‐Microkernel  is  a  l4  kernel.   – Start  it  on  L4test.  It  is  basis  of  L4  kernel   •  Use  many  structure  Macro     – Find  user  app  entry  from  main()  

reading  user/apps/pingpong   •  Learn  from  reading,  then  prac?ce   •  Entry:  main.c:  main()  

•  F9  API  for  basic  app  (Ex:  pingpong)   •  DECLARE_USER(_?d,  _name,  _entry,  ...)   •  Create  2  Thread  By  L4_Msg  API   – with  Info  (stack  size  …)   •  Thread  1:  ping_thread   –  L4_Send  message  to  pong  thread   •  Thread  2:  pong_thread   –  L4_MsgStore  message  from  ping  thread      

user_run?me.h:DECLARE_USER    31          user_fpage_t  _user_fpages_##_name[]      32                          __a^ribute__((sec?on(".user_data")))  =  {        33                  __VA_ARGS__      34                  {.base  =  0x0,  .size  =  0x0}        35          };        36          sta?c  void  _user_entry_##_name(void);        37          user_struct  _user_struct_##_name            38                          __a^ribute__((sec?on(".user_run?me")))  =  {          39                  .?d  =  _?d,            40                  .entry  =  _user_entry_##_name,          41                  .fpages  =  _user_fpages_##_name,      42                  .name  =  #_name,      43          };        44          sta?c  void  __USER_TEXT  _user_entry_##_name(void)          45          {          46                  _entry(&_user_struct_##_name);        47                  while  (1)          48                          L4_Sleep(L4_Never);      49          }  

__USER_TEXT     #define  __USER_TEXT                      __a^ribute__  ((sec?on(".user_text")))   Func?on  uses  __USER_TEXT  put  into  .user_text  sec?on   which  defines  by  f9.ld  

Expanded  apps/pingpong/main.c   gcc  -­‐E  main.c  -­‐I../../include  -­‐I../../../include  |  grep  -­‐v  "^$"    Expansion  let  you   easy  to  know  whole   code  structure  

user_text:  f9.ld   __USER_TEXT   __ISR_VECTOR   INIT_HOOK(_hook,   _level)  

L4_Msg   •  L4_Msg_t  msg;   •  L4_MsgClear   •  L4_MsgAppend   •  L4_MsgLoad   •  L4_Send    

Agenda   •  F9  user  mode  API  introduc?on   •  F9  API  for  basic  app   •  Analyzing  l4test  app   •  Your  first  f9  app  prac?ce   F9  

Analyzing  l4test  app   •  Code  reading   – Start  from  apps/l4test/main.c    

Agenda   •  F9  user  mode  API  introduc?on   •  F9  API  for  basic  app   •  Analyzing  l4test  app   •  Your  first  f9  app  prac?ce   F9  

Your  first  f9  app  hello  prac?ce   •  Wri?ng  f9  app  step  by  step   •  Clone  the  pingpong   •  Modify  the  name     •  Change  to  print  hello  in  3  ?mes  with  a  ?me   interval   •  Ques?on:  how  to  call  sleep?   – Reference     •  l4test/l4test.h:void  msec_sleep(L4_Word_t  msec);  

user/include/l4io.h   int  vsnprinv(char  *str,  L4_Size_t  size,  const  char  *fmt,   va_list  ap);     int  snprinv(char  *str,  L4_Size_t  size,  const  char   *fmt,  ...);     int  prinv(const  char  *fmt,  ...);   void  putc(int  c);   int  getc(void);  

Lab  2  Rocks  with  gpio   •  Use  ./include/plavorm/stm32f4/gpio.h   •  Control  the  led  on/off  via  menu  app   •  Hint:  Reference  the  apps/l4test/menu.c    

Discussions   ?   F9  

References   •  F9  Microkernel  source  code  and  introduc?on   •  GCC  Naked  A^ribute     •  ARM:  Memory  Model  of  Cortex  M4   •  Cortex™    -­‐M4  Devices    Generic  User  Guide  pdf     •  tu-­‐dresden's  fiasco  Microkernel   •  General-­‐purpose  Input/Output  (GPIO)      

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

F9 | LinkedIn

For those with a Misspent transistor based youth here's the Grid part 1 : https: ... F9 microkernel app development part 2 gpio meets led. 1,035 Views.
Read more

Microkernel | LinkedIn

View 1213 Microkernel posts, ... Conchi Microkernel---1. ... Business Development Manager at MicroKernel Technologies Limited, ...
Read more

L4 microkernel family - Wikipedia, the free encyclopedia

... on the use of a functional programming language for OS development, not on microkernel research ... F9 microkernel, ... The L4 microkernel family: ...
Read more

SharePoint 2013 Online App Development – Part 1 ...

App Part . What is an App Part? It is a type of Web Part that is represented by the ClientWebPart class. In a way by which an App for SharePoint ...
Read more

How to Build an Android App Part 1: Setting up Eclipse and ...

... This video contains Nyan Cat: http://www.youtube.com/watch?v=QH2-TG ... Android App Development Tutorial Part 1 (First App ...
Read more

Blackberry 10 – Wikipedia

Microkernel: Lizenz: ... Nach Informationen von RIM sollen Apps für Blackberry 10 in C und C++ entwickelt werden können, ... 10.1: Navigationskürzel ...
Read more

App Store - Support - Apple Developer

Support. Overview; Development; Distribution; Membership; App Store. The App Store for iPhone, iPad, Mac, Apple Watch, and Apple TV makes it ...
Read more