-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial STM32H723ZG MCU support with external repos downloading
This adds initial Nucleo-H723ZG BSP and STM32H723ZG MCU support, but it uses new feature implemented to Newt, which is ability to download external repositories that do not contain project.yml file. This way we do not have to add hundreds of files from ST's repository to the core. In order for this to work you have to build newt from this commit: <m-gorecki/mynewt-newt@4a9b494> and later add this to your project.yml file: repository.cmsis_device_h7: type: github vers: 6dac8c24d7b38ab20806d27dd7d8285a6433b8f7-commit user: STMicroelectronics repo: cmsis_device_h7 repository.stm32h7xx_hal_driver: type: github vers: b716379524ba3549e4db11804889776ffeb239d1-commit user: STMicroelectronics repo: stm32h7xx_hal_driver After doing so you can run "newt upgrade" and try it out.
- Loading branch information
Showing
40 changed files
with
3,945 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* Linker script to configure memory regions. */ | ||
MEMORY | ||
{ | ||
ITCM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K | ||
DTCM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K | ||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128K /* Bootloader area */ | ||
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 320K /* AXI (128) + AXI/ITCM (192) */ | ||
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 32K /* SRAM1 + SRMA2 */ | ||
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 16K /* SRAM4 */ | ||
} | ||
|
||
/* The bootloader does not contain an image header */ | ||
_imghdr_size = 0x0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
bsp.name: "NUCLEO-H723ZG" | ||
bsp.url: https://www.st.com/en/evaluation-tools/nucleo-h723zg.html | ||
bsp.maker: "STMicroelectronics" | ||
bsp.arch: cortex_m7 | ||
bsp.compiler: compiler/arm-none-eabi-m7 | ||
bsp.linkerscript: | ||
- "hw/bsp/nucleo-h723zg/nucleo-h723zg.ld" | ||
- "@apache-mynewt-core/hw/mcu/stm/stm32h7xx/stm32h723.ld" | ||
bsp.linkerscript.BOOT_LOADER.OVERWRITE: | ||
- "hw/bsp/nucleo-h723zg/boot-nucleo-h723zg.ld" | ||
- "@apache-mynewt-core/hw/mcu/stm/stm32h7xx/stm32h723.ld" | ||
bsp.downloadscript: "hw/bsp/nucleo-h723zg/nucleo-h723zg_download.sh" | ||
bsp.debugscript: "hw/bsp/nucleo-h723zg/nucleo-h723zg_debug.sh" | ||
|
||
bsp.flash_map: | ||
areas: | ||
# System areas. | ||
FLASH_AREA_BOOTLOADER: | ||
device: 0 | ||
offset: 0x08000000 | ||
size: 128kB | ||
FLASH_AREA_IMAGE_0: | ||
device: 0 | ||
offset: 0x08020000 | ||
size: 256kB | ||
FLASH_AREA_IMAGE_1: | ||
device: 0 | ||
offset: 0x08060000 | ||
size: 256kB | ||
FLASH_AREA_IMAGE_SCRATCH: | ||
device: 0 | ||
offset: 0x080A0000 | ||
size: 128kB | ||
|
||
# User areas. | ||
FLASH_AREA_REBOOT_LOG: | ||
user_id: 0 | ||
device: 0 | ||
offset: 0x080C0000 | ||
size: 128kB | ||
FLASH_AREA_NFFS: | ||
user_id: 1 | ||
device: 0 | ||
offset: 0x080E0000 | ||
size: 128kB | ||
|
||
FLASH_AREA_SPI: | ||
user_id: 2 | ||
device: 1 | ||
offset: 0x0 | ||
size: 128kB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
#ifndef H_BSP_H | ||
#define H_BSP_H | ||
|
||
#include <inttypes.h> | ||
#include <mcu/mcu.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Define special stackos sections */ | ||
#define sec_data_core __attribute__((section(".data.core"))) | ||
#define sec_bss_core __attribute__((section(".bss.core"))) | ||
#define sec_bss_nz_core __attribute__((section(".bss.core.nz"))) | ||
|
||
/* More convenient section placement macros. */ | ||
#define bssnz_t sec_bss_nz_core | ||
|
||
extern uint8_t _ram_start; | ||
extern uint8_t _dtcmram_start; | ||
extern uint8_t _itcmram_start; | ||
extern uint8_t _ram2_start; | ||
|
||
#define RAM_SIZE (320 * 1024) | ||
#define RAM2_SIZE (32 * 1024) | ||
#define RAM3_SIZE (16 * 1024) | ||
#define DTCMRAM_SIZE (128 * 1024) | ||
#define ITCMRAM_SIZE (64 * 1024) | ||
|
||
/* LED pins */ | ||
#define LED_1 MCU_GPIO_PORTB(0) | ||
#define LED_2 MCU_GPIO_PORTE(1) | ||
#define LED_3 MCU_GPIO_PORTB(14) | ||
|
||
#define LED_green LED_1 | ||
#define LED_blue LED_2 | ||
#define LED_red LED_3 | ||
|
||
#define LED_BLINK_PIN LED_1 | ||
|
||
/* BUTTON pins */ | ||
#define BTN_USER_1 MCU_GPIO_PORTC(13) | ||
|
||
/* Button pin */ | ||
#define BUTTON_1 BTN_USER_1 | ||
|
||
/* Arduino pins */ | ||
#define ARDUINO_PIN_D0 MCU_GPIO_PORTB(7) | ||
#define ARDUINO_PIN_D1 MCU_GPIO_PORTB(6) | ||
#define ARDUINO_PIN_D2 MCU_GPIO_PORTG(14) | ||
#define ARDUINO_PIN_D3 MCU_GPIO_PORTE(13) | ||
#define ARDUINO_PIN_D4 MCU_GPIO_PORTE(14) | ||
#define ARDUINO_PIN_D5 MCU_GPIO_PORTE(11) | ||
#define ARDUINO_PIN_D6 MCU_GPIO_PORTE(9) | ||
#define ARDUINO_PIN_D7 MCU_GPIO_PORTG(12) | ||
#define ARDUINO_PIN_D8 MCU_GPIO_PORTF(3) | ||
#define ARDUINO_PIN_D9 MCU_GPIO_PORTD(15) | ||
#define ARDUINO_PIN_D10 MCU_GPIO_PORTD(14) | ||
#define ARDUINO_PIN_D11 MCU_GPIO_PORTB(5) | ||
#define ARDUINO_PIN_D12 MCU_GPIO_PORTA(6) | ||
#define ARDUINO_PIN_D13 MCU_GPIO_PORTA(5) | ||
#define ARDUINO_PIN_A0 MCU_GPIO_PORTA(3) | ||
#define ARDUINO_PIN_A1 MCU_GPIO_PORTC(0) | ||
#define ARDUINO_PIN_A2 MCU_GPIO_PORTC(3) | ||
#define ARDUINO_PIN_A3 MCU_GPIO_PORTB(1) | ||
#define ARDUINO_PIN_A4 MCU_GPIO_PORTC(2) | ||
#define ARDUINO_PIN_A5 MCU_GPIO_PORTF(10) | ||
|
||
#define ARDUINO_PIN_RX ARDUINO_PIN_D0 | ||
#define ARDUINO_PIN_TX ARDUINO_PIN_D1 | ||
|
||
#define ARDUINO_PIN_SCL MCU_GPIO_PORTB(8) | ||
#define ARDUINO_PIN_SDA MCU_GPIO_PORTB(9) | ||
|
||
#define ARDUINO_PIN_SCK ARDUINO_PIN_D13 | ||
#define ARDUINO_PIN_MOSI ARDUINO_PIN_D11 | ||
#define ARDUINO_PIN_MISO ARDUINO_PIN_D12 | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* H_BSP_H */ |
Oops, something went wrong.