Skip to content

Commit

Permalink
Target: Updated makefile with usart targets
Browse files Browse the repository at this point in the history
Signed-off-by: CTXz <[email protected]>
  • Loading branch information
CTXz committed Jun 19, 2023
1 parent ae3857b commit 0081eba
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions target/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
all:
default: usart1

usart1:
arm-none-eabi-gcc -o test.o -c test.S -mthumb -mcpu=cortex-m3 -g3
arm-none-eabi-gcc -o main.o -c main.c -DUSE_USART1 -mthumb -mcpu=cortex-m3 -Os -g3
arm-none-eabi-gcc -o sram.elf ./test.o ./main.o -nostartfiles -Tram.ld -mcpu=cortex-m3 -mthumb -g3
arm-none-eabi-objcopy -O binary sram.elf target.bin

usart2:
arm-none-eabi-gcc -o test.o -c test.S -mthumb -mcpu=cortex-m3 -g3
arm-none-eabi-gcc -o main.o -c main.c -DUSE_USART2 -mthumb -mcpu=cortex-m3 -Os -g3
arm-none-eabi-gcc -o sram.elf ./test.o ./main.o -nostartfiles -Tram.ld -mcpu=cortex-m3 -mthumb -g3
arm-none-eabi-objcopy -O binary sram.elf target.bin

usart3:
arm-none-eabi-gcc -o test.o -c test.S -mthumb -mcpu=cortex-m3 -g3
arm-none-eabi-gcc -o main.o -c main.c -mthumb -mcpu=cortex-m3 -Os -g3
arm-none-eabi-gcc -o main.o -c main.c -DUSE_USART3 -mthumb -mcpu=cortex-m3 -Os -g3
arm-none-eabi-gcc -o sram.elf ./test.o ./main.o -nostartfiles -Tram.ld -mcpu=cortex-m3 -mthumb -g3
arm-none-eabi-objcopy -O binary sram.elf target.bin

Expand Down

0 comments on commit 0081eba

Please sign in to comment.