Skip to content

Commit

Permalink
Update Arduino core to v2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Feb 21, 2023
1 parent 8f49075 commit 6094015
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 8 deletions.
39 changes: 39 additions & 0 deletions boards/acsip_s76s.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"build": {
"cpu": "cortex-m0plus",
"extra_flags": "-DSTM32L073xx",
"f_cpu": "32000000L",
"framework_extra_flags": {
"arduino": "-D__CORTEX_SC=0 -DCUSTOM_PERIPHERAL_PINS"
},
"mcu": "stm32l073rz",
"product_line": "STM32L073xx",
"variant": "STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T"
},
"debug": {
"jlink_device": "STM32L073RZ",
"openocd_target": "stm32l0",
"svd_path": "STM32L07x.svd"
},
"frameworks": [
"arduino",
"cmsis",
"stm32cube",
"libopencm3"
],
"name": "ACSIP S76S",
"upload": {
"maximum_ram_size": 20480,
"maximum_size": 196608,
"protocol": "stlink",
"protocols": [
"jlink",
"cmsis-dap",
"stlink",
"blackmagic",
"mbed"
]
},
"url": "https://www.acsip.com.tw/index.php?action=products-detail&fid1=19&fid2=&fid3=&id=79",
"vendor": "ACSIP"
}
43 changes: 43 additions & 0 deletions boards/agafia_sg0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"build": {
"arduino": {
"variant_h": "variant_AGAFIA_SG0.h"
},
"core": "stm32",
"cpu": "cortex-m0plus",
"extra_flags": "-DSTM32G0xx -DSTM32G071xx",
"f_cpu": "64000000L",
"framework_extra_flags": {
"arduino": "-D__CORTEX_SC=0"
},
"mcu": "stm32g071rbt6",
"product_line": "STM32G071xx",
"variant": "STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)"
},
"debug": {
"jlink_device": "STM32G071RB",
"openocd_target": "stm32g0x",
"svd_path": "STM32G071.svd"
},
"frameworks": [
"arduino",
"cmsis",
"libopencm3",
"stm32cube"
],
"name": "Sigma IC AGAFIA SG0",
"upload": {
"maximum_ram_size": 36864,
"maximum_size": 131072,
"protocol": "stlink",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"stlink",
"mbed"
]
},
"url": "https://www.sigmaic.com/store/p7/agafia-sgo.html",
"vendor": "Sigma IC"
}
3 changes: 3 additions & 0 deletions boards/blackpill_f411ce.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"build": {
"arduino": {
"variant_h": "variant_BLACKPILL_F401Cx.h"
},
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32F4xx -DSTM32F411xE",
Expand Down
49 changes: 49 additions & 0 deletions boards/btt_ebb42_v1_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"build": {
"arduino": {
"variant_h": "variant_EBB42_V1_1.h"
},
"core": "stm32",
"cpu": "cortex-m0plus",
"extra_flags": "-DSTM32G0xx -DSTM32G0B1xx",
"f_cpu": "64000000L",
"framework_extra_flags": {
"arduino": "-D__CORTEX_SC=0 -DARDUINO_EBB42_V1_1"
},
"mcu": "stm32g0b1ret6",
"product_line": "STM32G0B1xx",
"variant": "STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)"
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32G0B1RE",
"onboard_tools": [
"stlink"
],
"openocd_target": "stm32g0x",
"svd_path": "STM32G0B1.svd"
},
"frameworks": [
"arduino",
"stm32cube"
],
"name": "Big Tree Tech EBB42 V1.1",
"upload": {
"maximum_ram_size": 147456,
"maximum_size": 131072,
"protocol": "stlink",
"protocols": [
"blackmagic",
"cmsis-dap",
"dfu",
"jlink",
"serial",
"stlink",
"mbed"
]
},
"url": "https://github.com/bigtreetech/EBB/tree/master/EBB%20CAN%20V1.1%20(STM32G0B1)/EBB42%20CAN%20V1.1",
"vendor": "Big Tree Tech"
}
6 changes: 4 additions & 2 deletions boards/nucleo_f722ze.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"extra_flags": "-DSTM32F722xx",
"f_cpu": "216000000L",
"mcu": "stm32f722zet6",
"product_line": "STM32F722xx"
"product_line": "STM32F722xx",
"variant": "STM32F7xx/F722Z(C-E)T_F732ZET"
},
"connectivity": [
"can"
Expand All @@ -22,13 +23,14 @@
"svd_path": "STM32F722.svd"
},
"frameworks": [
"arduino",
"cmsis",
"stm32cube",
"libopencm3"
],
"name": "ST Nucleo F722ZE",
"upload": {
"maximum_ram_size": 262144,
"maximum_ram_size": 196608,

This comment has been minimized.

Copy link
@nschurando

nschurando Jun 19, 2023

Is there a reason behind the change in maximum_ram_size from 256k to 192k for the F722ZE?

The product page lists "256 Kbytes of SRAM (including 64 Kbytes of data TCM RAM for critical real-time data)".

This comment has been minimized.

Copy link
@valeros

valeros Jun 19, 2023

Author Member

The TCM RAM is deliberately not taken into account https://github.com/stm32duino/Arduino_Core_STM32/blob/main/boards.txt#L87

This comment has been minimized.

Copy link
@nschurando

nschurando Jun 20, 2023

Thank you Valerii for getting back to me.

Please bear with me as my knowledge of the whole thing might be more limited than yours. But I do sense something is not quite right here. Let me develop.

Looking at AN4667 STM32F7 Series system architecture overview, I see the RAM block goes from 0x2000 0000 to 0x2004 FFFF. See table below.

image

You are right that a part of that RAM block is coupled RAM. But it seems to the current linker script generated/used by PlatformIO doesn't make that distinction as most of my symbols end up allocated in that coupled RAM. See symbol table below.

image

I would then argue that the maximum_ram_size should be reverted to 256k. Especially considering arm-none-eabi-size doesn't make the distinction between the types of RAM, it's just .bss / .data.

Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  31.1% (used 61124 bytes from 196608 bytes)
Flash: [==        ]  15.7% (used 82468 bytes from 524288 bytes)
.pio\build\nucleo_f722ze\firmware.elf  :
section                size        addr
.isr_vector             480   134217728
.text                 59996   134218208
.rodata               18380   134278204
.ARM.extab                0   134296584
.ARM                      8   134296584
.preinit_array            0   134296592
.init_array               4   134296592
.fini_array               4   134296596
.data                  4092   536870912
.bss                  57032   536875008
._user_heap_stack      1536   536932040
.ARM.attributes          46           0
.debug_info          506159           0
.debug_abbrev         64658           0
.debug_loc           141452           0
.debug_aranges        11448           0
.debug_ranges         14384           0
.debug_line          130562           0
.debug_str            77941           0
.comment                126           0
.debug_frame          33012           0
Total               1121320

Regards, Nicolas

This comment has been minimized.

Copy link
@valeros

valeros Jun 20, 2023

Author Member

Indeed seems like a mistake for this particular series of MCU, but this repo simply uses values provided by the Arduino Core for STM32 mainly because the RAM size is involved in dynamic linker script processing via the LD_MAX_DATA_SIZE variable. I'd recommend asking this question here https://github.com/stm32duino/Arduino_Core_STM32

Alternatively, you can always adjust your RAM size directly in the platformio.ini file:

[env:nucleo_f722ze]
platform = ststm32
framework = ...
board = nucleo_f722ze
board_upload.maximum_ram_size = 262144

This comment has been minimized.

Copy link
@nschurando

nschurando Jun 28, 2023

Hi Valerii. As suggested, I reported the issue and it has been resolved in pull request stm32duino/Arduino_Core_STM32#2044.

This comment has been minimized.

Copy link
@valeros

valeros Jun 28, 2023

Author Member

@nschurando Thanks for pinging, fixed in 7df1b7b

"maximum_size": 524288,
"protocol": "stlink",
"protocols": [
Expand Down
46 changes: 46 additions & 0 deletions boards/nucleo_g070rb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m0plus",
"extra_flags": "-DSTM32G0xx -DSTM32G070xx",
"f_cpu": "64000000L",
"framework_extra_flags": {
"arduino": "-D__CORTEX_SC=0"
},
"mcu": "stm32g070rbt6",
"product_line": "STM32G070xx",
"variant": "STM32G0xx/G070RBT"
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32G070RB",
"onboard_tools": [
"stlink"
],
"openocd_target": "stm32g0x",
"svd_path": "STM32G070.svd"
},
"frameworks": [
"arduino",
"cmsis",
"libopencm3",
"stm32cube"
],
"name": "Nucleo G070RB",
"upload": {
"maximum_ram_size": 36864,
"maximum_size": 131072,
"protocol": "stlink",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"stlink",
"mbed"
]
},
"url": "https://www.st.com/en/evaluation-tools/nucleo-g070rb.html",
"vendor": "ST"
}
2 changes: 1 addition & 1 deletion boards/nucleo_g0b1re.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"mcu": "stm32g0b1ret6",
"product_line": "STM32G0B1xx",
"variant": "STM32G0xx/G0B1RBT_G0B1R(C-E)(I-T)_G0C1R(C-E)(I-T)"
"variant": "STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T"
},
"debug": {
"default_tools": [
Expand Down
6 changes: 4 additions & 2 deletions boards/nucleo_h723zg.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"extra_flags": "-DSTM32H7xx -DSTM32H723xx",
"f_cpu": "550000000L",
"mcu": "stm32h723zgt6",
"product_line": "STM32H723xx"
"product_line": "STM32H723xx",
"variant": "STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT"
},
"connectivity": [
"can",
Expand All @@ -23,13 +24,14 @@
"svd_path": "STM32H723.svd"
},
"frameworks": [
"arduino",
"cmsis",
"stm32cube",
"zephyr"
],
"name": "ST Nucleo H723ZG",
"upload": {
"maximum_ram_size": 442368,
"maximum_ram_size": 327680,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo_l073rz.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"extra_flags": "-DSTM32L073xx",
"f_cpu": "32000000L",
"framework_extra_flags": {
"arduino": "-D__CORTEX_SC=0"
"arduino": "-D__CORTEX_SC=0 -DARDUINO_NUCLEO_L073RZ"
},
"mcu": "stm32l073rz",
"product_line": "STM32L073xx",
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo_l452re.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"f_cpu": "80000000L",
"mcu": "stm32l452ret6",
"product_line": "STM32L452xx",
"variant": "STM32L4xx/L452R(C-E)(I-T-Y)_L462RE(I-T-Y)"
"variant": "STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)"
},
"connectivity": [
"can"
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~4.20200.221104"
"version": "~4.20400.0"
},
"framework-arduinoststm32-maple": {
"type": "framework",
Expand Down

0 comments on commit 6094015

Please sign in to comment.