-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from mbed-ce/dev/add-memory-bank-example
Add memory bank example, improve docs a bit
- Loading branch information
Showing
9 changed files
with
132 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# In this file you can specify the upload method configuration for your custom target(s). | ||
# See here for the list of parameters that can be set: | ||
# https://github.com/mbed-ce/mbed-os/wiki/Upload-Methods | ||
|
||
if(MBED_TARGET STREQUAL "L452RE_SIMPLE" OR | ||
MBED_TARGET STREQUAL "L452RE_CUSTOM_PINMAP" OR | ||
MBED_TARGET STREQUAL "L452RE_CUSTOM_CLOCK" OR | ||
MBED_TARGET STREQUAL "L452RC_CUSTOM_MEMORY_MAP") | ||
|
||
# Enable STM32Cube upload method | ||
set(STM32CUBE_UPLOAD_ENABLED TRUE) | ||
set(STM32CUBE_CONNECT_COMMAND -c port=SWD reset=HWrst) | ||
set(STM32CUBE_GDBSERVER_ARGS --swd) | ||
|
||
# Enable Mbed upload method | ||
set(MBED_UPLOAD_ENABLED TRUE) | ||
|
||
# Default is STM32CUBE | ||
set(UPLOAD_METHOD_DEFAULT STM32CUBE) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,87 @@ | ||
{ | ||
// This target clones the existing NUCLEO_L452RE_P target without making | ||
// any changes other than an extra define. | ||
"L452RE_SIMPLE": { | ||
"inherits": ["NUCLEO_L452RE_P"], | ||
"macros_add": ["MY_CUSTOM_DEFINE=5"], | ||
"device_name": "STM32L452RETx" | ||
}, | ||
|
||
// This target extends MCU_STM32L452xE and defines a custom pinmap. | ||
"L452RE_CUSTOM_PINMAP": { | ||
"inherits": ["MCU_STM32L452xE"], | ||
"device_name": "STM32L452RETx" | ||
}, | ||
|
||
// This target extends NUCLEO_L452RE_P and defines a custom clock configuration. | ||
"L452RE_CUSTOM_CLOCK": { | ||
"inherits": ["NUCLEO_L452RE_P"], | ||
"device_name": "STM32L452RETx" | ||
}, | ||
|
||
// This target extends NUCLEO_L452RE_P but remaps the memory for a different chip part number. | ||
// This assumes we are using the -C variant of the chip with half the flash space. | ||
"L452RC_CUSTOM_MEMORY_MAP": { | ||
"inherits": ["NUCLEO_L452RE_P"], | ||
|
||
// When using a MCU name whose data is not included with Mbed, it is mandatory to provide a | ||
// memory_banks section. This provides information about the RAM and flash banks to Mbed. | ||
// Also note that you should NOT specify a device_name, as that is only used for Mbed-internal targets | ||
// to fetch the memory bank information. | ||
"memory_banks": { | ||
|
||
// Internal flash bank. Size 256k, start address 0x08000000 | ||
"IROM1": { | ||
"access": { | ||
"execute": true, | ||
"non_secure": false, | ||
"non_secure_callable": false, | ||
"peripheral": false, | ||
"read": true, | ||
"secure": false, | ||
"write": false | ||
}, | ||
"default": true, | ||
"size": 0x40000, | ||
"start": 0x08000000, | ||
"startup": true | ||
}, | ||
|
||
// Internal RAM bank 1. Size 128k, start address 0x20000000. | ||
// Note: Important to list this one first, because the bank listed first will become bank 0, and this | ||
// target has a legacy linker script that expects that this bank is bank 0 instead of requesting it by name. | ||
"IRAM1": { | ||
"access": { | ||
"execute": false, | ||
"non_secure": false, | ||
"non_secure_callable": false, | ||
"peripheral": false, | ||
"read": true, | ||
"secure": false, | ||
"write": true | ||
}, | ||
"default": true, | ||
"size": 0x20000, | ||
"start": 0x20000000, | ||
"startup": false | ||
}, | ||
|
||
// Internal RAM bank 2. Size 32k, start address 0x10000000 (though it is also aliased at 0x20020000). | ||
"IRAM2": { | ||
"access": { | ||
"execute": false, | ||
"non_secure": false, | ||
"non_secure_callable": false, | ||
"peripheral": false, | ||
"read": true, | ||
"secure": false, | ||
"write": true | ||
}, | ||
"default": false, | ||
"size": 0x8000, | ||
"start": 0x10000000, | ||
"startup": false | ||
} | ||
} | ||
} | ||
} | ||
} |
Submodule mbed-os
updated
1885 files