Skip to content

Adding Nucleo f411re #57

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

Open
wants to merge 6 commits into
base: community-2021
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ endif
ifeq ($(TARGET),$(filter $(TARGET),arm-eabi arm-elf arm))
TGT=arm-eabi
TARGETS=zynq7000 rpi2 rpi2mc sam4s samg55 smartfusion2 openmv2 stm32f4 \
stm32f429disco stm32f469disco stm32f746disco stm32756geval \
nucleo_f411re nucleo_f401re stm32f429disco stm32f469disco stm32f746disco stm32756geval \
stm32f769disco tms570 tms570_sci tms570lc lm3s cortex-m0 cortex-m0p \
cortex-m1 cortex-m3 cortex-m4 cortex-m4f cortex-m7f cortex-m7df
endif
Expand Down
32 changes: 24 additions & 8 deletions arm/cortexm.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,19 @@ def __init__(self):
'STM32_HSE_Clock_Frequency': '8_000_000',
'STM32_FLASH_Latency': '5'},

'nucleo_f401re': {'STM32_Main_Clock_Frequency': '168_000_000',
'nucleo_f401re': {'STM32_Main_Clock_Frequency': '84_000_000',
'STM32_HSE_Clock_Frequency': '8_000_000',
'STM32_FLASH_Latency': '5'},
'STM32_FLASH_Latency': '5',
'STM32_Linker_RAM_Size': '96K',
'STM32_Linker_Flash_Size': '512K',
'STM32_Linker_CCM_Size': '64K'},

'nucleo_f411re': {'STM32_Main_Clock_Frequency': '100_000_000',
'STM32_HSE_Clock_Frequency': '8_000_000',
'STM32_FLASH_Latency': '5',
'STM32_Linker_RAM_Size': '128K',
'STM32_Linker_Flash_Size': '512K',
'STM32_Linker_CCM_Size': '64K'},

'feather_stm32f405': {'STM32_Main_Clock_Frequency': '168_000_000',
'STM32_HSE_Clock_Frequency': '12_000_000',
Expand Down Expand Up @@ -921,8 +931,8 @@ def __init__(self, board):
self.board = board
if self.board in ['stm32f4', 'feather_stm32f405']:
self.mcu = 'stm32f40x'
elif self.board in ['nucleo_f401re']:
self.mcu = 'stm32f401'
elif self.board in ['nucleo_f401re', 'nucleo_f411re']:
self.mcu = 'stm32f4x1'
elif self.board in ['stm32f429disco', 'openmv2']:
self.mcu = 'stm32f429x'
elif self.board in ['stm32f469disco']:
Expand All @@ -943,8 +953,6 @@ def __init__(self, board):
self.add_template_config_value('Board_Name', self.board)
self.add_template_config_value('MCU_Name', self.mcu)

self.add_linker_script('arm/stm32/%s/memory-map.ld' % self.mcu)

# startup code
self.add_gnat_sources(
'arm/stm32/%s/s-bbmcpa.ads' % self.mcu,
Expand All @@ -961,17 +969,25 @@ def __init__(self, board):

if self.mcu in ['stm32f40x']:
self.add_gnat_source('arm/stm32/stm32f40x/s-stm32.adb')
self.add_linker_script('arm/stm32/%s/memory-map.ld' % self.mcu)

elif self.mcu in ['stm32f401']:
self.add_gnat_source('arm/stm32/stm32f401/s-stm32.adb')
elif self.mcu in ['stm32f4x1']:
self.add_gnat_source('arm/stm32/stm32f4x1/s-stm32.adb')
self.add_linker_script('arm/stm32/%s/memory-map.ld.tmpl'
% self.mcu)

elif self.mcu in ['stm32f429x',
'stm32f469x']:
self.add_gnat_source('arm/stm32/stm32f429x/s-stm32.adb')
self.add_linker_script('arm/stm32/%s/memory-map.ld' % self.mcu)

elif self.mcu in ['stm32f7x',
'stm32f7x9']:
self.add_gnat_source('arm/stm32/stm32f7x/s-stm32.adb')
self.add_linker_script('arm/stm32/%s/memory-map.ld' % self.mcu)

else:
self.add_linker_script('arm/stm32/%s/memory-map.ld' % self.mcu)

# ravenscar support
self.add_gnarl_sources(
Expand Down
2 changes: 1 addition & 1 deletion arm/stm32/s-stm32.ads
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ package System.STM32 is

subtype HSECLK_Range is Integer range 1_000_000 .. 26_000_000;
subtype PLLIN_Range is Integer range 950_000 .. 2_000_000;
subtype PLLVC0_Range is Integer range 192_000_000 .. 432_000_000;
subtype PLLVC0_Range is Integer range 168_000_000 .. 432_000_000;
subtype PLLOUT_Range is Integer range 24_000_000 .. 216_000_000;
subtype SYSCLK_Range is Integer range 1 .. 216_000_000;
subtype HCLK_Range is Integer range 1 .. 216_000_000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

MEMORY
{
flash (rx) : ORIGIN = 0x08000000, LENGTH = 512K
sram12 (rwx) : ORIGIN = 0x20000000, LENGTH = 96K
ccm (rw) : ORIGIN = 0x10000000, LENGTH = 64K
flash (rx) : ORIGIN = 0x08000000, LENGTH = "${STM32_Linker_Flash_Size}"
sram12 (rwx) : ORIGIN = 0x20000000, LENGTH = "${STM32_Linker_RAM_Size}"
ccm (rw) : ORIGIN = 0x10000000, LENGTH = "${STM32_Linker_CCM_Size}"
}

REGION_ALIAS("sram_tx", sram12)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ package Ada.Interrupts.Names is
-- SPI2 global interrupt
SPI2_Interrupt : constant Interrupt_ID := 36;

-- USART1 global interrupt
USART1_Interrupt : constant Interrupt_ID := 37;

-- USART2 global interrupt
USART2_Interrupt : constant Interrupt_ID := 38;

-- EXTI Line[15:10] interrupts
EXTI15_10_Interrupt : constant Interrupt_ID := 40;

Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions build_rts.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def build_configs(target):
t = Stm32(target)
elif target == 'nucleo_f401re':
t = Stm32(target)
elif target == 'nucleo_f411re':
t = Stm32(target)
elif target == 'openmv2':
t = Stm32(target)
elif target == 'tms570':
Expand Down
6 changes: 4 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (C) 2016-2020, AdaCore
#
Expand All @@ -22,7 +22,9 @@ def usage():
print(" available. The runtimes are installed in the toolchain itself.")


ALL_BSP = {'arm-eabi': ['stm32f4', 'nucleo_f401re', 'stm32f429disco',
ALL_BSP = {'arm-eabi': ['stm32f4',
'nucleo_f401re', 'nucleo_f411re',
'stm32f429disco',
'stm32f469disco',
'stm32f746disco', 'stm32756geval', 'stm32f769disco',
'samg55', 'sam4s', 'samv71', 'openmv2', 'rpi2',
Expand Down