Lazarus

Programming => Operating Systems => Windows CE => Topic started by: robinhodemorais on April 07, 2014, 01:37:01 pm

Title: Lazarus project does not run on windows ce
Post 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.
Title: Re: Lazarus project does not run on windows ce
Post by: JZS on April 07, 2014, 01:51:34 pm
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.
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 07, 2014, 03:12:11 pm
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.
Title: Re: Lazarus project does not run on windows ce
Post by: JZS on April 07, 2014, 04:16:12 pm
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.
Title: Re: Lazarus project does not run on windows ce
Post by: Laksen on April 07, 2014, 04:49:56 pm
Windows CE 6.0 doesn't support ARMv5. It only supports ARM4I which as I understand it is ARMv4T
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 07, 2014, 05:14:15 pm
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?
Title: Re: Lazarus project does not run on windows ce
Post by: Laksen on April 07, 2014, 06:06:04 pm
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?
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 07, 2014, 07:24:46 pm
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 .
Title: Re: Lazarus project does not run on windows ce
Post by: Laksen on April 07, 2014, 09:14:37 pm
Try this:
Set Target Processor to default

Then in Other->Custom Options add
-Cparmv4t
Title: Re: Lazarus project does not run on windows ce
Post by: avra on April 07, 2014, 11:18:17 pm
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.
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 07, 2014, 11:43:37 pm
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

?
Title: Re: Lazarus project does not run on windows ce
Post by: Laksen on April 08, 2014, 12:12:35 am
-CpARMv4T

The T at the end is important
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 08, 2014, 01:40:25 pm
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
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 08, 2014, 05:34:17 pm
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
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 08, 2014, 06:52:04 pm
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?


 %)
Title: Re: Lazarus project does not run on windows ce
Post by: Laksen on April 08, 2014, 07:23:01 pm
What version of FPC are you using? Sounds like you are using an old one
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 08, 2014, 09:29:39 pm
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
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 11, 2014, 09:31:08 pm
Help plis... :(
Title: Re: Lazarus project does not run on windows ce
Post by: bambamns on April 12, 2014, 04:54:32 am
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)
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 15, 2014, 01:21:23 pm
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
  : (
Title: Re: Lazarus project does not run on windows ce
Post by: bambamns on April 17, 2014, 04:08:39 am
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)
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 29, 2014, 01:43:36 pm
where I set the LCL-WinCE ?
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on April 29, 2014, 01:49:11 pm
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.
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on May 14, 2014, 10:35:16 pm
help ?
Title: Re: Lazarus project does not run on windows ce
Post by: bambamns on May 15, 2014, 05:35:59 am
Quote
help ?

What is the problem, now ?
Title: Re: Lazarus project does not run on windows ce
Post by: strovatsek on May 27, 2014, 03:37:17 pm
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
Title: Re: Lazarus project does not run on windows ce
Post by: zeljko on May 27, 2014, 03:52:17 pm
What WinCE ? intel or arm ? if it's arm have you setted up processor to arm in project options ?
Title: Re: Lazarus project does not run on windows ce
Post by: strovatsek on May 27, 2014, 04:14:58 pm
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.
Title: Re: Lazarus project does not run on windows ce
Post by: Paul Breneman on May 27, 2014, 04:36:30 pm
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)
Title: Re: Lazarus project does not run on windows ce
Post by: strovatsek on May 27, 2014, 06:45:26 pm
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
Title: Re: Lazarus project does not run on windows ce
Post by: Laksen on May 27, 2014, 06:51:18 pm
Don't you have debugging tools for Windows CE?
Title: Re: Lazarus project does not run on windows ce
Post by: strovatsek on May 27, 2014, 08:39:32 pm
No I don't have.
Title: Re: Lazarus project does not run on windows ce
Post by: robinhodemorais on June 25, 2014, 07:46:28 pm
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.

Quote
help ?

What is the problem, now ?
Title: Re: Lazarus project does not run on windows ce
Post by: zmoky on January 18, 2017, 09:57:25 pm
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
Title: Re: Lazarus project does not run on windows ce
Post by: zmoky on January 18, 2017, 10:22:47 pm
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.

Quote
help ?

What is the problem, now ?

Thank you
Title: Re: Lazarus project does not run on windows ce
Post by: zmoky on January 19, 2017, 07:39:42 pm
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 !
Title: Re: Lazarus project does not run on windows ce
Post by: avra on January 22, 2017, 04:33:06 pm
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