Etape 3 #1

Merged
yoboujon merged 29 commits from etape_3 into main 2023-05-29 22:57:47 +02:00
Showing only changes of commit 2f06d2ab01 - Show all commits

View file

@ -19,7 +19,7 @@ void * gpioA = (void *)0x40010800;
int main(void) int main(void)
{ {
add(5); set(5);
invert(0x20); invert(0x20);
return 0; return 0;
} }
@ -29,7 +29,7 @@ int invert(int x){ return ~x }
``` ```
Ensuite je lance la commande suivante pour compiler le tout dans un niveau d'optimisation choisi : Ensuite je lance la commande suivante pour compiler le tout dans un niveau d'optimisation choisi :
```bash ```shell
arm-bibe-eabi-gcc -OX -c test.c -o test.o arm-bibe-eabi-gcc -OX -c test.c -o test.o
``` ```
@ -40,7 +40,7 @@ arm-bibe-eabi-gcc -OX -c test.c -o test.o
|-O2|Maximale| |-O2|Maximale|
Et enfin pour voir le résultat en assembler dans la le terminal : Et enfin pour voir le résultat en assembler dans la le terminal :
```bash ```shell
arm-none-eabi-objdump -D test.o arm-none-eabi-objdump -D test.o
``` ```