⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faqs.htm

📁 网上下载的一些心得集 网友交流之经验谈 uCOS51移植心得 uCOS-II 在 ARM7 上的移植
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0045)http://ucos-ii.com/contents/support/faqs.html -->
<HTML><HEAD><TITLE>Micrium Support : F.A.Q.</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK 
href="faqs.files/white-micrium3.css" type=text/css rel=stylesheet>
<META 
content=" Micrium is Empowering Embedded systems via ANSI C source code for RTOS, GUI, File System and TCP/IP stack. Book or manuals documentation format" 
name=Description>
<META 
content="Embedded Kernel, Embedded Operating System, Real time operating system, RTOS, Embedded Software, Embedded Systems, Kernel, Real Time Kernel, ROMable, RAM, ROM, EPROM, EEPROM, Scalable, Portability, Ports, Microprocessors, Microcontrollers, Context Switching, Task Switch, Task Scheduling, uC/OS, 礐/OS, PEG, Portable Embedded Graphical User Interface, Graphical User Interface, GUI, Embedded GUI, Embedded Graphical Display,  LCD Display, Antialiasing, Fonts, Bitmaps, Display, widget, widgets, dialog, dialogs, windows, radio button, check box,  scroll bar, slider,edit box, 礐/GUI, uC/GUI, File System, Flash, Loader, 礐/FS product page, Directory, 礐/FlashLoader, Flash, Memory, Load, Loader, Update, Open Source" 
name=Keywords>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" 
marginwidth="0">
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff border=0>
  <TBODY>
  <TR>
    <TD><A name=top></A><IMG height=30 src="faqs.files/title-faqs.gif" 
      width=540></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=10 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <P><BR><A 
      href="http://ucos-ii.com/contents/support/faqs.html#faq1">FAQ-01:</A> 
      <B>My computer/processor 'hangs' when I run 礐/OS or 礐/OS-II! </B></P>
      <P><A 
      href="http://ucos-ii.com/contents/support/faqs.html#faq2">FAQ-02:</A> 
      <B>Are you allowed to send a NULL-pointer through a Mailbox or a 
      Queue?</B></P>
      <P><A 
      href="http://ucos-ii.com/contents/support/faqs.html#faq3">FAQ-03:</A> 
      <B>Where should I enable the 'tick' interrupt?</B></P>
      <P><A 
      href="http://ucos-ii.com/contents/support/faqs.html#faq4">FAQ-04:</A> 
      <B>Does 礐/OS and 礐/OS-II work with Microsoft C/C++?</B></P>
      <P><A 
      href="http://ucos-ii.com/contents/support/faqs.html#faq5">FAQ-05:</A> 
      <B>Are there other ports available for 礐/OS and 礐/OS-II? </B></P>
      <P><A 
      href="http://ucos-ii.com/contents/support/faqs.html#faq6">FAQ-06</A>:<B> 
      Is there a better way to implement OSIntCtxSw() and 
      ISRs?</B><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      (Added 2001/01/26) </P>
      <P><BR></P>
      <TABLE cellSpacing=0 cellPadding=3 width="100%" bgColor=#ced6f0 
        border=0><TBODY>
        <TR>
          <TD class=title>F<A name=faq1></A>AQ-01: My computer/processor 
            'hangs' when I run 礐/OS or 礐/OS-II!</TD></TR></TBODY></TABLE>
      <P>DOS executables for 礐/OS and 礐/OS-II are provided on the diskette. If 
      礐/OS (or 礐/OS-II) still hangs with the executable provided on the 
      floppy, try to contact me at <A 
      href="mailto:Jean.Labrosse@uCOS-II.com">Jean.Labrosse@uCOS-II.com</A>. If 
      礐/OS (or 礐/OS-II) does not hang with the executable provided on the 
      floppy then there are two possible reasons your computer could crash: </P>
      <P><B>1)</B> You need to look at <SPAN class=codewiew>OSIntCtxSw</SPAN> 
      (pages 62, 63 and 67 in the 礐/OS book or pages 200 and 201 in 礐/OS-II) 
      which is processor and compiler specific.&nbsp; The very first instruction 
      in <SPAN class=codewiew>OSIntCtxSw()</SPAN> may need some adjustment, i.e. 
      <SPAN class=codewiew>ADD SP,8</SPAN>.&nbsp; If you use another processor, 
      compiler or memory model, you may need to adjust the constant.&nbsp;&nbsp; 
      This section in the book will explain how to determine the 'magic number' 
      to add to the stack pointer.&nbsp;&nbsp; <BR>The actual value depends on 
      the compiler used and the compiler options. &nbsp; For example, on the x86 
      real-mode small model, the constant can be either 4, 6, 8, 10 ...&nbsp; 
      For the x86 real-mode, large model, the constant can be either 8, 10, 12, 
      14, 16 ...</P>
      <P><B>2)</B> You may want to try removing ANY (and ALL) floating-point 
      operation.&nbsp; The sample code in example #1 (礐/OS V1.xx and 礐/OS-II 
      V2.00) has a floating-point operation in the start task.&nbsp; Comment it 
      out (by putting <SPAN class=codewiew>#if 0 / #endif</SPAN> around the 
      <SPAN class=codewiew>sprintf()</SPAN> statement) and try compiling and 
      running the code.&nbsp; If the code works, the crash is due to the fact 
      that:<BR>&nbsp;&nbsp;&nbsp; a) The Borland C/C++ floating-point library is 
      non-reentrant.<BR>&nbsp;&nbsp;&nbsp; b) 礐/OS and 礐/OS-II's task stacks 
      need to be initialized to perform floating-point operations in a reentrant 
      way.&nbsp; Refer to AN-1001 for details (See <A 
      href="http://ucos-ii.com/contents/support/appl_notes.html">AppNotes</A>). 
      </P>
      <P><B>3)</B> See <A 
      href="http://ucos-ii.com/contents/support/faqs.html#faq6">FAQ-06</A>. </P>
      <P><A href="http://ucos-ii.com/contents/support/faqs.html#top"><IMG 
      height=18 alt="Back to top" src="faqs.files/backtotop.gif" width=84 
      border=0 name=top></A></P>
      <P>&nbsp;</P>
      <TABLE cellSpacing=0 cellPadding=3 width="100%" bgColor=#ced6f0 
        border=0><TBODY>
        <TR>
          <TD class=title>F<A name=faq2></A>AQ-02: Are you allowed to send a 
            NULL-pointer through a Mailbox or a Queue?</TD></TR></TBODY></TABLE>
      <P>No.&nbsp; By definition, a NULL-pointer is not supposed to point to any 
      valid data.&nbsp; You could, however, 'fake' 礐/OS (or 礐/OS-II) into 
      sending NULL pointers.&nbsp; You will need to 're-map' a NULL pointer to 
      another 'invalid' pointer.&nbsp; For example, if you want to send a NULL 
      through a message mailbox, you can do the following:</P>
      <P class=codewiew>void SenderTask (void *pdata)<BR>{<BR>&nbsp;&nbsp;&nbsp; 
      .<BR>&nbsp;&nbsp;&nbsp; .<BR>&nbsp;&nbsp;&nbsp; if (msg == (void *)0) { 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      /* Do I want to send a NULL pointer ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      */<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg = (void *)0xFFFFFFFF; 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Yes, remap to another 'invalid' 
      pointer */<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; OSMboxPost(Mbox, 
      msg);<BR>&nbsp;&nbsp;&nbsp; .<BR>&nbsp;&nbsp;&nbsp; .<BR>}void 
      ReceiverTask (void *pdata)<BR>{<BR>&nbsp;&nbsp;&nbsp; void 
      *msg;<BR>&nbsp;&nbsp;&nbsp; .<BR>&nbsp;&nbsp;&nbsp; 
      .<BR>&nbsp;&nbsp;&nbsp; msg = OSMboxPend(Mbox, 0, &amp;err); 
      <BR>&nbsp;&nbsp;&nbsp; if (err == OS_NO_ERR) 
      {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (msg == (void 
      *)0xFFFFFFFF) { /* Did I receive a NULL pointer ? 
      */<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      msg = (void *)0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      .<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .<BR>&nbsp;&nbsp;&nbsp; 
      }<BR>&nbsp;&nbsp;&nbsp; .<BR>&nbsp;&nbsp;&nbsp; .<BR>} </P>
      <P></P>
      <P><A href="http://ucos-ii.com/contents/support/faqs.html#top"><IMG 
      height=18 alt="Back to top" src="faqs.files/backtotop.gif" width=84 
      border=0 name=top></A></P>
      <P class=codewiew>&nbsp;</P>
      <TABLE cellSpacing=0 cellPadding=3 width="100%" bgColor=#ced6f0 
        border=0><TBODY>
        <TR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -