Skip to content

Commit 9f83528

Browse files
committed
hw/bsp: Add initial support for Nucleo-H753ZI
1 parent 4868635 commit 9f83528

File tree

11 files changed

+989
-1
lines changed

11 files changed

+989
-1
lines changed

apps/pwm_test/src/main.c

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
# define PWM_TEST_CH_CFG_INV false
4040
# define PWM_TEST_CH_NUM 1
4141
# define PWM_TEST_IRQ_PRIO 0
42+
#elif MYNEWT_VAL(BSP_nucleo_h753zi)
43+
# define PWM_TEST_CH_CFG_PIN MCU_AFIO_GPIO(LED_BLINK_PIN, 2)
44+
# define PWM_TEST_CH_CFG_INV false
45+
# define PWM_TEST_CH_NUM 2
46+
# define PWM_TEST_IRQ_PRIO 0
4247
#else
4348
# define PWM_TEST_CH_CFG_PIN LED_BLINK_PIN
4449
# define PWM_TEST_CH_CFG_INV true

hw/bsp/nucleo-h723zg/syscfg.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ syscfg.defs:
2727
value: 8
2828

2929
syscfg.vals:
30+
MCU_RAM_START: 0x24000000
31+
MCU_RAM_SIZE: 0x50000
3032
REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
3133
CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
3234
NFFS_FLASH_AREA: FLASH_AREA_NFFS

hw/bsp/nucleo-h753zi/bsp.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
bsp.name: "NUCLEO-H753ZI"
21+
bsp.url: https://www.st.com/en/evaluation-tools/nucleo-h753zi.html
22+
bsp.maker: "STMicroelectronics"
23+
bsp.arch: cortex_m7
24+
bsp.compiler: compiler/arm-none-eabi-m7
25+
bsp.linkerscript: autogenerated
26+
bsp.downloadscript: "hw/scripts/download.sh"
27+
bsp.debugscript: "hw/bsp/nucleo-h753zi/nucleo-h753zi_debug.sh"
28+
29+
bsp.flash_map:
30+
areas:
31+
# System areas.
32+
FLASH_AREA_BOOTLOADER:
33+
device: 0
34+
offset: 0x08000000
35+
size: 128kB
36+
FLASH_AREA_IMAGE_0:
37+
device: 0
38+
offset: 0x08020000
39+
size: 768kB
40+
FLASH_AREA_IMAGE_1:
41+
device: 0
42+
offset: 0x08100000
43+
size: 768kB
44+
FLASH_AREA_IMAGE_SCRATCH:
45+
device: 0
46+
offset: 0x080E0000
47+
size: 128kB
48+
49+
# User areas.
50+
FLASH_AREA_REBOOT_LOG:
51+
user_id: 0
52+
device: 0
53+
offset: 0x081C0000
54+
size: 128kB
55+
FLASH_AREA_NFFS:
56+
user_id: 1
57+
device: 0
58+
offset: 0x081E0000
59+
size: 128kB
+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
#ifndef H_BSP_H
20+
#define H_BSP_H
21+
22+
#include <inttypes.h>
23+
#include <mcu/mcu.h>
24+
25+
#ifdef __cplusplus
26+
extern "C" {
27+
#endif
28+
29+
/* Define special stackos sections */
30+
#define sec_data_core __attribute__((section(".data.core")))
31+
#define sec_bss_core __attribute__((section(".bss.core")))
32+
#define sec_bss_nz_core __attribute__((section(".bss.core.nz")))
33+
34+
/* More convenient section placement macros. */
35+
#define bssnz_t sec_bss_nz_core
36+
37+
extern uint8_t _ram_start[];
38+
extern uint8_t _dtcm_start[];
39+
extern uint8_t _itcm_start[];
40+
41+
#define RAM_SIZE (512 * 1024)
42+
#define DTCM_SIZE (128 * 1024)
43+
#define ITCM_SIZE (64 * 1024)
44+
45+
/* LED pins */
46+
#define LED_1 MCU_GPIO_PORTB(0)
47+
#define LED_2 MCU_GPIO_PORTE(1)
48+
#define LED_3 MCU_GPIO_PORTB(14)
49+
50+
#define LED_green LED_1
51+
#define LED_blue LED_2
52+
#define LED_red LED_3
53+
54+
#define LED_BLINK_PIN LED_1
55+
56+
/* BUTTON pins */
57+
#define BTN_USER_1 MCU_GPIO_PORTC(13)
58+
59+
/* Button pin */
60+
#define BUTTON_1 BTN_USER_1
61+
62+
/* Arduino pins */
63+
#define ARDUINO_PIN_D0 MCU_GPIO_PORTB(7)
64+
#define ARDUINO_PIN_D1 MCU_GPIO_PORTB(6)
65+
#define ARDUINO_PIN_D2 MCU_GPIO_PORTG(14)
66+
#define ARDUINO_PIN_D3 MCU_GPIO_PORTE(13)
67+
#define ARDUINO_PIN_D4 MCU_GPIO_PORTE(14)
68+
#define ARDUINO_PIN_D5 MCU_GPIO_PORTE(11)
69+
#define ARDUINO_PIN_D6 MCU_GPIO_PORTE(9)
70+
#define ARDUINO_PIN_D7 MCU_GPIO_PORTG(12)
71+
#define ARDUINO_PIN_D8 MCU_GPIO_PORTF(3)
72+
#define ARDUINO_PIN_D9 MCU_GPIO_PORTD(15)
73+
#define ARDUINO_PIN_D10 MCU_GPIO_PORTD(14)
74+
#define ARDUINO_PIN_D11 MCU_GPIO_PORTB(5)
75+
#define ARDUINO_PIN_D12 MCU_GPIO_PORTA(6)
76+
#define ARDUINO_PIN_D13 MCU_GPIO_PORTA(5)
77+
#define ARDUINO_PIN_A0 MCU_GPIO_PORTA(3)
78+
#define ARDUINO_PIN_A1 MCU_GPIO_PORTC(0)
79+
#define ARDUINO_PIN_A2 MCU_GPIO_PORTC(3)
80+
#define ARDUINO_PIN_A3 MCU_GPIO_PORTB(1)
81+
#define ARDUINO_PIN_A4 MCU_GPIO_PORTC(2)
82+
#define ARDUINO_PIN_A5 MCU_GPIO_PORTF(10)
83+
84+
#define ARDUINO_PIN_RX ARDUINO_PIN_D0
85+
#define ARDUINO_PIN_TX ARDUINO_PIN_D1
86+
87+
#define ARDUINO_PIN_SCL MCU_GPIO_PORTB(8)
88+
#define ARDUINO_PIN_SDA MCU_GPIO_PORTB(9)
89+
90+
#define ARDUINO_PIN_SCK ARDUINO_PIN_D13
91+
#define ARDUINO_PIN_MOSI ARDUINO_PIN_D11
92+
#define ARDUINO_PIN_MISO ARDUINO_PIN_D12
93+
94+
#ifdef __cplusplus
95+
}
96+
#endif
97+
98+
#endif /* H_BSP_H */

0 commit comments

Comments
 (0)