Recent

Author Topic: Project running under Emulator but not on PDA Device (MC1000  (Read 17368 times)

swierzbicki

  • Full Member
  • ***
  • Posts: 177
Hi,

I really don't know how to solves this thing ! and where to start !
I'm trying to develop a small application for a Symbol MC1000. This device is running under Windows CE 5.0 (Intel PXA270 with 32Mo of RAM).

I was able to run a really simple project (a form with a button on it (display a message when cliking on it) under the Pocket Emulator (WinCE 5.0) but I was not able to run it on the PDA (transfered via activesync, in the 'my document folder'). I'm getting this error :

Cannot find 'project1' (or one of its components). Make sure the path and filename are correct and all the required libraries are available.

I've checked the filesize : it is correct. I've also tried to compres my project (UPX) ... in vain...

The only positive thing in all of this is that I was able to configure Lazarus :)... I really don't want to go to the .Net road.... (looking like the higway to hell for me ! )

Best Regards,

Stephane

Ps : thank you to all the people who contributed to this great project.... long life to FPC and Lazarus !
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

Zaher

  • Hero Member
  • *****
  • Posts: 571
    • parmaja.com
RE: Project running under Emulator but not on PDA Device (MC
« Reply #1 on: July 05, 2008, 11:30:54 pm »
I am not sure but i found it is Intel XScale processor not ARM
http://www.nationalbarcode.com/Symbol/Symbol-MC1000-Specifications.htm

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
RE: Project running under Emulator but not on PDA Device (MC
« Reply #2 on: July 06, 2008, 03:46:04 am »
Then you need to build your own cross-compiler. Follow the steps in the wiki, but change all occurences of arm to i386

http://wiki.lazarus.freepascal.org/WinCE_port#Building_WinCE_cross_compiler_from_sources

And then you can use it to rebuild the LCL

swierzbicki

  • Full Member
  • ***
  • Posts: 177
Project running under Emulator but not on PDA Device (MC1000
« Reply #3 on: July 06, 2008, 11:21:36 am »
Hi  :D ,

Thank you for your helps guys. I have fellowed the linked given by sekel and done everything by replacing the 'arm' word by 'i386'.
All building process was fine (except the LCL see step 3)

Now, I have an issue under Lazarus.
When compiling my project I'm getting this issue :

Quote
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\project1.lpr(6,3) Fatal: Can't find unit Interfaces used by Project1


I've searched arround the web (google) and arround my Lazarus installation and dind(t find this file !

To sum up, here is what I did :

- Dowloaded the Lazarus 0.9.2.5 / fpc 2.2.3 daily snapshot
- Dowloaded the  fpc 2.2.3 daily snapshot
- Installed Lazarus
- Unzipped the fpc sources to the lazarus fpc\2.2.3 folder
- Created a fpc.cfg file for i386-Wince (fpc_i386Wince.cfg) + batch files. All these files are located and ran from the lazarus fpc\2.2.3 folder

fpc_i386Wince.cfg
Code: [Select]
-Twince
-FuC:\lazarus\fpc\2.2.3\units\i386-wince
-XPi386-wince-


- Finally run these batch files :

1 - Build_I386WinCE_Compiler.cmd
Code: [Select]
PATH=C:\lazarus\fpc\2.2.3\bin\i386-win32
cd units
md i386-wince
cd..
cd bin
md i386-wince
cd..
cd compiler
make cycle CPU_TARGET=i386 OS_TARGET=wince
cd..

copy C:\lazarus\fpc\2.2.3\rtl\units\i386-wince\*.* C:\lazarus\fpc\2.2.3\units\i386-wince
copy C:\lazarus\fpc\2.2.3\compiler\ppcross386.exe C:\lazarus\fpc\2.2.3\bin\i386-wince
copy C:\lazarus\fpc\2.2.3\fpc_i386Wince.cfg C:\lazarus\fpc\2.2.3\bin\i386-wince\fpc.cfg

pause


2 - Build_I386WinCE_packages.cmd
Code: [Select]
PATH=C:\lazarus\fpc\2.2.3\bin\i386-win32;C:\lazarus\fpc\2.2.3\compiler
cd packages
make clean all CPU_TARGET=i386 OS_TARGET=wince PP=ppcross386.exe OPT="-FUC:\lazarus\fpc\2.2.3\units\i386-wince"
cd ..
pause


3 - Build_I386WinCE_LCL.cmd
Code: [Select]
PATH=C:\lazarus\fpc\2.2.3\bin\i386-win32;C:\lazarus\fpc\2.2.3\compiler
cd ..
cd ..
make lcl LCL_PLATFORM=wince PP=ppcross386.exe CPU_TARGET=i386 OS_TARGET=wince
cd fpc
cd 2.2.3
pause


This step failed with this error (i don't know why since the file is in C:\lazarus\fpc\2.2.3\units\i386-wince ...)
Quote

Fatal: Can't find unit Contnrs used by Masks
Fatal: Compilation aborted
make[1]: *** [alllclunits.ppu] Error 1
make[1]: Leaving directory `C:/lazarus/lcl'
make: *** [lcl] Error 2

I've tried to rebuildbut the LCL under Lazarus but it neither worked, I'm getting this error

Quote
C:\lazarus\lcl\interfaces\wince\wincewsmenus.pp(605,1) Error: resource compiler not found, switching to external mode


Note that I can't find the i386 wince interfaces.ppu in C:\lazarus\lcl\units\i386-wince\wince



4 - Build_I386WinCE_LazarusPackageIntf.cmd
Code: [Select]
PATH=C:\lazarus\fpc\2.2.3\bin\i386-win32;C:\lazarus\fpc\2.2.3\compiler
cd ..
cd ..
cd packager
cd registration
make PP=ppcross386.exe CPU_TARGET=i386 OS_TARGET=wince
cd..
cd..
cd fpc
cd 2.2.3
pause


In Lazarus, Ihave selected wince as widgetset in the Compiler Options->Paths and in Code tab page select WinCE as target os and i386as Target CPU. I have also changed the compiler path in Environment options to point to my ppcross386.exe compiler (C:\lazarus\fpc\2.2.3\bin\i386-wince)

What did I wrong :?:
Did I something wrong...  :roll: :?:
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

swierzbicki

  • Full Member
  • ***
  • Posts: 177
Project running under Emulator but not on PDA Device (MC1000
« Reply #4 on: July 06, 2008, 10:30:57 pm »
After more search, it looks like the Intel XScale is an ARM processor (not a i386 one)... So lazarus + arm wince add on is the way to go.

It looks like I'm on the begining again... Any clues ?
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

arnoldb

  • Jr. Member
  • **
  • Posts: 96
Project running under Emulator but not on PDA Device (MC1000
« Reply #5 on: July 07, 2008, 01:35:27 pm »
Hi swierzbicki
First have a look in the MC1000's Windows directory & see if aygshell.dll is present (you have to do this on the device itself using Explorer - and also choose to see hidden & system files).

The first error you got (in your original post) is indicative of a missing DLL, and WinCE is not too intelligent about reporting exactly what it could not find; aygshell is usually the culprit on "industrial" devices.

If aygshell.dll is missing, you could try to download aygshells.zip from http://hpcmonex.net/izemize.htm - there are different ones in the zip file you could try.

Arnold

swierzbicki

  • Full Member
  • ***
  • Posts: 177
Project running under Emulator but not on PDA Device (MC1000
« Reply #6 on: July 07, 2008, 06:27:25 pm »
Hi Arnoldb,

Many many many thanks  :D
This dll was the culprit ! FWIW I've choosen DLL N°13...

May I ask you a favor ? : do still have your scanner unit + dll for the Symbol Scanner ? Someone on this forum already asked you for him MC1000 device (I4ve tried to get in touch with him but so far no answers). Are you willing t o send me (unit + dll) at this address swierzbicki[]AT[]fermoba[]fr (replace [] with dots and AT with @) ?

Thank you again and thank you in advance

Best Regards,

Stephane Wierzbicki
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

arnoldb

  • Jr. Member
  • **
  • Posts: 96
Project running under Emulator but not on PDA Device (MC1000
« Reply #7 on: July 08, 2008, 12:34:18 pm »
Pleasure Stephane  :D

I'll send the unit to you tonight or tomorrow - I would appreciate it if you could let me know afterwards if it actually works with the MC1000.

I'll also try and document this issue on the Lazarus WinCE wiki page, as it seems as if this is a regular problem.  Maybe I can find some time to see what needs to change to remove the dependencies on aygshell - this is an FPC issue and not a Lazarus LCL issue as far as I can determine...

Regards

Arnold

I added a short description on the Windows CE Programming tips page

swierzbicki

  • Full Member
  • ***
  • Posts: 177
Project running under Emulator but not on PDA Device (MC1000
« Reply #8 on: July 09, 2008, 11:26:08 am »
All right, I'll wait for your mail :)
Be sure that I'll let you know if it will works or not on my MC1000 !
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

Toddler

  • Newbie
  • Posts: 1
Re: Project running under Emulator but not on PDA Device (MC1000
« Reply #9 on: April 29, 2009, 11:51:18 pm »
Hi swierzbicki
First have a look in the MC1000's Windows directory & see if aygshell.dll is present (you have to do this on the device itself using Explorer - and also choose to see hidden & system files).

The first error you got (in your original post) is indicative of a missing DLL, and WinCE is not too intelligent about reporting exactly what it could not find; aygshell is usually the culprit on "industrial" devices.

If aygshell.dll is missing, you could try to download aygshells.zip from http://hpcmonex.net/izemize.htm - there are different ones in the zip file you could try.

Arnold

Hi Everyone,

I am new to developing WinCE apps and I'm trying to use a Datalogic Skorpio running Windows CE v5.0.  I am having the same problem where my test app (a "Hello World" app) will not run on the unit itself.  This is definitely an "industrial" unit and it is running the Core version of CE.

I checked on the unit and it already had an aygshell.dll in place in the \Windows folder so it would seem that my error is from another missing DLL.  Is there any list of required DLL's for use with FPC on ARM processors? 

Or if anyone has any ideas on what other dll's may be missing I would greatly appreciate the help.

Cheers,
Todd

arnoldb

  • Jr. Member
  • **
  • Posts: 96
Re: Project running under Emulator but not on PDA Device (MC1000
« Reply #10 on: May 05, 2009, 10:42:36 am »
Todd, did you install the wince-cross-arm addon for Fpc/Lazarus & compile for Wince on Arm processor ?

Do you get any error message when trying to run the program on the device? - That might help in determining where the problem lies.

Regards, Arnold

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2496
Re: Project running under Emulator but not on PDA Device (MC1000
« Reply #11 on: May 07, 2009, 02:17:04 pm »
As a start, can you atleast open a console on the device ?

if not, maybe check
Code: [Select]
HKLM\Drivers\Console
 OutputTo  0 (DWORD)

It may have been set to 0xFFFFFFFF

(at least this was the case on my mobile)
« Last Edit: May 07, 2009, 02:23:00 pm by Marc »
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker