Skip to content

Commit 899d9be

Browse files
committed
Update patchset
1 parent d23c1d0 commit 899d9be

10 files changed

+752
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 3909b95887ef7b4b05c6411ef2c9a3ae6e997214 Mon Sep 17 00:00:00 2001
2+
From: giulcioffi <g.cioffi@arduino.cc>
3+
Date: Wed, 16 Mar 2022 12:04:13 +0100
4+
Subject: [PATCH 140/149] Start Ethernet PHY address discovery from address 1
5+
6+
---
7+
.../drivers/emac/TARGET_STM/TARGET_STM32H7/lan8742/lan8742.c | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/lan8742/lan8742.c b/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/lan8742/lan8742.c
11+
index 0fd341cdc4..82789c40c9 100644
12+
--- a/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/lan8742/lan8742.c
13+
+++ b/connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/lan8742/lan8742.c
14+
@@ -117,7 +117,7 @@ int32_t LAN8742_Init(lan8742_Object_t *pObj)
15+
pObj->DevAddr = LAN8742_MAX_DEV_ADDR + 1;
16+
17+
/* Get the device address from special mode register */
18+
- for (addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++) {
19+
+ for (addr = 1; addr <= LAN8742_MAX_DEV_ADDR; addr ++) {
20+
if (pObj->IO.ReadReg(addr, LAN8742_SMR, &regvalue) < 0) {
21+
status = LAN8742_STATUS_READ_ERROR;
22+
/* Can't read from this device address
23+
--
24+
2.25.1
25+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From fca7038344f647884151c5df3542236c349246b5 Mon Sep 17 00:00:00 2001
2+
From: pennam <m.pennasilico@arduino.cc>
3+
Date: Thu, 17 Mar 2022 10:05:32 +0100
4+
Subject: [PATCH 141/149] COMPONENT_SE050: Add defines to exclude DES functions
5+
if MBEDTLS_DES_C module is not enabled
6+
7+
---
8+
.../COMPONENT_SE050/sss/src/mbedtls/fsl_sss_mbedtls_apis.c | 4 +++-
9+
1 file changed, 3 insertions(+), 1 deletion(-)
10+
11+
diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/COMPONENT_SE050/sss/src/mbedtls/fsl_sss_mbedtls_apis.c b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/COMPONENT_SE050/sss/src/mbedtls/fsl_sss_mbedtls_apis.c
12+
index 614e8f0abb..20cd12d46c 100644
13+
--- a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/COMPONENT_SE050/sss/src/mbedtls/fsl_sss_mbedtls_apis.c
14+
+++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/COMPONENT_SE050/sss/src/mbedtls/fsl_sss_mbedtls_apis.c
15+
@@ -1265,6 +1265,7 @@ sss_status_t sss_mbedtls_cipher_one_go(sss_mbedtls_symmetric_t *context,
16+
mbedtls_ret = mbedtls_aes_setkey_enc(
17+
&aes_ctx, context->keyObject->contents, (unsigned int)(context->keyObject->contents_size * 8));
18+
} break;
19+
+#if defined(MBEDTLS_DES_C)
20+
case kAlgorithm_SSS_DES_CBC:
21+
case kAlgorithm_SSS_DES_ECB:
22+
case kAlgorithm_SSS_DES3_CBC:
23+
@@ -1277,6 +1278,7 @@ sss_status_t sss_mbedtls_cipher_one_go(sss_mbedtls_symmetric_t *context,
24+
mbedtls_ret = mbedtls_des_setkey_dec(&des_ctx, context->keyObject->contents);
25+
}
26+
break;
27+
+#endif
28+
#endif //SSS_HAVE_TESTCOUNTERPART
29+
default:
30+
goto exit;
31+
@@ -1356,7 +1358,7 @@ sss_status_t sss_mbedtls_cipher_one_go(sss_mbedtls_symmetric_t *context,
32+
case kAlgorithm_SSS_AES_CBC:
33+
mbedtls_aes_free(&aes_ctx);
34+
break;
35+
-#if SSS_HAVE_TESTCOUNTERPART
36+
+#if SSS_HAVE_TESTCOUNTERPART && defined(MBEDTLS_DES_C)
37+
case kAlgorithm_SSS_DES_CBC:
38+
case kAlgorithm_SSS_DES_ECB:
39+
case kAlgorithm_SSS_DES3_CBC:
40+
--
41+
2.25.1
42+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
From 0bead2417c30bc898b0563ed1c131925d4732df4 Mon Sep 17 00:00:00 2001
2+
From: pennam <m.pennasilico@arduino.cc>
3+
Date: Tue, 24 Aug 2021 17:02:47 +0200
4+
Subject: [PATCH 142/149] Add build options to allow to disable device
5+
functionalities i.e DEVICE_ANALOGOUT
6+
7+
---
8+
targets/TARGET_STM/TARGET_STM32H7/objects.h | 10 ++++++++++
9+
1 file changed, 10 insertions(+)
10+
11+
diff --git a/targets/TARGET_STM/TARGET_STM32H7/objects.h b/targets/TARGET_STM/TARGET_STM32H7/objects.h
12+
index 6f17147886..8415007dd9 100644
13+
--- a/targets/TARGET_STM/TARGET_STM32H7/objects.h
14+
+++ b/targets/TARGET_STM/TARGET_STM32H7/objects.h
15+
@@ -50,10 +50,13 @@ struct port_s {
16+
__IO uint32_t *reg_out;
17+
};
18+
19+
+#if DEVICE_TRNG
20+
struct trng_s {
21+
RNG_HandleTypeDef handle;
22+
};
23+
+#endif
24+
25+
+#if DEVICE_PWMOUT
26+
struct pwmout_s {
27+
PWMName pwm;
28+
PinName pin;
29+
@@ -63,7 +66,9 @@ struct pwmout_s {
30+
uint8_t channel;
31+
uint8_t inverted;
32+
};
33+
+#endif
34+
35+
+#if DEVICE_SPI
36+
struct spi_s {
37+
SPI_HandleTypeDef handle;
38+
IRQn_Type spiIRQ;
39+
@@ -77,6 +82,7 @@ struct spi_s {
40+
uint8_t transfer_type;
41+
#endif
42+
};
43+
+#endif
44+
45+
struct serial_s {
46+
UARTName uart;
47+
@@ -130,12 +136,14 @@ struct i2c_s {
48+
#endif
49+
};
50+
51+
+#if DEVICE_ANALOGIN
52+
struct analogin_s {
53+
ADC_HandleTypeDef handle;
54+
PinName pin;
55+
uint8_t channel;
56+
uint8_t differential;
57+
};
58+
+#endif
59+
60+
#if DEVICE_QSPI
61+
struct qspi_s {
62+
@@ -177,12 +185,14 @@ struct qspi_s {
63+
#endif /* DUAL_CORE */
64+
#include "gpio_object.h"
65+
66+
+#if DEVICE_ANALOGOUT
67+
struct dac_s {
68+
DACName dac;
69+
PinName pin;
70+
uint32_t channel;
71+
DAC_HandleTypeDef handle;
72+
};
73+
+#endif
74+
75+
struct flash_s {
76+
/* nothing to be stored for now */
77+
--
78+
2.25.1
79+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
From e1df8c5554dd8957e956f8d537f07807abf041d6 Mon Sep 17 00:00:00 2001
2+
From: pennam <m.pennasilico@arduino.cc>
3+
Date: Tue, 24 Aug 2021 17:03:39 +0200
4+
Subject: [PATCH 143/149] MCUboot:PORTENTA_H7_M7:Change ST HAL configuration
5+
removing unnecessary modules
6+
7+
---
8+
.../STM32Cube_FW/stm32h7xx_hal_conf.h | 32 ++++++++++---------
9+
1 file changed, 17 insertions(+), 15 deletions(-)
10+
11+
diff --git a/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h b/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h
12+
index afcfc24210..524bb2dd52 100644
13+
--- a/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h
14+
+++ b/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h
15+
@@ -35,32 +35,42 @@
16+
* @brief This is the list of modules to be used in the HAL driver
17+
*/
18+
#define HAL_MODULE_ENABLED
19+
+#define HAL_CORTEX_MODULE_ENABLED
20+
+#define HAL_DMA_MODULE_ENABLED
21+
+#define HAL_FLASH_MODULE_ENABLED
22+
+#define HAL_GPIO_MODULE_ENABLED
23+
+#define HAL_HSEM_MODULE_ENABLED
24+
+#define HAL_I2C_MODULE_ENABLED
25+
+#define HAL_MDMA_MODULE_ENABLED
26+
+#define HAL_PCD_MODULE_ENABLED
27+
+#define HAL_PWR_MODULE_ENABLED
28+
+#define HAL_QSPI_MODULE_ENABLED
29+
+#define HAL_RCC_MODULE_ENABLED
30+
+#define HAL_RTC_MODULE_ENABLED
31+
+#define HAL_SD_MODULE_ENABLED
32+
+#define HAL_TIM_MODULE_ENABLED
33+
+#define HAL_UART_MODULE_ENABLED
34+
+#if !defined(TARGET_PORTENTA_H7_M7) || !defined(MCUBOOT_BOOTLOADER_BUILD)
35+
#define HAL_ADC_MODULE_ENABLED
36+
#define HAL_CEC_MODULE_ENABLED
37+
#define HAL_COMP_MODULE_ENABLED
38+
#define HAL_CORDIC_MODULE_ENABLED
39+
-#define HAL_CORTEX_MODULE_ENABLED
40+
#define HAL_CRC_MODULE_ENABLED
41+
#define HAL_CRYP_MODULE_ENABLED
42+
#define HAL_DAC_MODULE_ENABLED
43+
#define HAL_DCMI_MODULE_ENABLED
44+
#define HAL_DFSDM_MODULE_ENABLED
45+
-#define HAL_DMA_MODULE_ENABLED
46+
#define HAL_DMA2D_MODULE_ENABLED
47+
#define HAL_DTS_MODULE_ENABLED
48+
#define HAL_DSI_MODULE_ENABLED
49+
#define HAL_ETH_MODULE_ENABLED
50+
#define HAL_EXTI_MODULE_ENABLED
51+
#define HAL_FDCAN_MODULE_ENABLED
52+
-#define HAL_FLASH_MODULE_ENABLED
53+
#define HAL_GFXMMU_MODULE_ENABLED
54+
#define HAL_FMAC_MODULE_ENABLED
55+
-#define HAL_GPIO_MODULE_ENABLED
56+
#define HAL_HASH_MODULE_ENABLED
57+
#define HAL_HCD_MODULE_ENABLED
58+
#define HAL_HRTIM_MODULE_ENABLED
59+
-#define HAL_HSEM_MODULE_ENABLED
60+
-#define HAL_I2C_MODULE_ENABLED
61+
#define HAL_I2S_MODULE_ENABLED
62+
#define HAL_IRDA_MODULE_ENABLED
63+
#define HAL_IWDG_MODULE_ENABLED
64+
@@ -68,23 +78,16 @@
65+
#define HAL_LPTIM_MODULE_ENABLED
66+
#define HAL_LTDC_MODULE_ENABLED
67+
#define HAL_MDIOS_MODULE_ENABLED
68+
-#define HAL_MDMA_MODULE_ENABLED
69+
#define HAL_MMC_MODULE_ENABLED
70+
#define HAL_NAND_MODULE_ENABLED
71+
#define HAL_NOR_MODULE_ENABLED
72+
#define HAL_OPAMP_MODULE_ENABLED
73+
#define HAL_OSPI_MODULE_ENABLED
74+
#define HAL_OTFDEC_MODULE_ENABLED
75+
-#define HAL_PCD_MODULE_ENABLED
76+
-#define HAL_PWR_MODULE_ENABLED
77+
#define HAL_PSSI_MODULE_ENABLED
78+
-#define HAL_QSPI_MODULE_ENABLED
79+
#define HAL_RAMECC_MODULE_ENABLED
80+
-#define HAL_RCC_MODULE_ENABLED
81+
#define HAL_RNG_MODULE_ENABLED
82+
-#define HAL_RTC_MODULE_ENABLED
83+
#define HAL_SAI_MODULE_ENABLED
84+
-#define HAL_SD_MODULE_ENABLED
85+
#define HAL_SDRAM_MODULE_ENABLED
86+
#define HAL_SMARTCARD_MODULE_ENABLED
87+
#define HAL_SMBUS_MODULE_ENABLED
88+
@@ -92,10 +95,9 @@
89+
#define HAL_SPI_MODULE_ENABLED
90+
#define HAL_SRAM_MODULE_ENABLED
91+
#define HAL_SWPMI_MODULE_ENABLED
92+
-#define HAL_TIM_MODULE_ENABLED
93+
-#define HAL_UART_MODULE_ENABLED
94+
#define HAL_USART_MODULE_ENABLED
95+
#define HAL_WWDG_MODULE_ENABLED
96+
+#endif
97+
98+
/* ########################## Oscillator Values adaptation ####################*/
99+
/**
100+
--
101+
2.25.1
102+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
From fd50f44f3a155ead9cd4ff61fb436acb5eefcdc0 Mon Sep 17 00:00:00 2001
2+
From: pennam <m.pennasilico@arduino.cc>
3+
Date: Tue, 24 Aug 2021 17:04:35 +0200
4+
Subject: [PATCH 144/149] Add build option to allow FATFS customization: remove
5+
mkfs
6+
7+
---
8+
storage/filesystem/fat/include/fat/FATFileSystem.h | 4 ++++
9+
storage/filesystem/fat/source/FATFileSystem.cpp | 3 ++-
10+
2 files changed, 6 insertions(+), 1 deletion(-)
11+
12+
diff --git a/storage/filesystem/fat/include/fat/FATFileSystem.h b/storage/filesystem/fat/include/fat/FATFileSystem.h
13+
index 581662b2ce..f15e081502 100644
14+
--- a/storage/filesystem/fat/include/fat/FATFileSystem.h
15+
+++ b/storage/filesystem/fat/include/fat/FATFileSystem.h
16+
@@ -45,6 +45,7 @@ public:
17+
FATFileSystem(const char *name = NULL, BlockDevice *bd = NULL);
18+
virtual ~FATFileSystem();
19+
20+
+#if MBED_CONF_FAT_CHAN_FF_USE_MKFS
21+
/** Format a logical drive, FDISK partitioning rule.
22+
*
23+
* The block device to format should be mounted when this function is called.
24+
@@ -62,6 +63,7 @@ public:
25+
* @return 0 on success, negative error code on failure.
26+
*/
27+
static int format(BlockDevice *bd, bd_size_t cluster_size = 0);
28+
+#endif
29+
30+
/** Mount a file system to a block device.
31+
*
32+
@@ -76,6 +78,7 @@ public:
33+
*/
34+
virtual int unmount();
35+
36+
+#if MBED_CONF_FAT_CHAN_FF_USE_MKFS
37+
/** Reformat a file system, results in an empty and mounted file system.
38+
*
39+
* @param bd
40+
@@ -108,6 +111,7 @@ public:
41+
// Required for virtual inheritance shenanigans.
42+
return reformat(bd, 0);
43+
}
44+
+#endif
45+
46+
/** Remove a file from the file system.
47+
*
48+
diff --git a/storage/filesystem/fat/source/FATFileSystem.cpp b/storage/filesystem/fat/source/FATFileSystem.cpp
49+
index 3006a24530..ee0db9bde1 100644
50+
--- a/storage/filesystem/fat/source/FATFileSystem.cpp
51+
+++ b/storage/filesystem/fat/source/FATFileSystem.cpp
52+
@@ -340,7 +340,7 @@ int FATFileSystem::unmount()
53+
unlock();
54+
return fat_error_remap(res);
55+
}
56+
-
57+
+#if MBED_CONF_FAT_CHAN_FF_USE_MKFS
58+
/* See http://elm-chan.org/fsw/ff/en/mkfs.html for details of f_mkfs() and
59+
* associated arguments. */
60+
int FATFileSystem::format(BlockDevice *bd, bd_size_t cluster_size)
61+
@@ -464,6 +464,7 @@ int FATFileSystem::reformat(BlockDevice *bd, int allocation_unit)
62+
unlock();
63+
return err;
64+
}
65+
+#endif
66+
67+
int FATFileSystem::remove(const char *path)
68+
{
69+
--
70+
2.25.1
71+

0 commit comments

Comments
 (0)