-
Notifications
You must be signed in to change notification settings - Fork 253
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (41 loc) · 1.54 KB
/
Makefile
File metadata and controls
62 lines (41 loc) · 1.54 KB
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
53
54
55
56
57
58
59
60
61
62
# Project Name
TARGET = byteshift
# Library Locations
LIBDAISY_DIR = ../../libDaisy
DAISYSP_DIR = ../../DaisySP
# Core location and generic Makefile.
SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
# Source files
CPP_SOURCES = main.cpp byteshift.cpp control_manager.cpp bytebeat_synth.cpp
# Include the Daisy system Makefile
include $(SYSTEM_FILES_DIR)/Makefile
# Define the compiled program binary
PROGRAM = byteshift.bin
FLASH_ADDR = 0x08000000
# Convert ELF to BIN
build/$(PROGRAM): build/$(TARGET).elf
arm-none-eabi-objcopy -O binary build/$(TARGET).elf build/$(PROGRAM)
# Flash to Daisy Patch using ST-LINK V3 Mini
program: build/$(PROGRAM)
st-flash --reset write build/$(PROGRAM) $(FLASH_ADDR)
# # Project Name
# TARGET = byteshift
# # Use LGPL version of DaisySP (optional, set to 1 if needed)
# USE_DAISYSP_LGPL=1
# # Library Locations
# LIBDAISY_DIR = ../../libDaisy
# DAISYSP_DIR = ../../DaisySP
# # Core location and generic Makefile.
# SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
# # Source files
# CPP_SOURCES = main.cpp byteshift.cpp bytebeat_synth.cpp
# # Include the Daisy system Makefile
# include $(SYSTEM_FILES_DIR)/Makefile
# # Ensure .bin file is created from .elf
# build/byteshift.bin: build/byteshift.elf
# arm-none-eabi-objcopy -O binary build/byteshift.elf build/byteshift.bin
# # Flashing using STLINK-V3MINI
# PROGRAM = byteshift.bin # Ensure we're flashing the .bin, not .elf
# FLASH_ADDR = 0x08000000
# program: build/byteshift.bin # Make sure .bin exists before flashing
# st-flash --reset write build/byteshift.bin $(FLASH_ADDR)