Recent

Author Topic: Advantages of using PASCAL to develop embedded programs  (Read 5202 times)

440bx

  • Hero Member
  • *****
  • Posts: 4189
Re: Advantages of using PASCAL to develop embedded programs
« Reply #15 on: April 14, 2024, 04:32:17 pm »
I wanted to add one thing to the list that isn't only related to embedded programming but still applicable and quite a plus in my mind, that is:

compilation speed.

Depending on how you write your programs, FPC can consistently deliver sub-second build cycles.  Once you get used to that and you go to programming in C/C++ using something like Visual Studio, very quickly you honestly wonder if you live on a planet of programming masochists (which forces you to ask yourself, why am I using this thing ???.)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11517
  • FPC developer.
Re: Advantages of using PASCAL to develop embedded programs
« Reply #16 on: April 14, 2024, 04:46:32 pm »
For me it doesn't matter. Simply because I have source files in the same magnitude as physical cores they are all built in one go, so instantaneously.

440bx

  • Hero Member
  • *****
  • Posts: 4189
Re: Advantages of using PASCAL to develop embedded programs
« Reply #17 on: April 14, 2024, 05:17:08 pm »
For me it doesn't matter. Simply because I have source files in the same magnitude as physical cores they are all built in one go, so instantaneously.
I'm not sure I am understanding you correctly.  Are you saying that your compiles in VS C/C++ happen instantaneously ?... if you get instantaneous builds in VS C/C++, I truly envy you.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

gasensor

  • New Member
  • *
  • Posts: 44
Re: Advantages of using PASCAL to develop embedded programs
« Reply #18 on: April 14, 2024, 05:33:15 pm »
I wanted to add one thing to the list that isn't only related to embedded programming but still applicable and quite a plus in my mind, that is:

compilation speed.

Depending on how you write your programs, FPC can consistently deliver sub-second build cycles.  Once you get used to that and you go to programming in C/C++ using something like Visual Studio, very quickly you honestly wonder if you live on a planet of programming masochists (which forces you to ask yourself, why am I using this thing ???.)

Programming languages with strong data types tend to compile quickly. When processing strings, you don't need to compare whether the current character is "0" character by character.

In order to improve compilation speed, C/C++ often separates out the parts that need to be modified. That's why C/C++ projects have a lot of DLL files. I saw this method in an article written by a programmer at EA.

Of course, there is another way, which is one file per function. In this way, you don't have to recompile all the programs if you modify a few places. But this results in thousands of source files. One of the projects I'm aware of that uses this style is Azure RTOS (formerly ThreadX)
« Last Edit: April 14, 2024, 05:45:12 pm by gasensor »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11517
  • FPC developer.
Re: Advantages of using PASCAL to develop embedded programs
« Reply #19 on: April 14, 2024, 06:10:23 pm »
For me it doesn't matter. Simply because I have source files in the same magnitude as physical cores they are all built in one go, so instantaneously.
I'm not sure I am understanding you correctly.  Are you saying that your compiles in VS C/C++ happen instantaneously ?... if you get instantaneous builds in VS C/C++, I truly envy you.

This is about embedded 30kb programs (10-20kloc) in MP Lab X(a netbeans derivative) with gcc.

 

TinyPortal © 2005-2018