Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32: Add F7 and H7 Support #2735

Merged
merged 23 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bb167f0
WIP
hierophect Mar 12, 2020
bb3ed3a
Merge branch 'master' into stm32x7-setup
hierophect Mar 16, 2020
c4db8b8
Add F7 and H7 Support to the STM32 port
hierophect Mar 17, 2020
348df4b
Merge remote-tracking branch 'upstream/master' into stm32x7-setup
hierophect Mar 26, 2020
7995bca
Flash additions
hierophect Mar 27, 2020
e2be069
Support cached internal flash on the H743
hierophect Mar 28, 2020
a89928c
Implement requested changes
hierophect Apr 1, 2020
5703d1d
Merge branch 'master' into stm32x7-setup
hierophect Apr 1, 2020
2f764de
merge and docs
hierophect Apr 1, 2020
80b08bf
Merge branch 'stm32x7-setup' of https://github.com/hierophect/circuit…
hierophect Apr 1, 2020
47a5d83
Implement F7 Nucleo
hierophect Apr 2, 2020
9761672
Linker file restructure, TCM and MPU additions
hierophect Apr 2, 2020
92a0621
Add busio support, cleanup
hierophect Apr 6, 2020
5ac38c9
Various requested fixes
hierophect Apr 13, 2020
6227e63
Merge remote-tracking branch 'upstream/master' into stm32x7-setup
hierophect Apr 13, 2020
426d2af
Fix pin mapping for the H7 Nucleo
hierophect Apr 13, 2020
83a55f6
Implement cache-based reads
hierophect Apr 13, 2020
6427994
Implement requested changes
hierophect Apr 15, 2020
0f87a75
translations
hierophect Apr 15, 2020
54abfc2
translations-merge
hierophect Apr 15, 2020
a1451aa
Correct submodule desync
hierophect Apr 15, 2020
00b2e6a
Fix korea translation error, minor submodule change
hierophect Apr 15, 2020
9e49fc1
startup file crash fix, H7 bin fix
hierophect Apr 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
startup file crash fix, H7 bin fix
  • Loading branch information
hierophect committed Apr 16, 2020
commit 9e49fc13f4f894855c464427f8725e58fb2d8557
15 changes: 9 additions & 6 deletions ports/stm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ endif
# MCU Series is defined by the HAL package and doesn't need to be specified here
C_DEFS = -D$(MCU_PACKAGE) -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -D$(MCU_VARIANT)

CFLAGS += $(INC) -Werror -Wall -std=gnu11 $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT)
# Removed -nostdlib since it conflicts with stm32 startup files
CFLAGS += $(INC) -Werror -Wall -std=gnu11 $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -nostdlib -nostartfiles

# Undo some warnings.
# STM32 HAL uses undefined preprocessor variables, shadowed variables, casts that change alignment reqs
Expand Down Expand Up @@ -264,6 +263,12 @@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_MOD) $(SRC_COMMON_HAL_EXPANDED) $(S
# Sources that only hold QSTRs after pre-processing.
SRC_QSTR_PREPROCESSOR +=

# Bin section settings specific to the STM32H7
ifeq ($(MCU_VARIANT),$(filter $(MCU_VARIANT),STM32H743xx))
hierophect marked this conversation as resolved.
Show resolved Hide resolved
MCU_SECTIONS = -j .isr_vector -j .text -j .data -j .itcm -j .dtcm_data $^ $@
else
MCU_SECTIONS = $^ $@
endif

all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2

Expand All @@ -274,13 +279,11 @@ $(BUILD)/firmware.elf: $(OBJ)

$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
$(STEPECHO) "Create $@"
$(Q)$(OBJCOPY) -O binary $^ $@
# $(Q)$(OBJCOPY) -O binary -j .vectors -j .text -j .data $^ $@
$(Q)$(OBJCOPY) -O binary $(MCU_SECTIONS)

$(BUILD)/firmware.hex: $(BUILD)/firmware.elf
$(STEPECHO) "Create $@"
$(Q)$(OBJCOPY) -O ihex $^ $@
# $(Q)$(OBJCOPY) -O ihex -j .vectors -j .text -j .data $^ $@
$(Q)$(OBJCOPY) -O ihex $(MCU_SECTIONS)

$(BUILD)/firmware.uf2: $(BUILD)/firmware.hex
$(ECHO) "Create $@"
Expand Down
8 changes: 8 additions & 0 deletions ports/stm/supervisor/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,11 @@ __attribute__((used)) void HardFault_Handler(void)
asm("nop;");
}
}

// Required by __libc_init_array in startup code if we are compiling using
// -nostdlib/-nostartfiles.
void _init(void)
{

}