Skip to content

Commit

Permalink
refactored build objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mars committed Feb 16, 2018
1 parent 74c5e66 commit 1136faa
Show file tree
Hide file tree
Showing 13 changed files with 110 additions and 76 deletions.
6 changes: 6 additions & 0 deletions EffectsBox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ OBJS = $(C_SRC:%.c=Build/%.o)
OBJS += $(CPP_SRC:%.cpp=Build/%.o)
OBJS += $(S_SRC:%.s=Build/%.o)

OBJS += $(OBJS_SAI)
OBJS += $(OBJS_SDRAM)
OBJS += $(OBJS_USBD)
OBJS += $(OBJS_DSP)
OBJS += $(OBJS_OS)

include $(OPENWARE)/mcu/f4.mk
12 changes: 8 additions & 4 deletions Magus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ OBJS = $(C_SRC:%.c=Build/%.o)
OBJS += $(CPP_SRC:%.cpp=Build/%.o)
OBJS += $(S_SRC:%.s=Build/%.o)

OBJS += $(USB_HOST_FILE)/Core/Src/usbh_core.o
OBJS += $(USB_HOST_FILE)/Core/Src/usbh_pipes.o
OBJS += $(USB_HOST_FILE)/Core/Src/usbh_ioreq.o
OBJS += $(USB_HOST_FILE)/Core/Src/usbh_ctlreq.o
OBJS += $(OBJS_SAI)
OBJS += $(OBJS_DAC)
OBJS += $(OBJS_SDRAM)
OBJS += $(OBJS_USBD)
OBJS += $(OBJS_USBH)
OBJS += $(OBJS_DSP)
OBJS += $(OBJS_OS)
OBJS += $(OBJS_UART)

include $(OPENWARE)/mcu/f4.mk
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ prism:
magus:
@$(MAKE) -C Magus all

effectsbox:
@$(MAKE) -C EffectsBox all

clean: ## remove generated files
@$(MAKE) -C Tesseract clean
@$(MAKE) -C MicroLab clean
Expand Down
6 changes: 6 additions & 0 deletions MicroLab/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ OBJS = $(C_SRC:%.c=Build/%.o)
OBJS += $(CPP_SRC:%.cpp=Build/%.o)
OBJS += $(S_SRC:%.s=Build/%.o)

OBJS += $(OBJS_SAI)
OBJS += $(OBJS_SDRAM)
OBJS += $(OBJS_USBD)
OBJS += $(OBJS_DSP)
OBJS += $(OBJS_OS)

include $(OPENWARE)/mcu/f4.mk
12 changes: 7 additions & 5 deletions MiniLab/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ OBJS = $(C_SRC:%.c=Build/%.o)
OBJS += $(CPP_SRC:%.cpp=Build/%.o)
OBJS += $(S_SRC:%.s=Build/%.o)

OBJS += $(USB_HOST_FILE)/Core/Src/usbh_core.o
OBJS += $(USB_HOST_FILE)/Core/Src/usbh_pipes.o
OBJS += $(USB_HOST_FILE)/Core/Src/usbh_ioreq.o
OBJS += $(USB_HOST_FILE)/Core/Src/usbh_ctlreq.o
# OBJS += $(USB_HOST_FILE)/Class/AUDIO/Src/usbh_audio.o
OBJS += $(OBJS_SAI)
OBJS += $(OBJS_DAC)
OBJS += $(OBJS_SDRAM)
OBJS += $(OBJS_USBD)
OBJS += $(OBJS_USBH)
OBJS += $(OBJS_DSP)
OBJS += $(OBJS_OS)

include $(OPENWARE)/mcu/f4.mk
13 changes: 7 additions & 6 deletions OwlPedal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ include $(OPENWARE)/mcu/sources.mk
OBJS = $(C_SRC:%.c=Build/%.o)
OBJS += $(CPP_SRC:%.cpp=Build/%.o)
OBJS += $(S_SRC:%.s=Build/%.o)
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2s.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2s_ex.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2c.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2c_ex.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_sram.o
OBJS += $(DRIVERS)/Src/stm32f4xx_ll_fsmc.o

OBJS += $(OBJS_I2S)
OBJS += $(OBJS_SRAM)
OBJS += $(OBJS_USBD)
OBJS += $(OBJS_DSP)
OBJS += $(OBJS_OS)
OBJS += $(OBJS_UART)

include $(OPENWARE)/mcu/f4.mk
6 changes: 6 additions & 0 deletions Prism/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ OBJS = $(C_SRC:%.c=Build/%.o)
OBJS += $(CPP_SRC:%.cpp=Build/%.o)
OBJS += $(S_SRC:%.s=Build/%.o)

OBJS += $(OBJS_SAI)
OBJS += $(OBJS_USBD)
OBJS += $(OBJS_DSP)
OBJS += $(OBJS_OS)
OBJS += $(OBJS_UART)

include $(OPENWARE)/mcu/f4.mk
7 changes: 4 additions & 3 deletions Source/MagusParameterController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@ class ParameterController {
screen.print(0, 16, title);
}

void drawMessage(ScreenBuffer& screen){
void drawMessage(int16_t y, ScreenBuffer& screen){
ProgramVector* pv = getProgramVector();
if(pv->message != NULL){
screen.setTextSize(1);
screen.setTextWrap(true);
screen.print(0, 26, pv->message);
screen.print(0, y, pv->message);
screen.setTextWrap(false);
}
}

Expand All @@ -246,8 +247,8 @@ class ParameterController {
break;
case SELECTPROGRAM:
drawTitle("Magus", screen);
drawMessage(screen);
drawStats(screen);
drawMessage(46, screen);
// todo!
// select: Scope, VU Meter, Patch Stats, Set Volume, Show MIDI, Reset Patch, Select Patch...
break;
Expand Down
14 changes: 8 additions & 6 deletions Source/ParameterController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,25 @@ class ParameterController {
void setValue(uint8_t ch, int16_t value){
parameters[ch] = value;
}
void drawTitle(ScreenBuffer& screen){
drawTitle(title, screen);
}

void drawMessage(ScreenBuffer& screen){
void drawMessage(int16_t y, ScreenBuffer& screen){
ProgramVector* pv = getProgramVector();
if(pv->message != NULL){
screen.setTextSize(1);
screen.setTextWrap(true);
screen.print(0, 26, pv->message);
screen.print(0, y, pv->message);
screen.setTextWrap(false);
}
}

void drawTitle(ScreenBuffer& screen){
drawTitle(title, screen);
}

void drawTitle(const char* title, ScreenBuffer& screen){
// draw title
screen.setTextSize(2);
screen.print(0, 16, title);
screen.print(1, 17, title);
}

void setCallback(void *callback){
Expand Down
8 changes: 4 additions & 4 deletions Source/PrismParameterController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ class ParameterController {
setEncoderValue(i, value);
}

void drawTitle(ScreenBuffer& screen){
drawTitle(title, screen);
}

void drawMessage(int16_t y, ScreenBuffer& screen){
ProgramVector* pv = getProgramVector();
if(pv->message != NULL){
Expand All @@ -192,6 +188,10 @@ class ParameterController {
}
}

void drawTitle(ScreenBuffer& screen){
drawTitle(title, screen);
}

void drawTitle(const char* title, ScreenBuffer& screen){
// draw title
screen.setTextSize(2);
Expand Down
2 changes: 1 addition & 1 deletion Source/sdram.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void SDRAM_Initialization_Sequence(SDRAM_HandleTypeDef *hsdram){
hsdram->Instance->SDRTR |= ((uint32_t)((1292)<< 1));
}

#if !defined OWL_PLAYERF7 // && !defined OWL_MICROLAB && !defined OWL_MINILAB && !defined OWL_MAGUS
#if !defined OWL_PLAYERF7 && !defined OWL_MINILAB // && !defined OWL_MICROLAB && !defined OWL_MAGUS
static uint32_t FMC_Initialized = 0;
static void HAL_FMC_MspInit(void){
/* USER CODE BEGIN FMC_MspInit 0 */
Expand Down
6 changes: 6 additions & 0 deletions Tesseract/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ OBJS = $(C_SRC:%.c=Build/%.o)
OBJS += $(CPP_SRC:%.cpp=Build/%.o)
OBJS += $(S_SRC:%.s=Build/%.o)

OBJS += $(OBJS_SAI)
OBJS += $(OBJS_SDRAM)
OBJS += $(OBJS_USBD)
OBJS += $(OBJS_DSP)
OBJS += $(OBJS_OS)

include $(OPENWARE)/mcu/f4.mk
91 changes: 44 additions & 47 deletions mcu/f4-libs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,59 @@ OBJS += $(DRIVERS)/Src/stm32f4xx_hal_flash_ex.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_tim_ex.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_tim.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_cortex.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_spi.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_rng.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_qspi.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_spi.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_dma2d.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_pcd.o # USB Device
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_pcd_ex.o
OBJS += $(DRIVERS)/Src/stm32f4xx_ll_usb.o

# optionals
OBJS_UART = $(DRIVERS)/Src/stm32f4xx_hal_uart.o
OBJS_DAC = $(DRIVERS)/Src/stm32f4xx_hal_dac.o

# required by OWL 2
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_sai.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_sai_ex.o
OBJS += $(DRIVERS)/Src/stm32f4xx_hal_uart.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_dac.o
OBJS_SAI = $(DRIVERS)/Src/stm32f4xx_hal_sai.o
OBJS_SAI += $(DRIVERS)/Src/stm32f4xx_hal_sai_ex.o

# external SDRAM
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_sdram.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_ll_fmc.o

# USB Host
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_hcd.o

OBJS_SDRAM = $(DRIVERS)/Src/stm32f4xx_hal_sdram.o
OBJS_SDRAM += $(DRIVERS)/Src/stm32f4xx_ll_fmc.o

# required by OWL 1
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_sram.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_ll_fsmc.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2s.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2s_ex.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2c.o
# OBJS += $(DRIVERS)/Src/stm32f4xx_hal_i2c_ex.o
OBJS_SRAM = $(DRIVERS)/Src/stm32f4xx_hal_sram.o
OBJS_SRAM += $(DRIVERS)/Src/stm32f4xx_ll_fsmc.o
OBJS_I2S = $(DRIVERS)/Src/stm32f4xx_hal_i2s.o
OBJS_I2S += $(DRIVERS)/Src/stm32f4xx_hal_i2s_ex.o
OBJS_I2S += $(DRIVERS)/Src/stm32f4xx_hal_i2c.o
OBJS_I2S += $(DRIVERS)/Src/stm32f4xx_hal_i2c_ex.o

### USB Device Library ###
OBJS += $(USB_DEVICE_FILE)/Core/Src/usbd_core.o
OBJS += $(USB_DEVICE_FILE)/Core/Src/usbd_ioreq.o
OBJS += $(USB_DEVICE_FILE)/Core/Src/usbd_ctlreq.o
# OBJS += $(USB_DEVICE_FILE)/Class/AUDIO/Src/usbd_audio.o
OBJS_USBD = $(DRIVERS)/Src/stm32f4xx_hal_pcd.o
OBJS_USBD += $(DRIVERS)/Src/stm32f4xx_hal_pcd_ex.o
OBJS_USBD += $(DRIVERS)/Src/stm32f4xx_ll_usb.o
OBJS_USBD += $(USB_DEVICE_FILE)/Core/Src/usbd_core.o
OBJS_USBD += $(USB_DEVICE_FILE)/Core/Src/usbd_ioreq.o
OBJS_USBD += $(USB_DEVICE_FILE)/Core/Src/usbd_ctlreq.o

### USB Host Library ###
# OBJS += $(USB_HOST_FILE)/Core/Src/usbh_core.o
# OBJS += $(USB_HOST_FILE)/Core/Src/usbh_pipes.o
# OBJS += $(USB_HOST_FILE)/Core/Src/usbh_ioreq.o
# OBJS += $(USB_HOST_FILE)/Core/Src/usbh_ctlreq.o
# OBJS += $(USB_HOST_FILE)/Class/AUDIO/Src/usbh_audio.o
OBJS_USBH = $(DRIVERS)/Src/stm32f4xx_hal_hcd.o
OBJS_USBH += $(USB_HOST_FILE)/Core/Src/usbh_core.o
OBJS_USBH += $(USB_HOST_FILE)/Core/Src/usbh_pipes.o
OBJS_USBH += $(USB_HOST_FILE)/Core/Src/usbh_ioreq.o
OBJS_USBH += $(USB_HOST_FILE)/Core/Src/usbh_ctlreq.o

### CMSIS DSP Library ####

# OBJS += $(USB_DEVICE) $(USB_OTG)
OBJS += $(DSPLIB)/FastMathFunctions/arm_sin_f32.o
OBJS += $(DSPLIB)/FastMathFunctions/arm_cos_f32.o
OBJS += $(DSPLIB)/CommonTables/arm_common_tables.o
OBJS_DSP = $(DSPLIB)/FastMathFunctions/arm_sin_f32.o
OBJS_DSP += $(DSPLIB)/FastMathFunctions/arm_cos_f32.o
OBJS_DSP += $(DSPLIB)/CommonTables/arm_common_tables.o

OBJS += $(DSPLIB)/TransformFunctions/arm_cfft_f32.o
OBJS += $(DSPLIB)/TransformFunctions/arm_cfft_radix8_f32.o
OBJS += $(DSPLIB)/TransformFunctions/arm_bitreversal.o
OBJS += $(DSPLIB)/TransformFunctions/arm_rfft_fast_f32.o
OBJS += $(DSPLIB)/TransformFunctions/arm_rfft_fast_init_f32.o
OBJS += $(DSPLIB)/CommonTables/arm_const_structs.o
OBJS_DSP += $(DSPLIB)/TransformFunctions/arm_cfft_f32.o
OBJS_DSP += $(DSPLIB)/TransformFunctions/arm_cfft_radix8_f32.o
OBJS_DSP += $(DSPLIB)/TransformFunctions/arm_bitreversal.o
OBJS_DSP += $(DSPLIB)/TransformFunctions/arm_rfft_fast_f32.o
OBJS_DSP += $(DSPLIB)/TransformFunctions/arm_rfft_fast_init_f32.o
OBJS_DSP += $(DSPLIB)/CommonTables/arm_const_structs.o

# OBJS += $(DSPLIB)/FilteringFunctions/arm_biquad_cascade_df1_init_f32.o
# OBJS += $(DSPLIB)/FilteringFunctions/arm_biquad_cascade_df1_f32.o
Expand All @@ -90,12 +87,12 @@ OBJS += $(DSPLIB)/CommonTables/arm_const_structs.o
# OBJS += $(DSPLIB)/SupportFunctions/arm_q15_to_float.o

### FreeRTOS ###
OBJS += $(FREERTOS_DIR)/CMSIS_RTOS/cmsis_os.o
# OBJS += $(FREERTOS_DIR)/portable/GCC/ARM_CM7/r0p1/port.o
OBJS += $(FREERTOS_DIR)/portable/GCC/ARM_CM4F/port.o
OBJS += $(FREERTOS_DIR)/tasks.o
OBJS += $(FREERTOS_DIR)/timers.o
OBJS += $(FREERTOS_DIR)/queue.o
OBJS += $(FREERTOS_DIR)/list.o
OBJS += $(FREERTOS_DIR)/croutine.o
OBJS += $(FREERTOS_DIR)/portable/MemMang/heap_4.o
OBJS_OS = $(FREERTOS_DIR)/CMSIS_RTOS/cmsis_os.o
# OBJS_OS += $(FREERTOS_DIR)/portable/GCC/ARM_CM7/r0p1/port.o
OBJS_OS += $(FREERTOS_DIR)/portable/GCC/ARM_CM4F/port.o
OBJS_OS += $(FREERTOS_DIR)/tasks.o
OBJS_OS += $(FREERTOS_DIR)/timers.o
OBJS_OS += $(FREERTOS_DIR)/queue.o
OBJS_OS += $(FREERTOS_DIR)/list.o
OBJS_OS += $(FREERTOS_DIR)/croutine.o
OBJS_OS += $(FREERTOS_DIR)/portable/MemMang/heap_4.o

0 comments on commit 1136faa

Please sign in to comment.