Go to advanced search

by jahboater
Mon Sep 16, 2019 6:07 pm
Forum: General discussion
Topic: ARMv8 32-bit mode and 64-bit division
Replies: 5
Views: 225

Re: ARMv8 32-bit mode and 64-bit division

From this post I was expecting 64-bit divisions done in 32-bit mode on the Pi 4B to be on par with 64-bit mode. What am I doing wrong? 32 bit mode has udiv and sdiv instructions from ARMv7 onwards, but they only work with 32 bit operands. In 32-bit mode, 64 bit division is done by a call to a libra...
by jahboater
Mon Sep 16, 2019 9:32 am
Forum: General discussion
Topic: free some RAM
Replies: 11
Views: 252

Re: free some RAM

david_1234 wrote:
Mon Sep 16, 2019 9:14 am
I'm waitng for PI4 to arrive - it will be next week ~

just to be sure
this is how I increase the SWAP ?

Code: Select all

sudo nano /etc/dphys-swapfile
change it to 1024?
Yes

Code: Select all

sudo sed -i 's/^CONF_SWAPSIZE=[0-9]*$/CONF_SWAPSIZE=1024/' /etc/dphys-swapfile
sudo /etc/init.d/dphys-swapfile restart
by jahboater
Wed Sep 11, 2019 10:35 am
Forum: C/C++
Topic: GCC frustrations
Replies: 4
Views: 384

Re: GCC frustrations

One program doesn't work because the log ( ) function generates errors about libraries that don't exist, For that, you need the math library which is included by adding -lm to the gcc command line. gcc hello.c -o hello -lm If you type: man log it gives you all the details. You will need to include ...
by jahboater
Mon Aug 19, 2019 12:30 pm
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5152

Re: Looking for advice with C++ learning

needs to become something like [64 bit signed integer] a [64 bit signed operator] = [64 bit signed integer] b [ignoring overflow 64 bit signed integer operator] + [64 bit signed integer] b; I can't see that catching on ! PeterO Did you mean "checking overflow"? I think Heater wants all integer arit...
by jahboater
Sun Aug 18, 2019 10:33 pm
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5152

Re: Looking for advice with C++ learning

It's not clear to me that parsing the comments and matching it up to the code is any more simple than putting something into the syntax itself. Yes true, for a static checking program like lint. For the compiler however, a comment is just a comment, much easier. Though yes, its a different matter r...
by jahboater
Sun Aug 18, 2019 10:15 pm
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5152

Re: Looking for advice with C++ learning

The code I presented above has no complaints at all when compiled on my Pi: No, as I said case 1: case 2: case 4: case 4: will not elicit a complaint because there is no code. Stuff like this will: { case '0'...'7': --p; base = 8; case 'x': start = p; and this does read quite nicely IMHO { case '0'...
by jahboater
Sun Aug 18, 2019 9:56 pm
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5152

Re: Looking for advice with C++ learning

// OOPS! Missing case falls through Works on my Pi! try.c: In function ‘parse_escape’: try.c:2313:9: error: this statement may fall through [-Werror=implicit-fallthrough=] 2313 | base = 8; | ~~~~~^~~ compilation terminated due to -Wfatal-errors. I use /*fallthrough*/ when a break is deliberately mi...
by jahboater
Sun Aug 18, 2019 6:54 pm
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5152

Re: Looking for advice with C++ learning

Some of the issues above are caught by the compiler already. -Wall and -Wextra are really helpful. I suggest at least:- -Wall -Wextra -Wconversion -Wuninitialized -Wcast-qual -Wcast-align -Wundef -Werror -Wfatal-errors The last two options mean that you cannot finish the compilation until the code ...
by jahboater
Sun Aug 18, 2019 12:18 pm
Forum: General discussion
Topic: pi 4 sd card
Replies: 2
Views: 250

Re: pi 4 sd card

Yes.
And using a new card means that all your stuff remains on the old card which you may access from your Pi running the new buster.
by jahboater
Sun Aug 18, 2019 12:13 pm
Forum: Advanced users
Topic: Avoiding circular symlinks in an install script
Replies: 18
Views: 1054

Re: Avoiding circular symlinks in an install script

This is actually a command called "test"

To see the details of the options, including -L, try

man test
by jahboater
Sun Aug 18, 2019 12:05 pm
Forum: Troubleshooting
Topic: Raspberry Pi 4 temperature
Replies: 529
Views: 130755

Re: Raspberry Pi 4 temperature

The heatsinks wont help (much) inside that poorly ventilated case.

Try moving the Pi outside of the case temporarily and monitor the temps.
I find the temp is a little lower if the Pi board is on edge and the heat sink fins are aligned vertically.
by jahboater
Sun Aug 18, 2019 10:37 am
Forum: Beginners
Topic: microSD card size?
Replies: 17
Views: 687

Re: microSD card size?

card to boot the Raspbian Operating System. The reply from @DrGeoff looks succinct and accurate to me: Only a small partition (about 250 Mbyte) on the card will be FAT and Linux will not normally store your user files there. The remainder of the card will be a Linux file system which can store file...
by jahboater
Sun Aug 18, 2019 8:36 am
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5152

Re: Looking for advice with C++ learning

If you want to get into C/C++ be ready to spend a lot of time checking every line of your code carefully for these and and a host of other possible slip ups. And finding the cause of obscure bugs that you create as a result. Get familiar with tools like valgrind and the "sanitizer" tools that come ...
by jahboater
Tue Aug 13, 2019 2:19 pm
Forum: General discussion
Topic: Why moving to 64bit?
Replies: 259
Views: 17599

Re: Why moving to 64bit?

You may want to add:

-mfpu=neon-fp-armv8

or it will use the old VFP instead (even with -march=native)
by jahboater
Tue Aug 13, 2019 12:51 pm
Forum: General discussion
Topic: Why moving to 64bit?
Replies: 259
Views: 17599

Re: Why moving to 64bit?

You can use

-march=native -mtune=native
by jahboater
Tue Aug 13, 2019 12:48 pm
Forum: C/C++
Topic: Ways to compile C/C++ code for pi
Replies: 10
Views: 2604

Re: Ways to compile C/C++ code for pi

The compiler installed by default is called GCC.
It is a very popular and capable compiler.
The letters GCC stand for Gnu Compiler Collection.
According to "gcc -v", it will compile:

C
Ada
C++
Go
Fortran
Objective C

and supports the latest standards, such as: C18, C++17, Fortran 2018
by jahboater
Tue Aug 13, 2019 12:30 pm
Forum: C/C++
Topic: Ways to compile C/C++ code for pi
Replies: 10
Views: 2604

Re: Ways to compile C/C++ code for pi

An excellent C and C++ compiler is included, pre-installed, and ready to use. Create the usual little test program with any editor in a file called "hello.c" #include <stdio.h> int main( void ) { puts( "hello world!" ); } Compile it with: cc hello.c -o hello and finally, you can run the program as m...
by jahboater
Sun Aug 11, 2019 6:36 am
Forum: General discussion
Topic: Are there any disadvantages of using a microsd card above 32GB on the Pi 4?
Replies: 5
Views: 427

Re: Are there any disadvantages of using a microsd card above 32GB on the Pi 4?

Yes. Looking at this: https://www.amazon.co.uk/SanDisk-microSDXC-Memory-Adapter-Performance/dp/B073S8TQH6/ref=sr_1_4?keywords=sandisk+ultra+a1&qid=1565505152&s=gateway&sr=8-4 it seems that up to 128GB is cheap now, with a steep price rise per GB after that. Avoid NOOB's and you will be fine with the...
by jahboater
Sun Aug 11, 2019 6:29 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1125
Views: 48901

Re: Project Digital Apocalypse Not Now

Heater wrote:
Sun Aug 11, 2019 6:18 am

That does seem rather large.
Rust programs are statically linked are they not? so that known "safe" functions get used.
by jahboater
Sat Aug 10, 2019 8:13 pm
Forum: Bare metal, Assembly language
Topic: Announce: RusPiRo - a kernel the Rust way ;)
Replies: 51
Views: 3342

Re: Announce: RusPiRo - a kernel the Rust way ;)

1) Have read, fully understood and remember all details of the standards document for C/C++. Not C++ !!!!!!! C only. The C standard is far far smaller, easy to read, and actually quite helpful. Also, since many library functions are now included in the C standard, I usually refer to that rather tha...
by jahboater
Sat Aug 10, 2019 4:21 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 861
Views: 87531

Re: Raspberry Pi 4 Thread - general discussion

pica200 wrote:
Sat Aug 10, 2019 4:12 pm
I know the ground planes of the whole board will sink heat away but that's not enough to prevent throttling.
Its enough for shortish jobs (that's what thermal inertia means). Perhaps a couple of minutes.
by jahboater
Sat Aug 10, 2019 4:18 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 861
Views: 87531

Re: Raspberry Pi 4 Thread - general discussion

Especially if i'm gonna fire up gcc or similar ;) Don't worry about GCC! A 13,000 line compilation, with optimization, raises the temp of my Pi4 by 2C. Compiling GCC itself which is huge, using make -j5 (all four cores flat out for over 3 hours) did not reach throttling or even close. That's roughl...
by jahboater
Sat Aug 10, 2019 3:20 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 861
Views: 87531

Re: Raspberry Pi 4 Thread - general discussion

And the SoC may be fine up to 120°C but it causes stress to surrounding components aswell. And the solder balls under it which is the reason many cheap laptops with bad cooling fail early ;) You will find the Raspberry Pi is rather better engineered than that. In fact the SoC is deliberately therma...
by jahboater
Sat Aug 10, 2019 1:44 pm
Forum: Bare metal, Assembly language
Topic: Announce: RusPiRo - a kernel the Rust way ;)
Replies: 51
Views: 3342

Re: Announce: RusPiRo - a kernel the Rust way ;)

So now you can program in something C like. Soon you find that it's very tedious that your programs crash at random, have weird responses to odd input and are full of security vulnerabilities. I must say that I don't have all these problems. Nowadays I write important code to be strictly standard c...
by jahboater
Sat Aug 10, 2019 1:29 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 861
Views: 87531

Re: Raspberry Pi 4 Thread - general discussion

In the UK, all four CPU cores maxed out raised the temp from 54C at idle to 68C after about ten minutes. That's with NO fan! With a full desktop running and a few web browser tabs. Heavy use of NEON will make it hotter (see the cpuburn stress test). My Pi 4 runs at around 60C idle on the Raspbian d...

Go to advanced search