Skip to content

Add menu to split Portenta flash #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,25 @@ edge_control.bootloader.file=EDGE_CONTROL/bootloader.hex

##############################################################

menu.split=Flash split

envie_m7.name=Arduino Portenta H7 (M7 core)
envie_m7.build.core=arduino
envie_m7.build.crossprefix=arm-none-eabi-
envie_m7.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/

envie_m7.menu.split.50_50=1MB M7 + 1MB M4
envie_m7.menu.split.75_25=1.5MB M7 + 0.5MB M4
envie_m7.menu.split.100_0=2MB M7 + M4 in SDRAM

envie_m7.build.variant=PORTENTA_H7_M7
envie_m7.build.mcu=cortex-m7
envie_m7.build.fpu=-mfpu=fpv5-d16
envie_m7.build.float-abi=-mfloat-abi=softfp
envie_m7.build.extra_flags=
envie_m7.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000
envie_m7.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000
envie_m7.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000
envie_m7.build.architecture=cortex-m7
envie_m7.build.board=PORTENTA_H7_M7
envie_m7.build.ldscript=linker_script.ld
Expand Down Expand Up @@ -79,7 +88,9 @@ envie_m7.upload.interface=0
envie_m7.upload.use_1200bps_touch=true
envie_m7.upload.wait_for_upload_port=true
envie_m7.upload.native_usb=true
envie_m7.upload.maximum_size=786432
envie_m7.menu.split.50_50.upload.maximum_size=786432
envie_m7.menu.split.75_25.upload.maximum_size=1441792
envie_m7.menu.split.100_0.upload.maximum_size=1966080
envie_m7.upload.maximum_data_size=523624

envie_m7.debug.tool=gdb
Expand All @@ -103,11 +114,18 @@ envie_m4.build.core=arduino
envie_m4.build.crossprefix=arm-none-eabi-
envie_m4.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/

envie_m4.menu.split.50_50=1MB M7 + 1MB M4
envie_m4.menu.split.75_25=1.5MB M7 + 0.5MB M4
envie_m4.menu.split.100_0=2MB M7 + M4 in SDRAM

envie_m4.build.variant=PORTENTA_H7_M4
envie_m4.build.mcu=cortex-m4
envie_m4.build.fpu=-mfpu=fpv4-sp-d16
envie_m4.build.float-abi=-mfloat-abi=softfp
envie_m4.build.extra_flags=
envie_m4.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000
envie_m4.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000 -DCM4_BINARY_END=0x08200000
envie_m4.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000
envie_m4.build.architecture=cortex-m4
envie_m4.build.board=PORTENTA_H7_M4
envie_m4.build.ldscript=linker_script.ld
Expand All @@ -129,12 +147,17 @@ envie_m4.upload.tool=dfu-util
envie_m4.upload.vid=0x2341
envie_m4.upload.pid=0x035b
envie_m4.upload.protocol=
envie_m4.upload.address=0x08100000
envie_m4.upload.interface=0
envie_m4.upload.use_1200bps_touch=true
envie_m4.upload.wait_for_upload_port=true
envie_m4.upload.native_usb=true
envie_m4.upload.maximum_size=1048576
envie_m4.menu.split.50_50.upload.address=0x08100000
envie_m4.menu.split.75_25.upload.address=0x08180000
#make loading the M4 in this way fail - the user needs to provide a file via mass storage or similar interfaces
envie_m4.menu.split.100_0.upload.address=
envie_m4.menu.split.50_50.upload.maximum_size=1048576
envie_m4.menu.split.75_25.upload.maximum_size=524288
envie_m4.menu.split.100_0.upload.maximum_size=524288
envie_m4.upload.maximum_data_size=294248

envie_m4.debug.tool=gdb
Expand Down
2 changes: 1 addition & 1 deletion libraries/KernelDebug/src/KernelDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static const char g_memoryMapXml[] = "<?xml version=\"1.0\"?>"
"<memory type=\"ram\" start=\"0x58026000\" length=\"0x800\"> </memory>"
"<memory type=\"ram\" start=\"0x58027000\" length=\"0x400\"> </memory>"
"<memory type=\"flash\" start=\"0x90000000\" length=\"0x10000000\"> <property name=\"blocksize\">0x200</property></memory>"
"<memory type=\"ram\" start=\"0xc0000000\" length=\"0x800000\"> </memory>"
"<memory type=\"ram\" start=\"0x60000000\" length=\"0x800000\"> </memory>"
"</memory-map>";

extern "C" uint32_t Platform_GetDeviceMemoryMapXmlSize(void)
Expand Down
2 changes: 1 addition & 1 deletion libraries/Portenta_Camera/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "camera.h"
#include "stm32h7xx_hal_dcmi.h"

#define CAMERA_FRAME_BUFFER 0xC0200000
#define CAMERA_FRAME_BUFFER SDRAM_START_ADDRESS + 0x200000

#define ARGB8888_BYTE_PER_PIXEL 4

Expand Down
37 changes: 37 additions & 0 deletions libraries/Portenta_SDRAM/SDRAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,47 @@ int SDRAMClass::begin(uint32_t start_address) {
then enable access/caching for the size used
*/

if (SDRAM_START_ADDRESS != 0xC0000000) {
printf("remap ram to 0x60000000\n");
HAL_SetFMCMemorySwappingConfig(FMC_SWAPBMAP_SDRAM_SRAM);
}

#if 0

printf("setup mpu\n");
#define MPU_SDRAM_EXEC_REGION_NUMBER MPU_REGION_SDRAM1
#define MPU_SDRAM_REGION_TEX (0x4 << MPU_RASR_TEX_Pos) /* Cached memory */
#define MPU_SDRAM_EXEC_REGION_SIZE (22 << MPU_RASR_SIZE_Pos) /* 2^(22+1) = 8Mo */
#define MPU_SDRAM_ACCESS_PERMSSION (0x03UL << MPU_RASR_AP_Pos)
#define MPU_SDRAM_REGION_CACHABLE (0x01UL << MPU_RASR_C_Pos)
#define MPU_SDRAM_REGION_BUFFERABLE (0x01UL << MPU_RASR_B_Pos)

MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
/* Configure SDARM region as first region */
MPU->RNR = MPU_SDRAM_EXEC_REGION_NUMBER;
/* Set MPU SDARM base address (0xD0000000) */
MPU->RBAR = SDRAM_START_ADDRESS;
/*
- Execute region: RASR[size] = 22 -> 2^(22+1) -> size 8MB
- Access permission: Full access: RASR[AP] = 0b011
- Cached memory: RASR[TEX] = 0b0100
- Disable the Execute Never option: to allow the code execution on SDRAM: RASR[XN] = 0
- Enable the region MPU: RASR[EN] = 1
*/
MPU->RASR = (MPU_SDRAM_EXEC_REGION_SIZE | MPU_SDRAM_ACCESS_PERMSSION | MPU_SDRAM_REGION_TEX | \
MPU_RASR_ENABLE_Msk | MPU_SDRAM_REGION_BUFFERABLE) & ~MPU_RASR_XN_Msk ;

/* Enable MPU and leave the predefined regions to default configuration */
MPU->CTRL |= MPU_CTRL_PRIVDEFENA_Msk | MPU_CTRL_ENABLE_Msk;
#endif

#if 0
mpu_config_start();
mpu_config_region(MPU_REGION_SDRAM1, SDRAM_START_ADDRESS, MPU_CONFIG_DISABLE(0x00, MPU_REGION_SIZE_512MB));
mpu_config_region(MPU_REGION_SDRAM2, SDRAM_START_ADDRESS, MPU_CONFIG_SDRAM(SDRAM_MPU_REGION_SIZE));
mpu_config_end();
#endif

}

if (start_address) {
Expand Down
4 changes: 2 additions & 2 deletions libraries/Portenta_SDRAM/SDRAM.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "Arduino.h"

#define SDRAM_END_ADDRESS (0xC0800000)
#define SDRAM_START_ADDRESS (0xC0000000)
#define SDRAM_END_ADDRESS (0x60800000)
#define SDRAM_START_ADDRESS (0x60000000)

class SDRAMClass {
public:
Expand Down
2 changes: 1 addition & 1 deletion libraries/Portenta_SDRAM/ram_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static HAL_StatusTypeDef FMC_SDRAM_Clock_Config(void)
RCC_PeriphCLKInitStruct.FmcClockSelection = RCC_FMCCLKSOURCE_PLL2;
RCC_PeriphCLKInitStruct.PLL2.PLL2RGE = RCC_PLL1VCIRANGE_2;
RCC_PeriphCLKInitStruct.PLL2.PLL2M = 5;
RCC_PeriphCLKInitStruct.PLL2.PLL2N = 200;
RCC_PeriphCLKInitStruct.PLL2.PLL2N = 160;
RCC_PeriphCLKInitStruct.PLL2.PLL2FRACN = 0;
RCC_PeriphCLKInitStruct.PLL2.PLL2P = 2;
RCC_PeriphCLKInitStruct.PLL2.PLL2R = 4;
Expand Down
4 changes: 3 additions & 1 deletion libraries/Portenta_Video/anx7625.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,10 @@ static void stm32_LayerInit(uint16_t LayerIndex, uint32_t FB_Address)
HAL_LTDC_ConfigLayer(&ltdc, &Layercfg, LayerIndex);
}

#include "SDRAM.h"

#define BYTES_PER_PIXEL 2
#define FB_BASE_ADDRESS ((uint32_t)0xC0000000)
#define FB_BASE_ADDRESS ((uint32_t)SDRAM_START_ADDRESS)
#define FB_ADDRESS_0 (FB_BASE_ADDRESS)
#define FB_ADDRESS_1 (FB_BASE_ADDRESS + (lcd_x_size * lcd_y_size * BYTES_PER_PIXEL))

Expand Down
2 changes: 1 addition & 1 deletion libraries/RPC/RPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ int RPC::begin() {

//resource_table_load_from_flash();
//HAL_SYSCFG_EnableCM4BOOT();
HAL_RCCEx_EnableBootCore(RCC_BOOT_C2);
bootM4();

eventThread = new rtos::Thread(osPriorityHigh);
eventThread->start(&eventHandler);
Expand Down
59 changes: 59 additions & 0 deletions libraries/RPC/examples/BootM4_from_SDRAM/BootM4_from_SDRAM.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#include "SDRAM.h"
#include "QSPIFBlockDevice.h"
#include "MBRBlockDevice.h"
#include "FATFileSystem.h"
#include "PluggableUSBMSD.h"

QSPIFBlockDevice root(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
mbed::MBRBlockDevice ota_data(&root, 2);
mbed::FATFileSystem ota_data_fs("fs");

void USBMSD::begin()
{
}

USBMSD MassStorage(&root);

long getFileSize(FILE *fp) {
fseek(fp, 0, SEEK_END);
int size = ftell(fp);
fseek(fp, 0, SEEK_SET);

return size;
}

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
while (!Serial);

SDRAM.begin(0);

int err = ota_data_fs.mount(&ota_data);
if (err) {
Serial.println("Please run PortentaWiFiFirmwareUpdater once");
while (1) {
delay(10000);
}
}

// Copy M4 firmware to SDRAM
FILE* fw = fopen("/fs/fw.bin", "r");
if (fw == NULL) {
Serial.println("Please copy a firmware for M4 core in the PORTENTA mass storage");
Serial.println("When done, please unmount the mass storage and reset the board");
MassStorage.begin();
while (1) {
delay(10000);
}
}
fread((uint8_t*)CM4_BINARY_START, getFileSize(fw), 1, fw);
fclose(fw);

bootM4();
}

void loop() {
// put your main code here, to run repeatedly:
delay(10000);
}
2 changes: 1 addition & 1 deletion libraries/ThreadDebug/src/ThreadDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ static const char g_memoryMapXml[] = "<?xml version=\"1.0\"?>"
"<memory type=\"ram\" start=\"0x58027000\" length=\"0x400\"> </memory>"
"<memory type=\"flash\" start=\"0x90000000\" length=\"0x10000000\"> <property name=\"blocksize\">0x200</property></memory>"
#ifndef CORE_CM4
"<memory type=\"ram\" start=\"0xc0000000\" length=\"0x800000\"> </memory>"
"<memory type=\"ram\" start=\"0x60000000\" length=\"0x800000\"> </memory>"
#endif
"</memory-map>";
#endif
Expand Down
4 changes: 4 additions & 0 deletions mbed-os-to-arduino
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ generate_flags () {
OPENAMP_REGIONS="__OPENAMP_region_start__ = 0x38000400;\n__OPENAMP_region_end__ = 0x38000400 + LENGTH(RAM_D3) - 1K;"
sed -i "s?ENTRY(Reset_Handler)?${OPENAMP_REGIONS}\nENTRY(Reset_Handler)?g" $ARDUINOVARIANT/linker_script.ld
fi
echo "Patching linker scripts"
sed -i 's/0x8100000/CM4_BINARY_START/g' "$ARDUINOVARIANT"/linker_script.ld
sed -i 's/LENGTH = 0x100000/LENGTH = CM4_BINARY_END - CM4_BINARY_START/g' "$ARDUINOVARIANT"/linker_script.ld
sed -i 's/LENGTH = 0xc0000/LENGTH = CM4_BINARY_START - 0x8040000/g' "$ARDUINOVARIANT"/linker_script.ld
fi
if [[ $ARDUINOVARIANT == *NANO_RP2040* ]]; then
set +e
Expand Down
25 changes: 25 additions & 0 deletions patches/0100-STM32H7-CM4-avoid-vtor-relocation-via-define.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 2390f920141c6f9b47a8ef80aba6e7dbe2c692e3 Mon Sep 17 00:00:00 2001
From: Martino Facchin <m.facchin@arduino.cc>
Date: Mon, 16 Aug 2021 17:19:45 +0200
Subject: [PATCH] STM32H7: CM4: avoid vtor relocation via define

---
.../STM32Cube_FW/system_stm32h7xx_dualcore_boot_cm4_cm7.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/system_stm32h7xx_dualcore_boot_cm4_cm7.c b/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/system_stm32h7xx_dualcore_boot_cm4_cm7.c
index 8e0017de2a..b4a4cc7826 100644
--- a/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/system_stm32h7xx_dualcore_boot_cm4_cm7.c
+++ b/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/system_stm32h7xx_dualcore_boot_cm4_cm7.c
@@ -232,7 +232,7 @@ __weak void SystemInit (void)
/* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
SCB->VTOR = D2_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
-#else
+#elif !defined(NO_VTOR_RELOCATE)
#include "nvic_addr.h" // MBED
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; // MBED
#endif
--
2.32.0

14 changes: 8 additions & 6 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ compiler.define=-DARDUINO=

# this can be overriden in boards.txt
build.extra_flags=
build.extra.startobjects=
build.extra.endobjects=
build.extra_ldflags=
compiler.mbed=

# These can be overridden in platform.local.txt
Expand Down Expand Up @@ -71,19 +70,22 @@ build.zip.pattern={recipe.size.pattern}
# -----------------------

## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_MBED {build.library_discovery_phase_flag} {build.extra_flags} {compiler.c.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "-iprefix{build.core.path}" "@{compiler.mbed.includes}" -o "{object_file}" "{source_file}"
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_MBED {build.library_discovery_phase_flag} {build.extra_flags} {build.extra_ldflags} {compiler.c.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "-iprefix{build.core.path}" "@{compiler.mbed.includes}" -o "{object_file}" "{source_file}"

## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_MBED {build.library_discovery_phase_flag} {includes} {build.extra_flags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.core.path}" "@{compiler.mbed.includes}" "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_MBED {build.library_discovery_phase_flag} {includes} {build.extra_flags} {build.extra_ldflags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.core.path}" "@{compiler.mbed.includes}" "{source_file}" -o "{object_file}"

## Compile asm files
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_MBED {includes} {build.extra_flags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.core.path}" "@{compiler.mbed.includes}" "{source_file}" -o "{object_file}"
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_MBED {includes} {build.extra_flags} {build.extra_ldflags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.core.path}" "@{compiler.mbed.includes}" "{source_file}" -o "{object_file}"

## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

## Preprocess linker script
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.elf.cmd}" -E -P -x c {build.extra_flags} {build.extra_ldflags} "{build.variant.path}/{build.ldscript}" -o {build.path}/{build.ldscript}

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "@{compiler.mbed.ldflags}" "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--whole-archive "{build.path}/{archive_file}" {compiler.mbed} -Wl,--no-whole-archive -Wl,--start-group {compiler.mbed.extra_ldflags} {compiler.libraries.ldflags} -Wl,--end-group
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} {build.extra_ldflags} "@{compiler.mbed.ldflags}" "-T{build.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--whole-archive "{build.path}/{archive_file}" {compiler.mbed} -Wl,--no-whole-archive -Wl,--start-group {compiler.mbed.extra_ldflags} {compiler.libraries.ldflags} -Wl,--end-group

## Create eeprom
recipe.objcopy.eep.pattern=
Expand Down
1 change: 1 addition & 0 deletions variants/PORTENTA_H7_M4/conf/mbed_app.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"rtos.main-thread-stack-size": 32768,
"cordio.max-connections": 5,
"target.macros_add": [
"NO_VTOR_RELOCATE",
"METAL_INTERNAL",
"VIRTIO_SLAVE_ONLY",
"NO_ATOMIC_64_SUPPORT",
Expand Down
3 changes: 2 additions & 1 deletion variants/PORTENTA_H7_M4/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
-DFEATURE_BLE=1
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1629106574.1500628
-DMBED_BUILD_TIMESTAMP=1629127614.4207656
-D__MBED_CMSIS_RTOS_CM
-DMBED_MPU_CUSTOM
-DMBED_TICKLESS
Expand All @@ -52,6 +52,7 @@
-DMETAL_INTERNAL
-DMETAL_MAX_DEVICE_REGIONS=2
-DNO_ATOMIC_64_SUPPORT
-DNO_VTOR_RELOCATE
-DQSPI_NO_SAMPLE_SHIFT
-DRPMSG_BUFFER_SIZE=100
-DSTM32H747xx
Expand Down
Binary file modified variants/PORTENTA_H7_M4/libs/libmbed.a
Binary file not shown.
2 changes: 1 addition & 1 deletion variants/PORTENTA_H7_M4/linker_script.ld
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MEMORY
{
FLASH (rx) : ORIGIN = 0x8100000, LENGTH = 0x100000
FLASH (rx) : ORIGIN = CM4_BINARY_START, LENGTH = CM4_BINARY_END - CM4_BINARY_START
RAM (rwx) : ORIGIN = 0x10000000 + (((166 * 4) + 7) & 0xFFFFFFF8), LENGTH = 0x48000 - (((166 * 4) + 7) & 0xFFFFFFF8)
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
}
Expand Down
2 changes: 1 addition & 1 deletion variants/PORTENTA_H7_M7/linker_script.ld
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MEMORY
{
FLASH (rx) : ORIGIN = 0x8040000, LENGTH = 0xc0000
FLASH (rx) : ORIGIN = 0x8040000, LENGTH = CM4_BINARY_START - 0x8040000
DTCMRAM (rwx) : ORIGIN = 0x20000000 + (((166 * 4) + 7) & 0xFFFFFFF8), LENGTH = 128K - (((166 * 4) + 7) & 0xFFFFFFF8)
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 0x80000
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
Expand Down
2 changes: 1 addition & 1 deletion variants/PORTENTA_H7_M7/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" bool isBetaBoard();

// Booting
// ----
#define bootM4() LL_RCC_ForceCM4Boot() // Provide a memorable alias
void bootM4();

extern PinName digitalPinToPinName(pin_size_t P);

Expand Down
Loading