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

Add support for NUCLEO-H755ZI-Q board #34

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

Igor-Misic
Copy link
Member

@Igor-Misic Igor-Misic commented Dec 18, 2024

This pull request for board NUCLEO-H755ZI-Q servers as tutorial on how to add new board to IMBootloader.
image

How to add new board?

Add the new board to the Makefile (RAM support is optional, depending on whether you want it to be able to run from RAM):

nucleo_h755zi:
	${MAKE} stm32h7xx BOARD=NUCLEO_H755ZI BOARD_FILE_NAME=$@

nucleo_h755zi_ram:
	${MAKE} stm32h7xx_ram BOARD=NUCLEO_H755ZI BOARD_FILE_NAME=$@

In this case, we had an STM32H755ZI MCU, which is slightly different from previously supported H7 MCUs. This one has two cores, so we needed to enable the STM32 HAL for it. This change can be seen in the Makefile.stm32h7xx file.

ifeq ($(BOARD), NUCLEO_H755ZI)
  C_DEFS += \
  -DCORE_CM7 \
  -DSTM32H755xx

The NUCLEO-H755ZI-Q board uses an integrated SMPS (Switched-Mode Power Supply) as its power source. To provide flexibility, we added an option to the board_config.h file to choose between LDO and SMPS power modes.

The standard board configuration defines two LEDs and a button, if present. In this case, we added a blue button to trigger bootloader entry on boot.

#ifdef NUCLEO_H755ZI
#define LED1_Pin                GPIO_PIN_0
#define LED1_Port               GPIOB
#define LED2_Pin                GPIO_PIN_1
#define LED2_Port               GPIOE
#define LED_ON                  GPIO_PIN_SET
#define LED_OFF                 GPIO_PIN_RESET
#define BL_BUTTON_Pin           GPIO_PIN_13              //!< Button for entering in BL if pressed at boot time
#define BL_BUTTON_Port          GPIOC
#define BL_BUTTON_ON            GPIO_PIN_SET
#define BL_BUTTON_OFF           GPIO_PIN_RESET
#define BL_BUTTON_PRESS_TIME    500u                    //!< Time in [ms] needed for button to be pressed to enter in BL
#define PWR_SUPPLY              PWR_DIRECT_SMPS_SUPPLY

And don't forget to add board information to board_info.h

#ifdef NUCLEO_H755ZI
#define PRODUCT_TYPE    (const char*)("IMProject_demo-nucleo_h755zi")   // Maximum allowed size is 100 characters (101 bytes)

Finally, add the board to the README.md file and update the compile.yml file to include it in the compilation process with each pull request.

How to test it?

Example of writing an IMLedBlink application for NUCLEO-H755ZI-Q
IMProject/IMLedBlink#5

@Igor-Misic Igor-Misic added the documentation Improvements or additions to documentation label Dec 18, 2024
@Igor-Misic Igor-Misic merged commit 6b06bf6 into master Dec 18, 2024
16 checks passed
@Igor-Misic Igor-Misic deleted the pr-nucleo_h755zi branch December 18, 2024 18:46
@Igor-Misic Igor-Misic removed the documentation Improvements or additions to documentation label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant