Skip to content

Commit 38f4100

Browse files
authored
Merge pull request #63 from fpistm/Nucleo_F207ZG
Add Nucleo F207ZG variant
2 parents 64e9770 + fcddbb8 commit 38f4100

File tree

10 files changed

+1749
-1
lines changed

10 files changed

+1749
-1
lines changed

Diff for: boards.txt

+14
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ Nucleo_144.build.core=arduino
2121
Nucleo_144.build.board=Nucleo_144
2222
Nucleo_144.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.enable_Serialx}
2323

24+
# NUCLEO_F207ZG board
25+
# Support: USB HID, Serial1 (USART1 on PG9, PG14) and Serial2 (USART2 on PD6, PD5)
26+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG=Nucleo F207ZG
27+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.node=NODE_F207ZG
28+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.upload.maximum_size=1048576
29+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.upload.maximum_data_size=131072
30+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.build.mcu=cortex-m3
31+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.build.f_cpu=120000000L
32+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.build.board=NUCLEO_F207ZG
33+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.build.series=STM32F2xx
34+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.build.product_line=STM32F207xx
35+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.build.variant=NUCLEO_F207ZG
36+
Nucleo_144.menu.board_part_num.NUCLEO_F207ZG.build.cmsis_lib_gcc=arm_cortexM3l_math
37+
2438
# NUCLEO_F429ZI board
2539
# Support: USB HID, Serial1 (USART1 on PG9, PG14) and Serial2 (USART2 on PD6, PD5)
2640
Nucleo_144.menu.board_part_num.NUCLEO_F429ZI=Nucleo F429ZI

Diff for: cores/arduino/stm32/stm32_def_build.h

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#define CMSIS_STARTUP_FILE "startup_stm32f091xc.s"
2727
#elif defined(STM32F030x8)
2828
#define CMSIS_STARTUP_FILE "startup_stm32f030x8.s"
29+
#elif defined(STM32F207xx)
30+
#define CMSIS_STARTUP_FILE "startup_stm32f207xx.s"
2931
#elif defined(STM32F303xE)
3032
#define CMSIS_STARTUP_FILE "startup_stm32f303xe.s"
3133
#elif defined(STM32F407xx)

Diff for: cores/arduino/stm32/stm32_eeprom.c

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
#elif defined (STM32F1xx)
7676
#define FLASH_BASE_ADDRESS ((uint32_t)((FLASH_BANK1_END + 1) - FLASH_PAGE_SIZE)) //0x0801FC00
7777
#define FLASH_PAGE_NUMBER 127
78+
#elif defined (STM32F2xx)
79+
/*start address:from sector2 : after 16KByte of used Flash memory */
80+
#define FLASH_BASE_ADDRESS ((uint32_t)(0x08008000))
81+
#define FLASH_DATA_SECTOR FLASH_SECTOR_2
7882
#elif defined (STM32F3xx)
7983
#define FLASH_BASE_ADDRESS ((uint32_t)((0x0807FFFF + 1) - FLASH_PAGE_SIZE)) //0x0807F800
8084
#elif defined (STM32F4xx)

Diff for: cores/arduino/stm32/uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) {
528528
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
529529
{
530530
volatile uint32_t tmpval;
531-
#if defined(STM32F1xx) || defined(STM32F4xx)
531+
#if defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx)
532532
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_PE) != RESET) {
533533
tmpval = huart->Instance->DR; // Clear PE flag
534534
} else if (__HAL_UART_GET_FLAG(huart, UART_FLAG_FE) != RESET) {

0 commit comments

Comments
 (0)