-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.sh
53 lines (37 loc) · 1.48 KB
/
example.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
#
# Generated by: https://github.com/davepfeiffer/pyforeman
#
VAR0='-mthumb-interwork -g -mcpu=cortex-m7 -mthumb -c -gdwarf-2 -MD -Wall -O0 -mapcs-frame -fdata-sections -ffunction-sections -std=gnu99 '
VAR1='-mthumb-interwork -g -mcpu=cortex-m7 -mthumb -Wl,--gc-sections -T lib/linkBlinky-STM32F767ZI-Nucleo.ld -mcpu=cortex-m7 -mthumb -mthumb-interwork -nostartfiles -nodefaultlibs -nostdlib -lm '
wait
test -e ./source/mymain03.c || \
(echo './source/mymain03.c not found' && kill $$) &
test -e ./lib/mySystemInit.S || \
(echo './lib/mySystemInit.S not found' && kill $$) &
test -e ./lib/startup_stm32f767xx_gcc_git01.S || \
(echo './lib/startup_stm32f767xx_gcc_git01.S not found' && kill $$) &
wait
arm-none-eabi-gcc $VAR0 \
./source/mymain03.c \
-o ./bin/mymain03.o && \
echo "Built target: ./bin/mymain03.o" || kill $$ &
arm-none-eabi-gcc $VAR0 \
./lib/mySystemInit.S \
-o ./bin/mySystemInit.o && \
echo "Built target: ./bin/mySystemInit.o" || kill $$ &
arm-none-eabi-gcc $VAR0 \
./lib/startup_stm32f767xx_gcc_git01.S \
-o ./bin/startup_stm32f767xx_gcc_git01.o && \
echo "Built target: ./bin/startup_stm32f767xx_gcc_git01.o" || kill $$ &
wait
arm-none-eabi-gcc $VAR1 \
./bin/startup_stm32f767xx_gcc_git01.o ./bin/mySystemInit.o ./bin/mymain03.o \
-o ./bin/blinky.elf && \
echo "Built target: ./bin/blinky.elf" || kill $$ &
wait
arm-none-eabi-objcopy -O ihex \
./bin/blinky.elf \
./bin/blinky.hex && \
echo "Built Intel hex file: ./bin/blinky.hex" || kill $$ &
wait