Merge branch 'master' of git.shimatta.de:mhu/stm32f746zg-template
This commit is contained in:
commit
6b557384f3
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ project.elf
|
||||
*.map
|
||||
*.bin
|
||||
*.hex
|
||||
*.lss
|
||||
*.user
|
||||
*.user*
|
||||
*.user.*
|
||||
|
13
Makefile
13
Makefile
@ -11,7 +11,7 @@ OBJDIR := obj
|
||||
|
||||
TARGET = project
|
||||
LIBRARYPATH = -Lstartup -Ldsp
|
||||
LIBRARIES = -larm_cortexM7lfsp_math
|
||||
LIBRARIES = -larm_cortexM7lfsp_math -lm
|
||||
|
||||
DEFINES = -DSTM32F746xx -DSTM32F7XX -DARM_MATH_CM7
|
||||
mapfile = memmap
|
||||
@ -45,10 +45,11 @@ DEPENDENCY_FILES = $(CFILES:%.c=$(OBJDIR)/%.c.d) $(ASFILES:%.S=$(OBJDIR)/%.S.d)
|
||||
default: $(TARGET).elf
|
||||
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) -O binary $^ $@
|
||||
@echo [BIN] $@
|
||||
@$(OBJCOPY) -O binary $^ $@
|
||||
%.hex: %.elf
|
||||
$(OBJCOPY) -O ihex $^ $@
|
||||
|
||||
@echo [HEX] $@
|
||||
@$(OBJCOPY) -O ihex $^ $@
|
||||
|
||||
#Linking
|
||||
$(TARGET).elf: $(OBJ) $(ASOBJ)
|
||||
@ -66,7 +67,9 @@ $(ASOBJ):
|
||||
@mkdir -p $(@D)
|
||||
@$(CC) $(CFLAGS) -MMD -MT $@ $(INCLUDEPATH) $(DEFINES) -o $@ -c $(@:$(OBJDIR)/%.S.o=%.S)
|
||||
|
||||
.PHONY: clean mrproper objcopy disassemble
|
||||
.PHONY: clean mrproper objcopy disassemble binary
|
||||
|
||||
binary: $(TARGET).bin $(TARGET).hex
|
||||
|
||||
disassemble: $(TARGET).elf
|
||||
$(OBJDUMP) -D -s $< > $(TARGET).lss
|
||||
|
@ -299,7 +299,7 @@
|
||||
#define __CMSIS_GENERIC /* disable NVIC and Systick functions */
|
||||
|
||||
#if defined(ARM_MATH_CM7)
|
||||
#include "core_cm7.h"
|
||||
#include <cmsis/core_cm7.h>
|
||||
#elif defined (ARM_MATH_CM4)
|
||||
#include "core_cm4.h"
|
||||
#elif defined (ARM_MATH_CM3)
|
||||
|
1
main.c
1
main.c
@ -1,5 +1,6 @@
|
||||
#include <stm32f7xx.h>
|
||||
|
||||
|
||||
unsigned int i = 0x12345678;
|
||||
unsigned char c = 2;
|
||||
|
||||
|
@ -4,6 +4,7 @@ const signed char __pll_main_div_q_val[] = {-1, -1, 2, 3, 4, 5, 6, 7, 8 ,9, 10,
|
||||
const signed char __pll_main_div_p_val[] = {-1, -1, 0, -1, 1, -1, 2, -1, 3};
|
||||
const signed char __mco_div_val[] = {-1, 0, 4, 5, 6, 7};
|
||||
const signed char __apb_presc_val[] = {-1, 0, 4, -1, 5, -1, -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, 7};
|
||||
const signed char *__pll_i2s_div_p_val = __pll_main_div_p_val;
|
||||
#define SYSINIT_MAIN_I2S_PLL_DIV_M_MIN (2)
|
||||
#define SYSINIT_MAIN_I2S_PLL_DIV_M_MAX (63)
|
||||
#define SYSINIT_MAIN_I2S_PLL_MULT_N_MIN (2)
|
||||
@ -40,13 +41,14 @@ struct clock_config {
|
||||
uint32_t pll_main_on : 1;
|
||||
uint32_t css_on : 1;
|
||||
uint32_t hse_bypass : 1;
|
||||
uint32_t lse_bypass : 1;
|
||||
uint32_t hsi_trim : 5;
|
||||
/* Main PLL Conf */
|
||||
uint32_t pll_main_i2s_src : 1;
|
||||
uint32_t pll_main_div_q : 4; /* true value */
|
||||
uint32_t pll_main_div_p : 3; /* true value */
|
||||
uint32_t pll_main_mult_n : 9;
|
||||
uint32_t pll_main_div_m : 6;
|
||||
uint32_t pll_div_m : 6;
|
||||
/* MCO Outputs */
|
||||
uint32_t mco2_sel : 2;
|
||||
uint32_t mco2_presc : 3;
|
||||
@ -55,13 +57,19 @@ struct clock_config {
|
||||
uint32_t i2s_src : 1;
|
||||
/* RTC */
|
||||
uint32_t rtc_hse_div_1_meg : 5;
|
||||
uint32_t rtc_clock_en : 1;
|
||||
/* APB */
|
||||
uint32_t apb1_presc : 5;
|
||||
uint32_t apb2_presc : 5;
|
||||
/* Systemclock */
|
||||
uint32_t sysclk_src : 2;
|
||||
|
||||
|
||||
/* PLLI2S */
|
||||
uint32_t pll_i2s_r : 3;
|
||||
uint32_t pll_i2s_q : 4;
|
||||
uint32_t pll_i2s_p : 4; /* true value */
|
||||
uint32_t pll_i2s_mult : 9;
|
||||
/* PLLSAI */
|
||||
|
||||
/* AHB */
|
||||
enum sysinit_ahb_presc ahb_presc;
|
||||
};
|
||||
|
8
stm32f7-template.config
Normal file
8
stm32f7-template.config
Normal file
@ -0,0 +1,8 @@
|
||||
// Add predefined macros for your project here. For example:
|
||||
// #define THE_ANSWER 42
|
||||
#define STM32F746xx
|
||||
#define STM32F7XX
|
||||
#define ARM_MATH_CM7
|
||||
|
||||
/* This is set by the compiler */
|
||||
#define __VFP_FP__ 1
|
1
stm32f7-template.creator
Normal file
1
stm32f7-template.creator
Normal file
@ -0,0 +1 @@
|
||||
[General]
|
12
stm32f7-template.files
Normal file
12
stm32f7-template.files
Normal file
@ -0,0 +1,12 @@
|
||||
include/arm_math.h
|
||||
include/cmsis/cmsis_gcc.h
|
||||
include/cmsis/core_cm7.h
|
||||
include/cmsis/core_cmFunc.h
|
||||
include/cmsis/core_cmInstr.h
|
||||
include/cmsis/core_cmSimd.h
|
||||
include/stm32f746xx.h
|
||||
include/stm32f7xx.h
|
||||
main.c
|
||||
setup/system_init.c
|
||||
startup/startup_stm32f746.c
|
||||
syscalls/syscalls.c
|
1
stm32f7-template.includes
Normal file
1
stm32f7-template.includes
Normal file
@ -0,0 +1 @@
|
||||
include
|
Loading…
Reference in New Issue
Block a user