📄 helloworld.c
字号:
/*===========================================================================
FILE: Helloworld.c
SERVICES: Sample applet using AEE
DESCRIPTION
This file contains a very simple sample application that displays the
"Hello World" on the display. This application has been provided as an
example to demonstrate the utility of the BREW Debugger.
This file has to be compliled with the AEEModGen.c that is provided, or the
BREW Debugger has to be initialized in the HandleEvent function in the appication
code using the initDebugger interface.
The makefiles provided contain all the necessary rules to generate the mod files
for the debuggable application.
PUBLIC CLASSES:
N/A
DEBUGGING THE HELLOWORLD APPLICATION
Update the MIF.
Add the AEECLSID_DEBUGGER, using the DEBUGGER.bid file as a dependency, in
the MIF for the application to be debugged. See the helloworld.mif in the
helloworld folder as an example.
Compile the source code
The sample makefile shipped with the installer is provided as an example
of compiling BREW dynamic applications.To debug-enable the application, a
few options in the makefile (used to compile the application using gcc) need
to be added. They are the following:
* -g and -ffixed-ip so that debug symbols appear in the elf file
* -lstub and -lstub_th. These options link the stub library, which is part of the
application installer, to the applications using the -lstub (for arm mode) and
-lstub_th (for thumb mode).
* Disable optimizations.
Download the Code.
Download the MOD, MIF, SIG and other necessary files to the device by using BREW
Apploader.
On the remote target.
The debuggable application can be started. One can find that the application on the
phone is waiting for instructions from the serial interface.
On The Host Side.
Go to a Cygwin window, change the directory to the location where the elf file
for the application resides, and type in the following command at the shell prompt
$ arm-elf-gdb helloworld.elf
Now, the stub on the phone and the gdb start communicating with each other and the
execution stops at brew_debugger_entry function on the gdb.
This sets up a debugging session for the application on the phone with the gdb on the
PC. Refer to the users guide for any more information on the commands supported.
Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -