- Convenient way to restart system
- Check memory content
- Upload an application in hex format to RPi memory
- Start application from given address
- Support debug an application
- Connect RPi to serial port of host computer. There are a lot of tutorials how establish serial connection to RPi online. Check, please,
- Make reset button
- Prepare microSD. Put files from microSD-image.zip to your SD.
- Install arm gnu toolchain. Change a Makefile (or build.xml for Ant builder) to reflect your installation folders.
- Install a serial port terminal. For Mac users I recomend CoolTerm is a simple serial port terminal application.
- Build image
- cd ao.rtos.cpp/Tools/ARM-Raspberry_Pi/Initial_Interactive_Loader
- make img
- Build microSD
- copy file kernel.img to MicroSD
- insert microCD to holder in RPi board and reset the target board.
After reset RPi (Interrupt power supply or using reset button) serial terminal shows image like this:
It is easy to explain IIL operations by examples. To display content of RPi memory use the command 'D'. Memory content represents in bytes:
To represent content in 2-byte words use command 'W'. Command 'WW' switchs memory view to 4-bytes words:
Command 'O' shows content of memory as a bit string. To switch to text view type command 'S', then return to hex byte view:
And most impotant IIL functionality is upload executable hex file to target RPi. Type 'L' to get message 'Send hex file to target.'. After that go to 'CoolTerminal' menu (or other serial terminal application you are using) and choose 'Connection->Send File(s)'. Find and click on file from you project folder (.../ao.rtos.cpp/_build/target/). Popup windows is appear 'Sending file ...' and then uploading will complete and window displays like this:
Now issue command 'G10000' and we can see view of running application:
Idea how to log or save debugging messages from running application is simple. The main steps are:
- Reserve memory area for writing debug messages;
- Put in application source code statement to save debug messages;
- Build and run application;
- If application has stalled reset target RPi (do not interrupt power of target because it will destroy data in memory);
- When IIL starting page is appear then type command 'M' and you can see all debug messages before application falls.
Let's illustrate it on sample application ao.rtos.cpp/Tools/ARM-Raspberry_Pi/loadable-app. To activate debugging availability include header file to main.cpp:
#include "arm_debug_tools.hpp"and add to compile/link process source file ${PORTING_DIR}/arm_debug_tools.cpp. Start debugging tools and log first message in main.cpp
main.cpp
dump_debug_init();
dump_debug_message("Test 1\n\r");In periph_timers.cpp add more debug messages:
fp.format(out, "timer tick #%d\n\r", tic);
dump_debug_message(out);Now build our sample application:
cd ao.rtos.cpp/Tools/ARM-Raspberry_Pi/loadable-app
make hexGo to serial terminal window and upload LoadableApp.hex file to target. Run application:
Now interrupt execution of application on target by pushing reset button (NOT power socket).
After IIL restart issue command 'm'. You can see debugging messages:







