Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
software:deep:rts:errors [2014-06-09 14:57] grafsoftware:deep:rts:errors [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1
Zeile 1: Zeile 1:
-====== Exceptions and Errors ====== 
-Java offers exception and errors. Errors are thrown by the virtual machine and we do not currently use them as we have no vm at all.\\ 
-Exceptions can be devided into checked and unchecked exceptions. Checked exceptions must be caught by a calling method, which is ensured by the Java compiler. Unchecked exceptions, such as ArrayIndexOutOfBoundsException or NullPointerException, must be caught when initializing classes or when calling thread or task methods. Of course, you are free to catch such unchecked methods in your code already. 
  
-===== Exception Handling ===== 
-All unchecked Java exceptions must be caught by the system. In such a case, an string is written to the //System.err// stream. Make sure, that you have directed this stream to an existing serial interface. 
- 
-==== Example on the mpc555 ==== 
-<code java> 
-  SCI1.start(9600, SCI1.NO_PARITY, (short)8); 
-  System.out = new PrintStream(SCI1.out); 
-  System.err = System.out 
-</code> 
- 
-==== Example on the mpc5200 ==== 
-<code java> 
-  UART3.start(9600, UART3.NO_PARITY, (short)8); 
-  System.out = new PrintStream(UART3.out); 
-  System.err = System.out 
-</code> 
- 
-==== Signaling with LED ==== 
-On the [[embedded_systems:mpc555:headerboard:start|NTB MPC555 Headerboard]] there is a single LED. On the [[embedded_systems:mpc5200:start|Freescale MPC5200]] module there is no LED, but we use the one on the carrier board (at pin Gpio_Wkup_7). 
- 
-^ blinking pattern ^ state ^ comment ^ 
-| 1x every second| code was loaded with error | FCS error in kernel | 
-| 1x once | exception thrown in command | unchecked exception caught in //Task.loop// | 
-| 2x once | exception thrown in command | unchecked exception caught in //Kernel.loop// | 
-| 3x once | exception thrown in action method of task command | unchecked exception caught in //Task.loop//| 
-| 5x every second| Exception thrown | unchecked exception caught in kernel | 
-| 1x followed by 2x every second| Machine Check Exception | bus error, PPC exception | 
-| 1x followed by 3x every second| System Call | sc-instruction, PPC exception | 
-| 1x followed by 4x every second| Floating Point Unavailable Exception | FPU switched off, PPC exception |