Go to advanced search

by jahboater
Thu Jul 25, 2019 2:29 pm
Forum: Troubleshooting
Topic: Raspberry Pi 4 temperature
Replies: 407
Views: 91869

Re: Raspberry Pi 4 temperature

RPIgoodSBC wrote:
Thu Jul 25, 2019 1:11 pm
I suppose that cpuburn-a7 is for Cortex-A72.
No, I think it is for the old Cortex-A7 that the first version of the Pi2 used.
by jahboater
Thu Jul 25, 2019 1:03 pm
Forum: Troubleshooting
Topic: Raspberry Pi 4 temperature
Replies: 407
Views: 91869

Re: Raspberry Pi 4 temperature

The airflow on noctua 8x8cm is x5 and the size blown all the pi board.Is more big than the pi, of course. Its not the total airflow I was referring to. If you look at the fan, there is a large circular lump in the middle? Which is the motor of course. Clearly no airflow can be produced by that part...
by jahboater
Thu Jul 25, 2019 1:01 pm
Forum: Troubleshooting
Topic: Raspberry Pi 4 temperature
Replies: 407
Views: 91869

Re: Raspberry Pi 4 temperature

cpuburn-a7 Why this A7 version? The CPU's are Cortex-A72 on the Pi4 and on the Pi3 they are Cortex-A53 Both are compatible of course because they may run in big.little configurations. wget https://raw.githubusercontent.com/ssvb/cpuburn-arm/master/cpuburn-a53.S gcc -o cpuburn-a53 cpuburn-a53.S ./cpu...
by jahboater
Thu Jul 25, 2019 12:16 pm
Forum: Troubleshooting
Topic: Raspberry Pi 4 temperature
Replies: 407
Views: 91869

Re: Raspberry Pi 4 temperature

RPIgoodSBC wrote:
Thu Jul 25, 2019 11:37 am
Noctua 8x8cm 5V PWM fan do some usable airflow
The trouble with the larger fans on something as small as the Pi SoC is the airflow from the centre of the fan is much reduced.
by jahboater
Thu Jul 25, 2019 11:09 am
Forum: Troubleshooting
Topic: Raspberry Pi 4 temperature
Replies: 407
Views: 91869

Re: Raspberry Pi 4 temperature

I think it's worth mentioning that cpuburn is a pathological case, you will never get to that level of usage under normal circumstances. So if you can keep below threshold with that running, the normal use case will be well inside the thermal limits. Producing a system to keep the device cool when ...
by jahboater
Thu Jul 25, 2019 7:07 am
Forum: Troubleshooting
Topic: Raspberry Pi 4 temperature
Replies: 407
Views: 91869

Re: Raspberry Pi 4 temperature

Hi guys, I've got an ICE tower cooling fan for my raspberry Pi 4B. https://www.ebay.com/itm/173962045147 and the temperature can be reduce almost 30°C when I using stress -c 4 or sysbench, I found that the temperature will remain in +/- 44 °C , and it works fine~ What does the temperature rise to w...
by jahboater
Tue Jul 23, 2019 11:53 pm
Forum: Advanced users
Topic: How to make rpi0-w RAM 128MB from 512MB
Replies: 4
Views: 249

Re: How to make rpi0-w RAM 128MB from 512MB

bertlea wrote:
Tue Jul 23, 2019 11:39 pm
How about creating a 352M tmpfs ram disk to leave only 128M usable for the OS?
You probably meant ramfs.

Tmpfs uses only the memory required for the files it contains.
It has a tiny overhead of around 100k
Furthermore it is in virtual memory and is subject to paging.
by jahboater
Tue Jul 23, 2019 12:59 pm
Forum: Beginners
Topic: To limit the amount of GPU memory in RPI4 B
Replies: 5
Views: 225

Re: To limit the amount of GPU memory in RPI4 B

The same. Set max_framebuffers to 1 in config.txt to reduce memory requirements for the framebuffers in legacy mode, and probably has some effect in FKMS mode as well. I don't suppose you can set max_framebuffers=0 for a headless Pi? Not sure, try it and see? Seems to work! pi@pi4:~ $ free -h total...
by jahboater
Tue Jul 23, 2019 9:16 am
Forum: Beginners
Topic: To limit the amount of GPU memory in RPI4 B
Replies: 5
Views: 225

Re: To limit the amount of GPU memory in RPI4 B

jamesh wrote:
Tue Jul 23, 2019 9:12 am
The same. Set max_framebuffers to 1 in config.txt to reduce memory requirements for the framebuffers in legacy mode, and probably has some effect in FKMS mode as well.
I don't suppose you can set max_framebuffers=0 for a headless Pi?
by jahboater
Tue Jul 23, 2019 8:45 am
Forum: RISCOS
Topic: No desktop
Replies: 15
Views: 581

Re: No desktop

Thanks, it is a 3 Model B+ Used Debian Disk Utility to format 32GB as FAT, marked it as bootable then used dd bs=1M if=ro524-1875M.img of=/dev/sdb It completed ok saying 2GB had been written To save you time, you don't need to prepare or format the card in any way. The ".img" file you copy onto the...
by jahboater
Tue Jul 23, 2019 7:39 am
Forum: Bare metal, Assembly language
Topic: Using the NEON vmvn instruction
Replies: 6
Views: 445

Re: Using the NEON vmvn instruction

You are right. "mvn" and "not" produce the same instruction.

Where did you see that? I couldn't find it in the ARMv8_ARM.

Edit: found it - C7.2.192 and C7.2.195
Don't know why I missed that.
by jahboater
Tue Jul 23, 2019 7:31 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

ejolson wrote:
Tue Jul 23, 2019 6:14 am
Feel free to add to this list as appropriate.
Small size.
The kernel uses this (written by Linus) which takes only six bytes.

Code: Select all

loop: 
  lodsb 
  stosb 
  test al,al 
  jnz loop
the test and the jnz get fused of course.
by jahboater
Tue Jul 23, 2019 7:23 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Michiel O, Its good to see someone taking an interest in writing efficient code. There is a saying "Look after the pennies, and the pounds look after themselves". I guess if you care about the performance of small functions like strcpy() then you will be unlikely to write the sort of bloated slow co...
by jahboater
Tue Jul 23, 2019 6:46 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

It's incredible what difference -O3 makes. Yes indeed. A tip to look at the code produced by the compiler, with the C source code included (so its very easy to find stuff): Use the latest Raspbian (Buster) which has a decent version of GCC (8.3). gcc -O3 -S -fverbose-asm hello.c -o hello.s then jus...
by jahboater
Tue Jul 23, 2019 6:43 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

strcpy() returns the value of the first argument, the destination. Its much more useful, and the code is simpler, to return the final position of the dst pointer, so you can chain strcpy()'s together. I like that--maybe even done so. If allowed, it's also possible to use sprintf to paste strings to...
by jahboater
Tue Jul 23, 2019 6:19 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

1) Who in their right mind would write a string copy function in C like that when there is one in the standard library of every C compiler Reasons to write the strcpy by hand might be To see how much faster the library version is? To see how good the C optimiser is? To document in a high-level lang...
by jahboater
Tue Jul 23, 2019 3:47 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

I was amused that "while (*dst++ = *src++)" and "for(int cnt = 0; (s[cnt] = t[cnt]); cnt++)" emit the same code.

It just shows how this sort of micro optimization is pointless nowadays.
Just choose the simplest and most readable version.
by jahboater
Tue Jul 23, 2019 3:17 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Heater, For obvious reasons the strcpy() call in the test code is simply being converted to memcpy() by the compiler. Your point is well made though. I wish people would look at the assembler produced by the compiler. The code produced for the two hand written C functions is the same (GCC 9.1 -Os ),...
by jahboater
Tue Jul 23, 2019 2:38 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

• The version above still does a C calling frame setup and teardown, I think that can be substituted for a simple register push and pop. That probably requires StrCpyAsm in its own pure assembly file, strcpyasm.s , and compiling/linking it in. Just inline it if the compiler has not already done so....
by jahboater
Mon Jul 22, 2019 6:24 pm
Forum: Advanced users
Topic: How to move a 4.9 GB file (Solved)
Replies: 9
Views: 380

Re: How to move a 4.9 GB file

W. H. Heydt wrote:
Mon Jul 22, 2019 1:52 am
You could always compress it first. Since it's on a Pi, you can use zip or gzip.
Or the newer "xz" which will give much better compression, but likely be slower too.

Its similar in use to gzip, so "xz -9" will give the best compression.

See "man xz" for details.
by jahboater
Mon Jul 22, 2019 8:53 am
Forum: Bare metal, Assembly language
Topic: Using the NEON vmvn instruction
Replies: 6
Views: 445

Re: Using the NEON vmvn instruction

Having tested with 3 different assemblers, it looks like your issue is your choice of assembler. Thanks. I think so too, or rather its targeting the wrong platform, or the wrong FPU (vfp?) Which may be a problem with the compiler, or how I built it. The assembler gets:- .arch armv8-a+crc and NEON i...
by jahboater
Sun Jul 21, 2019 11:27 pm
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

PeterO wrote:
Sun Jul 21, 2019 10:56 am
On modern machines I rarely add more that a dozen lines of code without testing.
Sensible. Then, if things break, its easy to find the change that caused the problem.
by jahboater
Sun Jul 21, 2019 10:02 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

jalih wrote:
Sun Jul 21, 2019 9:57 am
But can C do this:

Code: Select all

int32_t big, little;

little = 255;

big = __builtin_bswap32(little);

Or vice-versa;
It will be done in a single instruction on x86 and ARM.  

Although not in the standard, most compilers will accept it.
by jahboater
Sun Jul 21, 2019 9:45 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 303
Views: 9432

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

With edit/compile/test cycles easily taking 15 minutes you quickly learn to plan out your code rather than "designing at the keyboard" which seems to be popular these days. I must respectfully disagree with this. I have worked on big codebases which indeed took over 10 minutes to compile, When I wa...

Go to advanced search