Lazarus
Programming => Operating Systems => Windows CE => Topic started by: robinhodemorais on April 07, 2014, 01:37:01 pm
-
Good morning,
I have a project to create for windows mobile and recently read on the internet that I can create with Lazarus, was very happy because I program in Delphi, but Lazarus 1.2.0 and downloaded the modified Target OS (T) for WinCE, Target CPU family (-P) for arm and Target for ARMv5 processor and added the Stored LCLWidgetType wince in IDE, I found that all these procedures have created a hello world and put on my Motorola MC2180 mobile computer with the following specifications:
Processor (CPU)
Marvell PXA 320 624 MHz
Operating system (OS)
Microsoft Windows Embedded CE6.0 Core; Microsoft Windows Embedded CE6.0 Pro (MC2180 only)
and he does not run, I tried to install an emulator and also did not succeed and come through the forum asking for help.
Could anyone help me?
Thank you.
-
Anything to look at to figure what you tried?
It all lies in what you put in your code, and what result you had when tried to run on the target device.
Without giving some clue no one will be able to help.
Provide something (excerpt code, error messages) in order to have more eyes examining it.
-
I created a hello world just to run, but he is no error, or run the program...
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage('Hello World');
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end.
-
Your code is fine. Step 1, checked.
Now only the configuration that you set is left to review.
> no error, or run
That's strange, how you can tell even if your program has started in the first place?
Do you have any settings on your device that blocks the unknown publishers' applications?
Since it's a "Hello World" example, just start a new project-reconfigure the options as stated below:
http://wiki.lazarus.freepascal.org/Windows_CE_Interface#Setting_Up_the_Windows_CE_interface
Save and run and let's see how it goes.
-
Windows CE 6.0 doesn't support ARMv5. It only supports ARM4I which as I understand it is ARMv4T
-
I downloaded again Lazarus http://sourceforge.net/projects/lazarus/files/Lazarus 20Windows%% 2064%% 20bits/Lazarus 201.2 / and follow the step by step http://wiki.lazarus.freepascal.org/Windows_CE_Interface # Setting_Up_the_Windows_CE_interface, but in version 1.2 are the confgurations Project> Project Options> Compiler Options:
Target and put in the config:
Target OS: WinCE
Target CPU family: arm
Target processor ARMV4
Additions and Overrides put in the LCLWidgetType: wince
and yet he does not run, does not give error and found nothing on windows ce that can be locked ...
and now?
-
Try with a console program first to see if that will run.
What happens when you run the program on the device? Does it show up in the task bar or does nothing happen at all?
-
Actually when I run it nothing happens, nothing, not appear on the taskbar.
I auditioned as a console application and he ran but gave error ...
An unhandled exception occurred at $ 00011844: EInOutErro: File not open $ 00011844this is my code that made the console
program project1 ;
objfpc $ { mode } { $ H + }
uses
{ $ IFDEF UNIX } { $ IFDEF } UseCThreads
cthreads ,
{ $ ENDIF } { $ ENDIF }
Classes , SysUtils , CustApp
{ You can add units after this} ;
type
TMyApplication { }
TMyApplication = class ( TCustomApplication )
protected
DoRun procedure ; override ;
public
constructor Create ( theowner : TComponent ) ; override ;
destructor Destroy ; override ;
WriteHelp procedure ; virtual ;
end ;
TMyApplication { }
TMyApplication.DoRun procedure ;
var
ErrorMsg : String;
begin
/ / Quick check parameters
ErrorMsg : = CheckOptions ( 'h' , 'help' ) ;
if ErrorMsg < >'' then begin
ShowException ( Exception.Create ( ErrorMsg ) ) ;
Terminate ;
Exit ;
end ;
/ / Parse parameters
if HasOption ( 'h' , 'help' ) then begin
WriteHelp ;
Terminate ;
Exit ;
end ;
{Add your program here}
/ / Stop program loop
Terminate ;
end ;
TMyApplication.Create constructor ( theowner : TComponent ) ;
begin
inherited Create ( theowner ) ;
StopOnException : = True ;
end ;
TMyApplication.Destroy destructor ;
begin
inherited Destroy ;
end ;
TMyApplication.WriteHelp procedure ;
begin
{ Help add your code here}
writeln ( ' Usage: ' EXENAME , '-h' ) ;
end ;
var
Application : TMyApplication ;
begin
Application : TMyApplication.Create = ( nil ) ;
Application.Title : = ' My Application ' ;
Application.Run ;
WriteLn ( ' Hello World ! ' ) ;
ReadLn ;
Application.Free ;
end .
-
Try this:
Set Target Processor to default
Then in Other->Custom Options add
-Cparmv4t
-
There have been many successful cross platform compilations for Symbol/Motorola barcode WinCE devices. If you can't make Lazarus cross build to work, before giving up you can try CodeTyphon and it's cross build WinCE 6.0 tutorial here:
http://www.pilotlogic.com/sitejoom/index.php/wiki/93-wiki/codetyphon-studio/ct-tutorials
Beware that you would need to uninstall Lazarus first if you didn't use FPCUP installer, be an admin during Windows CT installation, and not use Windows profile with non-ascii characters for it.
-
I did everything as indicated but still not rotate, see the attached image I have setup gives
a question, I start an application for windows ce how to file> New> Project> Application
?
-
-CpARMv4T
The T at the end is important
-
Put options on-CpARMv4T, but presents this error when compiling:
Error Illegal parameter:-CpARMv4T
then took it off and put in Defines and added, but nothing happens.
apparently it does not run on this data collector
-
Hi, for windows ce 5.0 emulator I managed to open the project, I'm just not able to install an emulator for windows ce 6.0, but I do what CodeTyphon it? I did not even
-
unable to install the emulator Windws ce 6.0 and 6.5 on my computer, did the tests doing cross build with CodeTyphon rode quietly in emulator, but the collector does not run, nothing happens, not even a message and now?
%)
-
What version of FPC are you using? Sounds like you are using an old one
-
I'm using fpc 2.6.2
lazarus-1.2.0-fpc-2.6.2-win32.exe
lazarus-1.2.0-fpc-2.6.2-cross-arm-wince-win32.exe
-
Help plis... :(
-
Did you tried to install WM 6 SDK with 6.5 Emulator ?
You can downoad it on http://www.microsoft.com/en-us/download/details.aspx?id=17284 (http://www.microsoft.com/en-us/download/details.aspx?id=17284)
-
I was unable to install and open the application in vm, only the collector does not open even if the worst application in VB that opens.
I do not know what else to do
: (
-
Try to read and make changes like in post http://forum.lazarus.freepascal.org/index.php/topic,23237.0.html (http://forum.lazarus.freepascal.org/index.php/topic,23237.0.html)
-
where I set the LCL-WinCE ?
-
where I set ?
I removed the function calls in WinCe-LCL, and my Test-App works!
It looks like, they are not necessary for desktop - applications.
Now I will test my App, when it also works fine, I will post the changes in the WinCE-LCL.
-
help ?
-
help ?
What is the problem, now ?
-
Hi!
I'm in the same situation. I compiled my project and doesn't start on WinCE. No errors just doesn't start. How did you solve your problem?
Regards
-
What WinCE ? intel or arm ? if it's arm have you setted up processor to arm in project options ?
-
Off course. I set the target OS to wince, cpu familiy to arm, and left the target cpu on default, and lcl widget type to wince.
-
There is a 3 MB zip file at the bottom on this page that should be easy for you to try (to cross compile on a Win32 computer): http://www.turbocontrol.com/easyfpgui.htm (http://www.turbocontrol.com/easyfpgui.htm)
-
Thx for the answer. I tried that project a few days before. If I execute it i always get access violation error. So if i make a console application without forms than it works properly. I don't know how can I make project working with forms.
Regards
-
Don't you have debugging tools for Windows CE?
-
No I don't have.
-
where I set ?
I removed the function calls in WinCe-LCL, and my Test-App works!
It looks like, they are not necessary for desktop - applications.
Now I will test my App, when it also works fine, I will post the changes in the WinCE-LCL.
help ?
What is the problem, now ?
-
Can you explain what change you did ?
I have the same issue with a Marvell PXA 320 CPU Win CE 6.0 Core ( fpc 3.0.0, wince, arm, default architecture ) and when I start the app nothing happens.
I tried several things like changing the architecture but without any result.
The same app works on a Windows Embedded Handled 6.5 Classic
-
After some reading done on the forum, it seems that lazarus is not supporting wince version greater than 5.2.x.
Is there any change to compile this for wince 6.x ? with a Marvell PXA 320 CPU processor ?
What is robinhodemorais saying below ?
where I set ?
I removed the function calls in WinCe-LCL, and my Test-App works!
It looks like, they are not necessary for desktop - applications.
Now I will test my App, when it also works fine, I will post the changes in the WinCE-LCL.
help ?
What is the problem, now ?
Thank you
-
I am writing to all the threads that I read and related to my issue, with the working solution
Compiling sample app with a button for closing it, using the following setup:
Target OS: WinCE
Target CPU family: arm
Target processor: Default
LCLWidgetType:=wince
Installed sourceforge Lazarus in this order:
- lazarus-1.6.2-fpc-3.0.0-win32.exe
- lazarus-1.6.2-fpc-3.0.0-cross-arm-wince-win32.exe
Tested on hardware:
- Symbol MC2180 Windows CE 6.0 Core with Marvell PXA 320 CPU
- Intermec Windows Embedded Handheld 6.5 Classic ( Windows CE 5.2.29354 ) with ARM Cortex-A8 OMAP3 processor
It worked on the WinCE 5.2.x but did not reacted in any way when I stared the app on the Win CE 6.0 Core.
After I copied the aygshell.dll file in the same dir with the app it started to work also on Windows CE 6.0 ( MC2180 ).
I used the http://hpcmonex.net/izemize.htm (http://hpcmonex.net/izemize.htm) aygshell collection, file 12 ( size: 22,016 bytes ).
For any questions related to dev in the os and hw above you can contact me on my gmail id: zmooky.
I send my thanks to the fpc team for the great work that they did !
-
After I copied the aygshell.dll file in the same dir with the app it started to work also on Windows CE 6.0 ( MC2180 ).
Could you please document this workaround in the wiki, so it does not get forgotten?
http://wiki.freepascal.org/WinCE_port