Recent

Author Topic: Lazarus project does not run on windows ce  (Read 36596 times)

robinhodemorais

  • New Member
  • *
  • Posts: 16
Lazarus project does not run on windows ce
« 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.

JZS

  • Full Member
  • ***
  • Posts: 194
Re: Lazarus project does not run on windows ce
« Reply #1 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.
I use recent stable release

robinhodemorais

  • New Member
  • *
  • Posts: 16
Re: Lazarus project does not run on windows ce
« Reply #2 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.

JZS

  • Full Member
  • ***
  • Posts: 194
Re: Lazarus project does not run on windows ce
« Reply #3 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.
I use recent stable release

Laksen

  • Hero Member
  • *****
  • Posts: 724
    • J-Software
Re: Lazarus project does not run on windows ce
« Reply #4 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

robinhodemorais

  • New Member
  • *
  • Posts: 16
Re: Lazarus project does not run on windows ce
« Reply #5 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?

Laksen

  • Hero Member
  • *****
  • Posts: 724
    • J-Software
Re: Lazarus project does not run on windows ce
« Reply #6 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?

robinhodemorais

  • New Member
  • *
  • Posts: 16
Re: Lazarus project does not run on windows ce
« Reply #7 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 .

Laksen

  • Hero Member
  • *****
  • Posts: 724
    • J-Software
Re: Lazarus project does not run on windows ce
« Reply #8 on: April 07, 2014, 09:14:37 pm »
Try this:
Set Target Processor to default

Then in Other->Custom Options add
-Cparmv4t

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Lazarus project does not run on windows ce
« Reply #9 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.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

robinhodemorais

  • New Member
  • *
  • Posts: 16
Re: Lazarus project does not run on windows ce
« Reply #10 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

?

Laksen

  • Hero Member
  • *****
  • Posts: 724
    • J-Software
Re: Lazarus project does not run on windows ce
« Reply #11 on: April 08, 2014, 12:12:35 am »
-CpARMv4T

The T at the end is important

robinhodemorais

  • New Member
  • *
  • Posts: 16
Re: Lazarus project does not run on windows ce
« Reply #12 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

robinhodemorais

  • New Member
  • *
  • Posts: 16
Re: Lazarus project does not run on windows ce
« Reply #13 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

robinhodemorais

  • New Member
  • *
  • Posts: 16
Re: Lazarus project does not run on windows ce
« Reply #14 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?


 %)

 

TinyPortal © 2005-2018