Skip to content

Commit 42efbeb

Browse files
authored
Merge pull request #774 from fpistm/MP1_update
MP1 update
2 parents ef13395 + 4b361fd commit 42efbeb

File tree

14 files changed

+126
-71
lines changed

14 files changed

+126
-71
lines changed

cores/arduino/stm32/analog.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ uint16_t adc_read_value(PinName pin)
916916
!defined(STM32WBxx) && !defined(STM32F373xC) && !defined(STM32F378xx)
917917
AdcChannelConf.Offset = 0; /* Parameter discarded because offset correction is disabled */
918918
#endif
919-
#if defined (STM32H7xx)
919+
#if defined (STM32H7xx) || defined(STM32MP1xx)
920920
AdcChannelConf.OffsetRightShift = DISABLE; /* No Right Offset Shift */
921921
AdcChannelConf.OffsetSignedSaturation = DISABLE; /* Signed saturation feature is not used */
922922
#endif
@@ -929,12 +929,13 @@ uint16_t adc_read_value(PinName pin)
929929

930930
#if defined(STM32F0xx) || defined(STM32F1xx) || defined(STM32F3xx) || \
931931
defined(STM32G0xx) || defined(STM32G4xx) || defined(STM32H7xx) || \
932-
defined(STM32L0xx) || defined(STM32L4xx) || defined(STM32WBxx)
932+
defined(STM32L0xx) || defined(STM32L4xx) || defined(STM32MP1xx) || \
933+
defined(STM32WBxx)
933934
/*##-2.1- Calibrate ADC then Start the conversion process ####################*/
934935
#if defined(STM32F0xx) || defined(STM32G0xx) || defined(STM32F1xx) || \
935936
defined(STM32F373xC) || defined(STM32F378xx)
936937
if (HAL_ADCEx_Calibration_Start(&AdcHandle) != HAL_OK)
937-
#elif defined (STM32H7xx)
938+
#elif defined (STM32H7xx) || defined(STM32MP1xx)
938939
if (HAL_ADCEx_Calibration_Start(&AdcHandle, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED) != HAL_OK)
939940
#else
940941
if (HAL_ADCEx_Calibration_Start(&AdcHandle, ADC_SINGLE_ENDED) != HAL_OK)

platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,4 @@ tools.remoteproc_gen.busybox.windows={path}/win/busybox.exe
209209
tools.remoteproc_gen.script=run_arduino_gen.sh
210210
tools.remoteproc_gen.upload.params.verbose=
211211
tools.remoteproc_gen.upload.params.quiet=
212-
tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino.sh"
212+
tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino_{build.project_name}.sh"

system/Middlewares/OpenAMP/libmetal/lib/include/metal/system/generic/condition.h

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#if defined (__CC_ARM)
2020
#include <stdio.h>
2121
#endif
22-
#include <unistd.h>
2322
#include <metal/atomic.h>
2423
#include <stdint.h>
2524
#include <limits.h>

system/Middlewares/OpenAMP/libmetal/lib/include/metal/system/generic/sys.h

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#define __METAL_GENERIC_SYS__H__
1818

1919
#include <metal/errno.h>
20-
#include <fcntl.h>
21-
#include <libgen.h>
2220
#include <limits.h>
2321
#include <stdio.h>
2422
#include <stdlib.h>

system/Middlewares/OpenAMP/libmetal/st_readme.txt

+8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
******************************************************************************
1919
@endverbatim
2020

21+
### V1.0.1/11-October-2019 ###
22+
===============================
23+
24+
+ Remove include files not used to fix compilation on IAR and KEIL
25+
- lib/include/metal/system/generic/condition.h
26+
- lib/include/metal/system/generic/sys.h
27+
28+
2129
### V1.0.0/29-March-2019 ###
2230
===============================
2331
+ Integrate official release v2018.10

system/Middlewares/OpenAMP/mw_if/app_if/openamp_conf_template.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@
7474
#endif /* VIRTUAL_I2C_MODULE_ENABLED */
7575

7676

77+
/* ########################## Linux Master Selection ############################## */
78+
/**
79+
* @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
80+
* In that case, the LINUX_RPROC_MASTER define is required
81+
*/
82+
//#define LINUX_RPROC_MASTER
83+
7784

7885
/* USER CODE BEGIN INCLUDE */
7986

@@ -154,7 +161,7 @@ extern int __OPENAMP_region_end__[]; /* defined by linker script */
154161

155162
#endif
156163

157-
#if defined STM32MP157Cxx
164+
#if defined LINUX_RPROC_MASTER
158165
#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
159166
#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
160167
#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */

system/Middlewares/OpenAMP/mw_if/platform_if/rsc_table_template.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#define __resource __section_t(.resource_table)
6262
#endif
6363

64-
#if defined (STM32MP157Cxx)
64+
#if defined (LINUX_RPROC_MASTER)
6565
#ifdef VIRTIO_MASTER_ONLY
6666
#define CONST
6767
#else
@@ -82,7 +82,7 @@ extern char system_log_buf[];
8282
#endif
8383

8484
#if defined(__GNUC__)
85-
#if !defined (__CC_ARM) && !defined (STM32MP157Cxx)
85+
#if !defined (__CC_ARM) && !defined (LINUX_RPROC_MASTER)
8686

8787
/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
8888
* for the CM4 (see resource_table_init() below)
@@ -95,7 +95,7 @@ CONST struct shared_resource_table __resource __attribute__((used)) resource_tab
9595
__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
9696
#endif
9797

98-
#if defined(__ICCARM__) || defined (__CC_ARM) || defined (STM32MP157Cxx)
98+
#if defined(__ICCARM__) || defined (__CC_ARM) || defined (LINUX_RPROC_MASTER)
9999
.version = 1,
100100
#if defined (__LOG_TRACE_IO_)
101101
.num = 2,
@@ -130,7 +130,7 @@ __root CONST struct shared_resource_table resource_table @ ".resource_table" = {
130130
void resource_table_init(int RPMsgRole, void **table_ptr, int *length)
131131
{
132132

133-
#if !defined (STM32MP157Cxx)
133+
#if !defined (LINUX_RPROC_MASTER)
134134
#if defined (__GNUC__) && ! defined (__CC_ARM)
135135
#ifdef VIRTIO_MASTER_ONLY
136136

system/Middlewares/OpenAMP/mw_if/st_readme.txt

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
******************************************************************************
1919
@endverbatim
2020

21+
### V1.0.3/08-November-2019 ##
22+
===============================
23+
+ openamp_conf_template.h:
24+
- replace the "STM32MP157Cxx" define macro with "LINUX_RPROC_MASTER" to support all STM32MP1 varieties
25+
2126
### V1.0.2/29-July-2019 ###
2227
============================
2328

system/Middlewares/OpenAMP/open-amp/lib/include/openamp/rpmsg.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <openamp/compiler.h>
1616
#include <metal/mutex.h>
1717
#include <metal/list.h>
18+
#include <metal/utilities.h>
1819
#include <string.h>
1920
#include <stdbool.h>
2021
#include <stdint.h>
@@ -25,7 +26,7 @@ extern "C" {
2526

2627
/* Configurable parameters */
2728
#define RPMSG_NAME_SIZE (32)
28-
#define RPMSG_ADDR_BMP_SIZE (4)
29+
#define RPMSG_ADDR_BMP_SIZE (128)
2930

3031
#define RPMSG_NS_EPT_ADDR (0x35)
3132
#define RPMSG_ADDR_ANY 0xFFFFFFFF
@@ -101,7 +102,7 @@ struct rpmsg_device_ops {
101102
struct rpmsg_device {
102103
struct metal_list endpoints;
103104
struct rpmsg_endpoint ns_ept;
104-
unsigned long bitmap[RPMSG_ADDR_BMP_SIZE];
105+
unsigned long bitmap[metal_bitmap_longs(RPMSG_ADDR_BMP_SIZE)];
105106
metal_mutex_t lock;
106107
rpmsg_ns_bind_cb ns_bind_cb;
107108
struct rpmsg_device_ops ops;

system/Middlewares/OpenAMP/open-amp/lib/rpmsg/rpmsg.c

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <openamp/rpmsg.h>
1111
#include <metal/alloc.h>
12-
#include <metal/utilities.h>
1312

1413
#include "rpmsg_internal.h"
1514

system/Middlewares/OpenAMP/open-amp/st_readme.txt

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919

2020
@endverbatim
2121

22+
### V1.0.1/11-October-2019 ###
23+
===============================
24+
+ Change RPMSG_ADDR_BMP_SIZE to increase the number of Virtual UART instances
25+
26+
-lib/include/openamp/rpmsg.h
27+
-lib/rpmsg/rpmsg.c
28+
29+
2230
### V1.0.0/29-March-2019 ###
2331
===============================
2432
+ Integrate official release v2018.10

variants/STM32MP157_DK/PeripheralPins.c

+38-38
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,46 @@ WEAK const PinMap PinMap_ADC[] = {
3030
// {ANA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_INP0
3131
{ANA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_INP1
3232
// {ANA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_INP1
33-
{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_INP16
34-
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_INN16
35-
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, // ADC1_INP17
36-
{PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_INP14
37-
{PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_INP15
38-
{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_INP18
39-
{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC2_INP18
40-
{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_INN18
41-
{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC1_INP19
42-
{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC2_INN18
43-
{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC2_INP19
44-
{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_INP3
45-
{PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_INP3
46-
{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_INN3
47-
{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_INP7
48-
{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_INN3
49-
{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_INP7
50-
{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_INN5
51-
{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_INP9
52-
{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_INN5
53-
{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_INP9
54-
{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_INP5
55-
{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_INP5
56-
{PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_INP10
57-
{PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_INP10
58-
{PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_INN10
59-
{PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_INP11
60-
{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_INN10
61-
{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_INP11
62-
{PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_INN11
63-
{PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_INP12
33+
// {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_INP16
34+
// {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_INN16
35+
// {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, // ADC1_INP17
36+
// {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_INP14
37+
// {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_INP15
38+
// {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_INP18
39+
// {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC2_INP18
40+
// {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_INN18
41+
// {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC1_INP19
42+
// {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC2_INN18
43+
// {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC2_INP19
44+
// {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_INP3
45+
// {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_INP3
46+
// {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_INN3
47+
// {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_INP7
48+
// {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_INN3
49+
// {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_INP7
50+
// {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_INN5
51+
// {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_INP9
52+
// {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_INN5
53+
// {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_INP9
54+
// {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_INP5
55+
// {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_INP5
56+
// {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_INP10
57+
// {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_INP10
58+
// {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_INN10
59+
// {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_INP11
60+
// {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_INN10
61+
// {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_INP11
62+
// {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_INN11
63+
// {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_INP12
6464
// {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_INN12
6565
{PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_INP13
66-
{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_INP4
67-
{PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_INP4
68-
{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_INN4
69-
{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_INP8
70-
{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_INN4
71-
{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_INP8
72-
{PF_11, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_INP2
66+
// {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_INP4
67+
// {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_INP4
68+
// {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_INN4
69+
// {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_INP8
70+
// {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_INN4
71+
// {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_INP8
72+
// {PF_11, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_INP2
7373
// {PF_12, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_INN2
7474
{PF_12, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_INP6
7575
{PF_13, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_INP2

variants/STM32MP157_DK/README.md

+33-17
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,65 @@ Because every OS may have different software configurations (especially Device T
1313
* [STM32 MPU OpenSTLinux Distribution]
1414
* [Balena OS]
1515

16-
Note that the first two OSes should select `stm32mp157c-dk2-m4-examples-sdcard` boot mode (or device tree configuration) on boot time. `stm32mp157c-dk2-sdcard` boot mode is also known to work but it is not guaranteed. See [ST Wiki page on boot mode] for more detail. If you are using it for your own OS, see the [Linux Device Tree considerations](#Linux-Device-Tree-considerations) section.
16+
#### Note
17+
* Other distributions not listed here may run Arduino firmware but they are not tested.
18+
* __The first two OSes should select `stm32mp157c-dk2-m4-examples-sdcard` boot mode (or device tree configuration) on boot time.__
19+
* `stm32mp157c-dk2-sdcard` boot mode is also known to work but it is not guaranteed. See [ST Wiki page on boot mode] for more detail. If you are using it for your own OS, see the [Linux Device Tree considerations](#Linux-Device-Tree-considerations) section.
1720

1821
## How to use
1922

2023
After Verify and Upload, you will see a message similar to the following in Arduino IDE:
2124

22-
<Arduino build output path>/run_arduino.sh generated successfully.
25+
<Arduino build output path>/run_arduino_<sketch name>.sh generated successfully.
2326
This file should be uploaded manually by SCP, SFTP, Kermit, or etc.
24-
Then run "sh ./run_arduino.sh start" command in the board's console.
27+
Then run "sh ./run_arduino_<sketch name>.sh start" command in the board's console.
2528
For detailed instructions, please visit:
2629
https://github.com/stm32duino/Arduino_Core_STM32/tree/master/variants/STM32MP157_DK/README.md
2730

28-
In this example, the user **must** upload `<Arduino build output path>/run_arduino.sh` file manually. Uploading instruction is described later in the [Uploading](#Uploading) section.
31+
`<Arduino build output path>/run_arduino_<sketch name>.sh` looks like this for *Blink* example:
2932

30-
After uploading the user can use `sh run_arduino.sh start` in the console of host Linux via either SSH or Serial Console, to run the Arduino firmware.
33+
* Windows:
3134

32-
Note: `sh run_arduino.sh start` is a one-shot command: the Arduino firmware only runs for the current boot. If you want to make it run after reboot, you need to use `sh run_arduino.sh install` command.
35+
`C:/Users/%USERNAME%/AppData/Local/Temp/arduino_build_668148/run_arduino.Blink.sh`
3336

34-
`run_arduino.sh` help page summary:
37+
* Linux/macOS:
3538

36-
Usage: sh run_arduino.sh [start|stop|restart|generate|install|uninstall]
39+
`/tmp/arduino_build_668148/run_arduino_Blink.sh`
3740

38-
run_arduino.sh is a helper script that helps managing an Arduino binary
41+
In this example, the user **must** upload `<Arduino build output path>/run_arduino_<sketch name>.sh` file manually. Uploading instruction is described later in the [Uploading](#Uploading) section.
42+
43+
After uploading the user can use `sh run_arduino_<sketch name>.sh start` in the console of host Linux via either SSH or Serial Console, to run the Arduino firmware.
44+
45+
#### Note
46+
* `sh run_arduino_<sketch name>.sh start` is a one-shot command, the Arduino firmware only runs for the current boot. If you want to make it run after reboot, you need to use `sh run_arduino_<sketch name>.sh install` command.
47+
48+
`run_arduino_<sketch name>.sh` help page summary:
49+
50+
Usage: sh run_arduino_<sketch name>.sh [start|stop|restart|generate|install|uninstall]
51+
52+
run_arduino_<sketch name>.sh is a helper script that helps managing an Arduino binary
3953
file for the coprocessor using remoteproc framework.
4054

41-
sh run_arduino.sh start
55+
sh run_arduino_<sketch name>.sh start
4256
Upload the binary to the coprocessor then start it.
4357
This command must be executed while the script contains the binary
4458
after generate command is run.
4559

46-
sh run_arduino.sh install
60+
sh run_arduino_<sketch name>.sh install
4761
Run the binary on boot automatically by installing a systemd service.
4862

49-
sh run_arduino.sh uninstall
63+
sh run_arduino_<sketch name>.sh uninstall
5064
Uninstall the autostart service.
5165

52-
sh run_arduino.sh stop
66+
sh run_arduino_<sketch name>.sh stop
5367
Stop the coprocessor.
5468

55-
sh run_arduino.sh restart
69+
sh run_arduino_<sketch name>.sh restart
5670
Restart the coprocessor.
5771

58-
See the source code for the full help page and the more details about [run_arduino.sh].
72+
See the source code [run_arduino_gen.sh] for the full help page and the more details about the `run_arduino_<sketch name>.sh` generated.
73+
74+
[run_arduino_gen.sh] is the shell script that produces a copy of the script called `run_arduino_<sketch name>.sh` but with the sketch binary self-contained.
5975

6076
## Pin mapping
6177

@@ -96,7 +112,7 @@ There are additional pins for LEDs and buttons.
96112

97113
## Uploading
98114

99-
As mentioned above `run_arduino.sh` file should be uploaded manually in order to work. There are many ways to upload the file.
115+
As mentioned above `run_arduino_<sketch name>.sh` file have to be uploaded manually from the PC to the board's Linux file system in order to be executed on the board directly through the board's Linux console. There are many ways to upload the file.
100116

101117
### Over Network
102118

@@ -152,7 +168,7 @@ And then the Device Tree should enable TIM1 for the coprocessor, although this d
152168
[Balena OS]: https://github.com/kbumsik/balena-st-stm32mp
153169
[ST Wiki page on boot mode]: https://wiki.st.com/stm32mpu/wiki/STM32CubeMP1_Package#Getting_started_with_STM32CubeMP1_Package
154170

155-
[run_arduino.sh]: https://github.com/stm32duino/Arduino_Tools/blob/master/linux/run_arduino_gen.sh
171+
[run_arduino_gen.sh]: https://github.com/stm32duino/Arduino_Tools/blob/master/run_arduino_gen.sh
156172

157173
[The ST Wiki page on C-Kermit]: https://wiki.st.com/stm32mpu/wiki/How_to_transfer_a_file_over_serial_console
158174
[a bug in OpenSTLinux]: https://community.st.com/s/question/0D50X0000B9vHa4/cannot-get-download-a-file-using-kermit

0 commit comments

Comments
 (0)