Go to advanced search

by jahboater
Tue Mar 19, 2019 12:52 pm
Forum: General discussion
Topic: Power supply Raspberry, Touch-Screen, Cooling-Fan and RFID-Reader
Replies: 2
Views: 58

Re: Power supply Raspberry, Touch-Screen, Cooling-Fan and RFID-Reader

I have two questions, first of all I wanted to ask if it is possible to easily run a raspberry pi 3B+, with a touch-screen, a coolig-fan and a RFID-Reader, just with the normal "Raspberry Pi Universal Power Supply"? You wont need a cooling fan for a 3B+. For sustained heavy loads, you might need a ...
by jahboater
Tue Mar 19, 2019 10:58 am
Forum: Other projects
Topic: Using an RPi to reduce Power Usage, Off Grid.
Replies: 6
Views: 104

Re: Using an RPi to reduce Power Usage, Off Grid.

Restricting the ARM clock to 600MHz also drops the core voltage down to 1.2V (from 1.35V), which must save a little power.
by jahboater
Tue Mar 19, 2019 10:47 am
Forum: Bare metal, Assembly language
Topic: Puzzled, Mem speed?
Replies: 21
Views: 534

Re: Puzzled, Mem speed?

The reason being that these units could be put to other uses while the memcopy is being completed by DMA, and I do not know of many personal computers that are without DMA. I don't think moving stuff between memory and registers with LDM or LDP or LDR can use DMA ? Or is this an ARM thing I don't k...
by jahboater
Tue Mar 19, 2019 10:18 am
Forum: Bare metal, Assembly language
Topic: Puzzled, Mem speed?
Replies: 21
Views: 534

Re: Puzzled, Mem speed?

The reason being that these units could be put to other uses while the memcopy is being completed by DMA, and I do not know of many personal computers that are without DMA. I don't think moving stuff between memory and registers with LDM or LDP or LDR can use DMA ? Or is this an ARM thing I don't k...
by jahboater
Tue Mar 19, 2019 9:05 am
Forum: Bare metal, Assembly language
Topic: Puzzled, Mem speed?
Replies: 21
Views: 534

Re: Puzzled, Mem speed?

Thanks for posting this. I tried it by inlining it in a large C program, and sadly failed, 99.999999999% likely because my C inline stuff is wrong :( Its called "movs" because the x86 version just does "rep movsb" (since ERMSB) static char * movs( void *dst, const void *src, dword len ) { #if DEBUG ...
by jahboater
Mon Mar 18, 2019 6:42 pm
Forum: C/C++
Topic: Compiling gcc Options
Replies: 25
Views: 346

Re: Compiling gcc Options

Yes 20GB should be plenty. I only know about building the compiler on the Pi, for the Pi, which I do routinely. Whenever a new release of GCC is published I build and install it on all my Pi's and on my x86 development PC. I see you are using mingw, probably a good idea. Having seen the mess (some) ...
by jahboater
Mon Mar 18, 2019 5:34 pm
Forum: C/C++
Topic: Compiling gcc Options
Replies: 25
Views: 346

Re: Compiling gcc Options

It would be great if we could build GCC on Windows using Microsoft's VC or whatever. But no, you need a recent GCC to build GCC. The default compiler on the Pi GCC 6.3 can build GCC 8.3 on a Pi3, I know I have done it several times (and once on a Pi Zero :( ) Running out of disk space is the most l...
by jahboater
Mon Mar 18, 2019 5:26 pm
Forum: C/C++
Topic: Compiling gcc Options
Replies: 25
Views: 346

Re: Compiling gcc Options

I was just trying to get it working with the official Raspbian. I didnt know you were trying to do that, I thought you were trying to build a cross compiler on Windows! To install the latest version of GCC on a Pi3B+ is easy, try this script, it should do everything for you. Make sure you have 10GB...
by jahboater
Mon Mar 18, 2019 5:20 pm
Forum: Python
Topic: Handling Ctrl-C / Kill in threads
Replies: 5
Views: 108

Re: Handling Ctrl-C / Kill in threads

I don't know if this will help, or if this system call is available in Python (probably is) NAME exit_group - exit all threads in a process SYNOPSIS #include <linux/unistd.h> void exit_group(int status); DESCRIPTION This system call is equivalent to exit(2) except that it terminates not only the cal...
by jahboater
Mon Mar 18, 2019 11:24 am
Forum: Beginners
Topic: Problems with SSH
Replies: 3
Views: 103

Re: Problems with SSH

You may add an empty file called "ssh" or "ssh.txt" in the small FAT32 partition (which is always visible to Windows). That should enable ssh, and the file should be removed on success. (and ditto "wpa_supplicant.conf" for the WiFi). It should not be necessary to attach a terminal/keyboard to a head...
by jahboater
Mon Mar 18, 2019 11:01 am
Forum: C/C++
Topic: Compiling gcc Options
Replies: 25
Views: 346

Re: Compiling gcc Options

AdamStanislav wrote:
Mon Mar 18, 2019 3:36 am
So, no I am not buying a second computer just to run Linux on it (besides, I am a FreeBSD guy, so if I could afford a second computer, it would run FreeBSD, not Linux).
I don't know if its any good:-
https://wiki.freebsd.org/FreeBSD/arm/Raspberry%20Pi
by jahboater
Mon Mar 18, 2019 9:37 am
Forum: General discussion
Topic: Let's share lifespan optimizations for microSD cards.
Replies: 3
Views: 218

Re: Let's share lifespan optimizations for microSD cards.

If you are using the standard ext4 filesystem that Raspbian uses, then consider adding the "commit=600" mount option in /etc/fstab. That reduces writes and increases performance at the expense of increased risk of disk corruption after a power cut. The regular forced "sync" is done every ten minutes...
by jahboater
Mon Mar 18, 2019 9:29 am
Forum: Troubleshooting
Topic: SD Card flashed incorrectly? RPi Zero W
Replies: 8
Views: 118

Re: SD Card flashed incorrectly? RPi Zero W

Yup, used it for years for files without any trouble. When I started writing a lot of images I was getting frequent verification failures. Tried a different reader and no more errors. I tried a USB SD Adapter and I have the same issue. The RPi Zero simply isn't booting whatever is on the SD card po...
by jahboater
Mon Mar 18, 2019 8:05 am
Forum: General programming discussion
Topic: Mixing C and assembly?
Replies: 18
Views: 295

Re: Mixing C and assembly?

I’d like to take a crack at 64 bit Arm assembler. But a 64 bit OS is required. Have you installed a 64 bit OS? Gentoo or a different one? I use Gentoo64 on the Pi. Works well, is fast, and comes with GCC 8.2 ready installed! https://github.com/sakaki-/gentoo-on-rpi3-64bit This brief ARM doct is a q...
by jahboater
Mon Mar 18, 2019 1:52 am
Forum: C/C++
Topic: Compiling gcc Options
Replies: 25
Views: 346

Re: Compiling gcc Options

You said above "I want to figure out how to create a cross-compiler. That is the point." Now you want to port a library. That did not work, either. I guess it’s time to let go. I’m sure if Raspberry Pi Foundation cared to have our software ported to Raspbian, they would have made a Windows-to-Raspbi...
by jahboater
Mon Mar 18, 2019 1:46 am
Forum: General programming discussion
Topic: Mixing C and assembly?
Replies: 18
Views: 295

Re: Mixing C and assembly?

But portability becomes an issue and a reason not to dive too deeply into it. Trust GCC I guess. I have a Rock64 and a Pocket Beagle aside from 3 Pis and 3 Zeros and 2 laptops, I'm not going to learn assembly for all of them, I turn 65 this summer. But it's infinitely more interesting than TV. Pers...
by jahboater
Sun Mar 17, 2019 10:51 pm
Forum: General programming discussion
Topic: Mixing C and assembly?
Replies: 18
Views: 295

Re: Mixing C and assembly?

But how do you know to use r0, r1, r2, r3? Is there something that talks about that sort of stuff? Its the ABI (application binary interface). It looks like the previous post by @rattusrattus linked to the spec. Probably the arguments go in r0, r1, r2, r3 ... and the function return value goes on r...
by jahboater
Sun Mar 17, 2019 10:37 pm
Forum: C/C++
Topic: Compiling gcc Options
Replies: 25
Views: 346

Re: Compiling gcc Options

Anyway, when I compile GCC for the Pi3, I use this config: ../configure --enable-languages=c,c++,fortran --with-cpu=cortex-a53 \ --with-fpu=neon-fp-armv8 --with-float=hard --build=arm-linux-gnueabihf \ --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --enable-checking=no Well, this is what I...
by jahboater
Sun Mar 17, 2019 9:52 pm
Forum: General programming discussion
Topic: Mixing C and assembly?
Replies: 18
Views: 295

Re: Mixing C and assembly?

Yes, I know you can look at the assembly code coming out of GCC. A hint if you want to do that by the way, its much easier if you can use a GCC version 7 or later (the current version is 8.3). With a recent version of GCC you get the C source lines interspersed with the emitted assembler, and it is...
by jahboater
Sun Mar 17, 2019 9:30 pm
Forum: C/C++
Topic: Compiling gcc Options
Replies: 25
Views: 346

Re: Compiling gcc Options

I have been trying to make a cross-compiler, so I can compile for RPi in Windows 10, and I have been trying it for days now. Can you see why people suggest working on the Pi and not cross compiling - your problems are quite common. Anyway, when I compile GCC for the Pi3, I use this config: ../confi...
by jahboater
Sun Mar 17, 2019 9:23 pm
Forum: General programming discussion
Topic: Mixing C and assembly?
Replies: 18
Views: 295

Re: Mixing C and assembly?

For interest, the alternative is placing inline assembly code within the C. The syntax is a bit hard to learn, but the result is very fast because it fully takes part in the optimization of the surrounding code. If you write separate functions in assembler then they will not be optimized. Nowadays I...
by jahboater
Sun Mar 17, 2019 7:52 am
Forum: Off topic discussion
Topic: Longest Raspberry Pi uptime
Replies: 71
Views: 45615

Re: Longest Raspberry Pi uptime

The main thing about these 5-6 year up times is being an answer to questions about the Pi's longevity or Raspbian's stability.

"uptime -p" gives a nicer display by the way.
by jahboater
Sat Mar 16, 2019 10:52 pm
Forum: Troubleshooting
Topic: 32 gigabyte memory card removing partition plz help
Replies: 4
Views: 103

Re: 32 gigabyte memory card removing partition plz help

Yes,

And you do not need to remove anything first.
Neither do you need to format it first.
by jahboater
Sat Mar 16, 2019 3:35 pm
Forum: Off topic discussion
Topic: Worried, Whatever-Speed
Replies: 46
Views: 859

Re: Worried, Whatever-Speed

Good grief. So how does one create a binary that will run on any random x86 machine? Like say all the 64 bit ones. Good question. Best option is probably -mtune=generic The choices for cpu-type are the same as for -march. In addition, -mtune supports 2 extra choices for cpu-type: generic Produce co...
by jahboater
Sat Mar 16, 2019 2:55 pm
Forum: Off topic discussion
Topic: Worried, Whatever-Speed
Replies: 46
Views: 859

Re: Worried, Whatever-Speed

The proof is in the pudding. We are still waiting for an assembler coder to show us how it is done by presenting a program to calculate million digit Fibonacci numbers and out run C or C++. A suitably small and simple problem. So far no one has stepped up to the challenge. To be fair, its around 80...

Go to advanced search