David Taylor wrote:
> On 26/05/2020 00:34, druck wrote:
> > On 25/05/2020 11:50, David Taylor wrote:
> >> What happens if, on a Raspberry Pi 1B, I try to run a program with
> >> ARM7 code? Anything specific like it refuses to run it or segfaults
> >> or???
> >
> > Most compilers targetting ARMv7 produce Thumb2 code, which is a mix of
> > 16bit Thumb and 32bit ARM instructions. ARMv6 only has 32 bit ARM and
> > Thumb 1, so will probably segfault straight away.
> >
> > ---druck
>
> Thanks. I keep getting "illegal instruction" even when I try different
> compiler options. Compiling on the RPi 1B for running on the RPI 1B. Sigh!
>
If you are doing a straight compile (using gcc or g++) on your Pi to
create an executable program for the Pi then I'd expect it to 'just
work', no special compiler options or anything required.
An "illegal instruction" error doesn't necessarily mean the compiler
has generated an illegal instruction, it may just mean you have a bug
in your program so that you are trying to execute something that isn't
code.
I'd certainly be looking for a bug in my proram before looking for
esoteric compiler issues. :-)
--
Chris Green
·
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|