![]() ![]() ![]()
|
BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1 |
STEP 1. Set the License Code in the Boot function of "HelloWorld.cpp"
To test an application on the BREW device, it is necessary to set the license code at the *license = "heap://"; statement in the SFCApplet::Boot function.
Example 2.1. SFCApplet::Boot function: before setting the license code
// Boot Loader
SFCApplet::FactorySPP SFCApplet::Boot(AEECLSID id, SFXAnsiStringPtr license)
{
*license = "heap://";
return (id == AEECLSID_HELLOWORLD) ? (&HelloWorld::Factory) : (null);
}
Example 2.2. SFCApplet::Boot function: after setting the license code
// Boot Loader
SFCApplet::FactorySPP SFCApplet::Boot(AEECLSID id, SFXAnsiStringPtr license)
{
*license = "heap://"
"TIXDRQXNU5WHU8Y3Z9WOHWQR6Z3VPSDHDV5CR1S4XASPWLUHWAS7Z5Z2TGS3XMSAT3UPUQTLTARCYPSF"
"UEJZ6ROSJWGUQSEYKR6V2U4VESMTQLHKZ6X7Y2VKXHWIX3XBU0Z7VHWHXIZBSGT5SPU3XLX0Z1Y4R3TC"
"U6WGT9WHWIVNYHYCUCR9T3SMTEWPRNVAX1Y4VPW2YCY9YQV5R7Z9UIVHT6SDUPU2SIW6VCRCWBR2S4WQ"
"UPYFWCYGT4VIT1WHXGYPTQSFYPWNV3ULRNWFW7RBRFVKUKS2YQSQYHW1TPUPXBZ6UEY2WOYKR7S3TAU4"
"TQS6UHVFVEVLU3R5SDSKW7RPTNTPVQU2T4R8Z4VLUGEW3U98TLDR8/";
return (id == AEECLSID_HELLOWORLD) ? (&HelloWorld::Factory) : (null);
}
![]() |
License Code |
|---|---|
|
"TIXDRQXNU5WHU8Y3Z9WOHW .................. U2T4R8Z4VLUGEW3U98TLDR8/" is the license code for HelloWorld application. The license code must correspond to the ClassID for application. As the license code is very long and can be splitted by using the double quotation marks, it is usually written in multiple lines like the above. | |
![]() |
Testing on the BREW Simulator |
|---|---|
|
You do not need to modify the following code in the SFCApplet::Boot function when testing an application on the BREW simulator. *license = "heap://"; | |
STEP 2. Confirm or Set up the Add-ins of Visual C++
Confirm two kinds of add-in icons on the tool bar of Visual Studio.
If the above add-in icons cannot be confirmed, click [Tools], choose [Customize], and check [ARMMakeBREWApp] and [SophiaFramework 4.1 Addin] in the [Addins and Macro files] tab.
![]() |
Note |
|---|---|
| |
STEP 3. Generate and Edit the Makefiles
1. Click the [ARM MAK] icon on the tool bar, and then the makefile "HelloWorld.mak" is generated.
2. Click the [SF MAK] icon on the tool bar, and then the makefile "HelloWorld.mak" is updated.

![]() |
How to update the makefile " HelloWorld.mak " manually | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
STEP 3-1. Set the SophiaFramework Include directory and "-I" option to the APP_INCLUDE variable. ![]()
STEP 3-2. Change "-g" option. ![]() #DBG = -g # Enable debug DBG = -g- # Enable debug
STEP 3-3. Change "-entry" option. ![]() #LFLAGS = $(ROPILINK) -rwpi -entry 0x8000# LFLAGS = $(ROPILINK) -rwpi -entry AEEMod_Load#0x8000#
STEP 3-4. Set the SophiaFramework library for the device to the APP_OBJS variable. ![]()
| |||||||||||||||||
STEP 4. Build the executable file "HelloWorld.mod" for the BREW Device
With Visual Stidio, click [Tool], choose [BREW ARM Make], and generate the executable file "HelloWorld.mod" for the BREW device.

![]() |
If the project has been changed |
|---|---|
If the application is saved in the directory other than the SophiaFramework home folder, its makefile paths to SophiaFramework libraries and include files must be modified. | |
|
Copyright (C) 2002 - 2009 Sophia Cradle, Inc. All Rights Reserved. |
![]() ![]() ![]()
|