* * *

Author Topic: Lazarus x C ++?  (Read 3261 times)

itasouza

  • Newbie
  • Posts: 1
Lazarus x C ++?
« on: December 15, 2015, 04:38:00 pm »
It is possible to create a small application to a machine using Lazarus? It is a POS machine in this model: http://www.nexgo.com.br/pos_g3.html Or would need to use C ++

x2nie

  • Sr. Member
  • ****
  • Posts: 451
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Lazarus x C ++?
« Reply #1 on: December 15, 2015, 05:15:44 pm »
Yes, it is possible, theoretically.


your POS machine uses Linux on ARM9, it is supported by Lazarus/FPC.


http://www.nexgo.com.br/pdf/g3_specifications.pdf
Specification:
Processor CPU ARM9,400MHZ Memory FLASH 128MB SRAM 64MB Display 320*240 TFT color screen Optional touch screen and support e-signature Keypad Operational keys 10 Navigation 9 PINPAD Build-in PINPAD Printer High speed thermal printer,16lines/s, paper 58mm*40mm Magnetic reader Track 1,2,3, bi-directional swipe IC card reader ISO 7816 Contactless card reader Support ISO/IEC 14443 Type A/B/C,Mifare card Card slot SIM card slot:1 PSAM card slot:2 SD card slot 1(SIM card slot, 2 in 1) Connectivity Wireless connectivity GPRS/CDMA/3G,optional to WIFI and Bluetooth Audio Buzzer MIC Support Peripheral ports 1Mini-USB DEVICE,1RS232 extendable 1 more USB HOST/RS232/PINPAD Battery 1850mAh lithium battery External power Input 100~240V 50~60Hz 0.8A Output 8.5V/2.5A OS LINUX App Multi-application architecture, support over 10 applications MTBF Over 50000 hours Size 165 80 65mm Weight 0.4kg w/battery, w/o paper roll Environment Operating temperature 0 50 Storage temperature -20 60 Humidity 5% 95% Non-condensing
When you were logged in, you can see attachments.
Lazarus Trunk @ Windows7 64bit, XP 32bit, Debian under VirtualMachine

Leledumbo

  • Hero Member
  • *****
  • Posts: 7651
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus x C ++?
« Reply #2 on: December 16, 2015, 04:11:23 am »
Yes, it is possible, theoretically.


your POS machine uses Linux on ARM9, it is supported by Lazarus/FPC.
I don't see ARM9 in `fpc -Parm -i`:
Supported CPU instruction sets:
  ARMV3,ARMV4,ARMV4T,ARMV5,ARMV5T,ARMV5TE,ARMV5TEJ,ARMV6,ARMV6K,ARMV6T2
  ARMV6Z,ARMV6M,ARMV7,ARMV7A,ARMV7R,ARMV7M,ARMV7EM

x2nie

  • Sr. Member
  • ****
  • Posts: 451
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Lazarus x C ++?
« Reply #3 on: December 16, 2015, 04:49:50 am »
Yes, it is possible, theoretically.

your POS machine uses Linux on ARM9, it is supported by Lazarus/FPC.
I don't see ARM9 in `fpc -Parm -i`:
Ouch! It was my fault. Thanks Leledumbo for correction.
When you were logged in, you can see attachments.
Lazarus Trunk @ Windows7 64bit, XP 32bit, Debian under VirtualMachine

Thaddy

  • Hero Member
  • *****
  • Posts: 4442
Re: Lazarus x C ++?
« Reply #4 on: December 16, 2015, 09:05:24 am »
arm9 is supported by the compiler, since arm9 either has a core architecture of armv4t or armv5t  and thumb.(and some have exotics like jazelle). You just have to look up which architecture is supported by your specific model. https://en.wikipedia.org/wiki/ARM9

So leledumbo did overlook that a bit: arm9 is not to be confused with arm9 instruction set, because that would be either armv4t or armv5t and these are supported by fpc.
« Last Edit: December 16, 2015, 09:07:58 am by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

avra

  • Hero Member
  • *****
  • Posts: 1085
    • Additional info
Re: Lazarus x C ++?
« Reply #5 on: December 16, 2015, 09:17:14 am »
Yes, it is possible, theoretically.


your POS machine uses Linux on ARM9, it is supported by Lazarus/FPC.
I don't see ARM9 in `fpc -Parm -i`:
Supported CPU instruction sets:
  ARMV3,ARMV4,ARMV4T,ARMV5,ARMV5T,ARMV5TE,ARMV5TEJ,ARMV6,ARMV6K,ARMV6T2
  ARMV6Z,ARMV6M,ARMV7,ARMV7A,ARMV7R,ARMV7M,ARMV7EM
ARM9 processor core can have one of these architectures:
- ARMv4T (if it is ARM9T processor)
- ARMv5TE (if it's ARM9E processor)
- ARMv5TEJ (if it's ARM9EJ processor)
As I can see all of these architectures are supported by FPC so there should be no problem to produce compatible applications for such linux device.
https://en.wikipedia.org/wiki/ARM9
ARM9 is an old core used in lot of PDAs and even in old Nintendo DS:
http://wiki.freepascal.org/Nintendo_DS

Edit: Thaddy was quicker. Basically it's the same answer  ;)
« Last Edit: December 16, 2015, 09:21:41 am by avra »
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

Thaddy

  • Hero Member
  • *****
  • Posts: 4442
Re: Lazarus x C ++?
« Reply #6 on: December 16, 2015, 09:46:36 am »
Note that Linux based POS machines in general go with an SDK. You would probably need that, because they tend to have almost bare metal capabilities and exotic drivers.
So first build a cross-compiler and do a 'hello world' .

This is definitely not for noobs and will also be the case with C++ although most sdk's I know of are plain C and easy to write a fpc wrapper or header translation for with h2pas.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Leledumbo

  • Hero Member
  • *****
  • Posts: 7651
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus x C ++?
« Reply #7 on: December 16, 2015, 10:17:44 am »
So leledumbo did overlook that a bit: arm9 is not to be confused with arm9 instruction set, because that would be either armv4t or armv5t and these are supported by fpc.
Indeed, I did remember arm9 maps to something else, but I forgot :D

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus