This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
runtime_library:exceptions:start [2015/04/04 08:41] – created ursgraf | runtime_library:exceptions:start [2022/12/20 10:24] – [Signaling with LED] ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Exceptions and Errors ====== | ====== 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.\\ | + | Java offers exception and errors. Errors are thrown by the virtual machine and we do not currently use them as we have no virtual machine |
- | 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, | + | 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 '' |
===== Exception Handling ===== | ===== Exception Handling ===== | ||
- | All unchecked Java exceptions must be caught by the system. In such a case, an string | + | All unchecked Java exceptions must be caught by the system. In such a case, the type of the exception |
- | ==== Example on the mpc555 ==== | ||
<code java> | <code java> | ||
- | SCI1.start(9600, | ||
- | System.out = new PrintStream(SCI1.out); | ||
System.err = System.out | System.err = System.out | ||
</ | </ | ||
- | ==== Example on the mpc5200 ==== | + | Obviously you have to put the '' |
- | <code java> | + | ===== Signaling with LED ===== |
- | UART3.start(9600, UART3.NO_PARITY, (short)8); | + | |
- | | + | |
- | | + | |
- | </ | + | |
- | ==== Signaling with LED ==== | + | ==== Zynq7000 based boards |
- | On the [[embedded_systems: | + | On the [[https:// |
+ | ^ 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 // | ||
+ | | 2x once | exception thrown in command | unchecked exception caught in // | ||
+ | | 3x once | exception thrown in action method of task | unchecked exception caught in // | ||
+ | | 5x every second| exception thrown in boot method | unchecked exception caught in kernel | | ||
+ | | 1x followed by 2x| data abort exception | memory access threw data abort exception | | ||
+ | |||
+ | ==== PowerPC based boards ==== | ||
+ | On the [[http:// | ||
^ blinking pattern ^ state ^ comment ^ | ^ blinking pattern ^ state ^ comment ^ | ||
Line 27: | Line 30: | ||
| 1x once | exception thrown in command | unchecked exception caught in // | | 1x once | exception thrown in command | unchecked exception caught in // | ||
| 2x once | exception thrown in command | unchecked exception caught in // | | 2x once | exception thrown in command | unchecked exception caught in // | ||
- | | 3x once | exception thrown in action method of task command | unchecked exception caught in // | + | | 3x once | exception thrown in action method of task command | unchecked exception caught in // |
- | | 5x every second| | + | | 5x every second| |
- | | 1x followed by 2x every second| | + | | 1x followed by 2x every second| |
- | | 1x followed by 3x every second| | + | | 1x followed by 3x every second| |
- | | 1x followed by 4x every second| | + | | 1x followed by 4x every second| |
- | ===== Debug Mode ===== | + | ===== Debug Mode on PowerPC Processors |
The RCPU of the mpc555 has a built-in debug feature. Some of the PPC exceptions can cause the processor to enter debug mode, instead of running the appropriate exception handler. However, this can happen only in case of the processor running out of RAM. If you run the program out of flash, you can never enter debug mode (which wouldn' | The RCPU of the mpc555 has a built-in debug feature. Some of the PPC exceptions can cause the processor to enter debug mode, instead of running the appropriate exception handler. However, this can happen only in case of the processor running out of RAM. If you run the program out of flash, you can never enter debug mode (which wouldn' | ||
- | Debug mode is indicated on the [[embedded_systems:mpc555:usb-bdi|USB Background Debugging Interface (USB-BDI)]] with the blue LED. | + | Debug mode is indicated on the [[http:// |