Pi software development on a PC

formatting link

Bye Jack

--
Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
Reply to
Jack
Loading thread data ...

Yes, mine too. What has that got to do with how long it takes to compile?

--
http://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

It means that a longish time to compile is not really an issue, and may in fact result in a better program. It is better to spend time on a solid algorithm and a good implementation than on trying to get it working by tweaking and compiling over and over again. That usually results in programs that work only in the situation it was tested, and will fail in each and every unusual condition.

Reply to
Rob

I think there is a different slant on this.

I used to actually compile on EXTREMLY slow machines. PDP11 cross compiling for a 6809 target is as bad as it gets really.

But you have a makefile. You have a linker. You have a preprocessor. You can make libraries.

Unless you are compiling someone elses code for a port, you will never compile everything, just a bit and then relink.

If you are writing a module, it will be small. You can check it syntactically by compiling it with the appropriate switches and ditching the result.

You can probably develop your program on a different platform altogether, and test its logic.

When the code is actually at the point where the platform specific bits have to be tested, only then does it need to be cross compiled or actually compiled on, the target.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

With the figures we?re bandying about here it?d double the time to completion - or put another way, halve what you can achieve in the time available. Personally I don?t have infinite time available, so that matters...

You seem very attached to this idea that anyone who wants compiles to complete in a reasonable time must be engaging in a half-arsed development process. It just isn?t so.

--
http://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

ecially

s and

did

XT

cupboard;

them at >=100% speed.

vely modest

ch as

gs

t,

?t

e time to

hat

There is this :)

formatting link

--
W J G
Reply to
Folderol

On 21/08/2013 18:24, Richard Kettlewell wrote: []

Indeed! I prefer to make just /one/ change, and test it, rather than have a massive editing session to potentially debug. Fas compile is vital for that, and Embarcadero's Delphi is my tool of choice.

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

well if yuthe ONE file you are changing is less than 10,000 lines long, and doesn't involve linking an entire operating system library set, how long can it take to compile?

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Reply to
The Natural Philosopher

If it?s a dependency of every other source file in the project (something that?s often the case for header files) then it would result in a full rebuild.

--
http://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

With Delphi on a Windows PC, typically it's instant. I've never seen a C program compile and link in less than several seconds.

Compiling the NTP suite on a recent PC takes a minute or two, on the Raspberry Pi it takes some 45 minutes,

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

I don't disagree that Pi compiling is slow, but low-latency flash makes a

*huge* difference. Not a Pi example, but I've replaced the HDD in a 2004-vintage laptop with an SSD via a PATA/SATA interface (cheap'n'nasty JM20330), and boot times have improved by about a factor of 4. That's on a slow 33MB/s PATA interface, but it's the latency that makes the difference.

A USB SSD on a Pi could do very much better than an SD card.

Theo

Reply to
Theo Markettos

Even choosing better SD cards makes a difference. I used 4 pi's last weekend as scoreboards. copying 10 moderately-sized yext files to each showed a difference. One uses the pre-loaded RISC OS card supplied by ROL, the other Sandisc Ultra class 10 cards. The class-10-equipped ones received the files about twice as fast as the other. Since class

10 is supposedly optimised for large file streaming, I was surprised.
--
Alan Adams, from Northamptonshire 
alan@adamshome.org.uk 
http://www.nckc.org.uk/
Reply to
Alan Adams

Thanks, Theo. If I can find a suitably fast SD card I might give it a try. It would be helpful to find a real-world test comparing such cards.

However, in this case, the CPU was stuck near 100% during the compile and link of NTP, so I am uncertain how much gain a faster card would bring to that particular task, while agreeing with you in general that it would be a "good thing".

(Aside: I suppose the SD card /is/ using DMA I/O in the PI, and not programmed I/O? Does that CPU even have a DMA unit?)

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

From what I've gathered (I may be wrong), the initial boot is done using PIO and then DMA takes over. The speed is still not blisteringly fast, limited to something like 50MB/s IIRC.

The SD card interface is connected to the GPU, so all access has to go via that, and the GPU handles the DMA part of it too. There is some documentation available on how to drive the SD interface.

Reply to
Dom

A word of warning about memory card performance. AIUI such memory can be fast when empty but at least some operations slow down as the free space gets used up and possibly for other reasons. Wikipedia doesn't have much about memory cards per se but there are these:

formatting link
formatting link

James

Reply to
James Harris

SSDs are much better than SD cards because they're wider and have a much larger write buffer - SD cards usually have a small write buffer, so that when it's full the machine has to stall waiting for the writes to complete. This is very very slow (seconds) for some flash. SSDs don't have that problem, plus the interfaces (eg SATA, not sure about USB mass storage) can accept multiple requests at once to make use of parallel writes to different flash chips.

The best place to find test data for SD cards is the 'user contributed pictures' on Amazon listings. Some people have posted CrystalDiskMark benchmarks for particular cards, which you can actually buy from there. (Often there are subtle differences between models so you can't be sure you're buying the exact same thing from elsewhere.) For general use it's the

4KB random reads and writes that are important, rather than the bulk writes.

How much of that was 'user' and how much 'system'? Better I/O could affect the 'system' bit, but not much the 'user' bit.

Theo

Reply to
Theo Markettos

I sympathise with your attitude, but have found that as the years go by it becomes more difficult to delve into all the complexities (now where did I leave my glasses!) and am sometimes driven to the tweak and try approach (e.g. back when I was trying to get things which assumed libc6 to compile with libc5, and had to resort to various ugly hacks).

Once I worked on hardware and was silently scornful of a young guy who, instead of using an oscilloscope to try to discover what was failing, swapped cards and spares until he felt he had isolated the problem. Shudder. But in the main he succeeded. Must have had a far better memory than I; he could often be found surrounded by a huge pile of cards he had removed; presumably he could remember what he had swapped.

I had my moments, though. Once I cannablised parts from a KL10 board to make a failing board work. Aforesaid young guy 'knew' (based, I suppose, on knowledge of his own abiliies), that the repaired board must be faulty, ordered a spare from 'back east', and was sent a faulty replacement!! My repaired board stayed in use until a functioning new board had been sent. I said nothing.

--
Windmill, TiltNot@NoneHome.com       Use  t m i l l 
J.R.R. Tolkien:-                            @ S c o t s h o m e . c o m 
All that is gold does not glister / Not all who wander are lost
Reply to
Windmill

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.