Go to advanced search

by crumb_er
Fri Mar 30, 2018 1:30 pm
Forum: General programming discussion
Topic: ARM assembler Thumb instruction set
Replies: 19
Views: 4793

Re: ARM assembler Thumb instruction set

jahboater wrote:
Fri Mar 30, 2018 1:28 pm
crumb_er wrote:
Fri Mar 30, 2018 1:20 pm
Yes, by hand with the command

Code: Select all

gcc -S hello.c -mthumb
That is not by hand, that is using the compiler!!!
so it's not possible to do this only with the compiler?

thanks very much for the answers ;) ;)
by crumb_er
Fri Mar 30, 2018 1:20 pm
Forum: General programming discussion
Topic: ARM assembler Thumb instruction set
Replies: 19
Views: 4793

Re: ARM assembler Thumb instruction set

jahboater wrote:
Fri Mar 30, 2018 1:08 pm
crumb_er wrote:
Fri Mar 30, 2018 1:02 pm
my goal would be to translate my C code in assembler code with a very simple and reduced set of instruction.
Do you mean by hand?
Because that is likely the only way you will be able to do it on a Pi Zero.
Yes, by hand with the command

Code: Select all

gcc -S hello.c -mthumb
by crumb_er
Fri Mar 30, 2018 1:18 pm
Forum: General programming discussion
Topic: ARM assembler Thumb instruction set
Replies: 19
Views: 4793

Re: ARM assembler Thumb instruction set

Does it really really have to be a Pi Zero? we decided to use the pi zero just because we have it but it's not obligatory to use it. If not, just use -mthumb on your Pi3 and you are good to go! My question about the use of -mthumb on a pi3 is: if I use this option, is the assembly code entirely com...
by crumb_er
Fri Mar 30, 2018 1:02 pm
Forum: General programming discussion
Topic: ARM assembler Thumb instruction set
Replies: 19
Views: 4793

Re: ARM assembler Thumb instruction set

Anyway, my goal would be to translate my C code in assembler code with a very simple and reduced set of instruction.
It's a university project and with our professor we decided to try to use Thumb instructions.
by crumb_er
Fri Mar 30, 2018 12:53 pm
Forum: General programming discussion
Topic: ARM assembler Thumb instruction set
Replies: 19
Views: 4793

Re: ARM assembler Thumb instruction set

That's odd. I have been using gcc since forever and never heard of the -s option. Had to check. Took me a while to find it. Seems it's been obsolete for ages. The S is uppercase in -S option. From gcc documentation: -S Compile only; do not assemble or link. It generates a file .s with the assembler...
by crumb_er
Thu Mar 29, 2018 4:39 pm
Forum: General programming discussion
Topic: ARM assembler Thumb instruction set
Replies: 19
Views: 4793

ARM assembler Thumb instruction set

Hi, I need to use only Thumb instruction set for a project but when i try to compile a simple hello world c program with the command gcc hello.c -S -mthumb I have the error : hello.c: In function ‘main’: hello.c:6:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI { ^ Do you know what's the error o...

Go to advanced search