Skip to content

Commit 40e3056

Browse files
author
Jamie Smith
authored
Unify MAX32625 targets (#327)
1 parent 232d767 commit 40e3056

File tree

9 files changed

+21
-238
lines changed

9 files changed

+21
-238
lines changed

targets/TARGET_Maxim/TARGET_MAX32625/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
add_subdirectory(TARGET_MAX32625MBED EXCLUDE_FROM_ALL)
55
add_subdirectory(TARGET_MAX32625PICO EXCLUDE_FROM_ALL)
66
add_subdirectory(TARGET_SDT32625B EXCLUDE_FROM_ALL)
7-
add_subdirectory(device EXCLUDE_FROM_ALL)
87

9-
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
10-
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_MAX32625.S)
11-
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
129
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_max32625.S)
10+
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/max32625.ld)
1311
endif()
1412

1513
add_library(mbed-max32625 INTERFACE)
@@ -71,4 +69,6 @@ target_sources(mbed-max32625
7169
${STARTUP_FILE}
7270
)
7371

72+
mbed_set_linker_script(mbed-max32625 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
73+
7474
target_link_libraries(mbed-max32625 INTERFACE mbed-maxim)

targets/TARGET_Maxim/TARGET_MAX32625/TARGET_MAX32625MBED/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ target_include_directories(mbed-max32625mbed
88
.
99
)
1010

11-
target_link_libraries(mbed-max32625mbed INTERFACE mbed-max32625 mbed-max32625-no-boot)
11+
target_link_libraries(mbed-max32625mbed INTERFACE mbed-max32625)

targets/TARGET_Maxim/TARGET_MAX32625/TARGET_MAX32625PICO/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ target_sources(mbed-max32625pico
1313
low_level_init.c
1414
)
1515

16-
target_link_libraries(mbed-max32625pico INTERFACE mbed-max32625 mbed-max32625-boot)
16+
target_link_libraries(mbed-max32625pico INTERFACE mbed-max32625)

targets/TARGET_Maxim/TARGET_MAX32625/TARGET_SDT32625B/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ target_include_directories(mbed-sdt32625b
88
.
99
)
1010

11-
target_link_libraries(mbed-sdt32625b INTERFACE mbed-max32625-no-boot)
11+
target_link_libraries(mbed-sdt32625b INTERFACE mbed-max32625)

targets/TARGET_Maxim/TARGET_MAX32625/device/CMakeLists.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

targets/TARGET_Maxim/TARGET_MAX32625/device/TOOLCHAIN_GCC_ARM/TARGET_MAX32625_BOOT/max32625.ld

Lines changed: 0 additions & 191 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ STACK_SIZE = MBED_CONF_TARGET_BOOT_STACK_SIZE;
3939

4040
MEMORY
4141
{
42-
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
43-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00028000
42+
FLASH (rx) : ORIGIN = MBED_CONFIGURED_ROM_BANK_IROM1_START, LENGTH = MBED_CONFIGURED_ROM_BANK_IROM1_SIZE
43+
RAM (rwx) : ORIGIN = MBED_CONFIGURED_RAM_BANK_IRAM1_START, LENGTH = MBED_CONFIGURED_RAM_BANK_IRAM1_SIZE
4444
}
4545

4646
/* Linker script to place sections and symbol values. Should be used together

targets/cmsis_mcu_descriptions.json5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,8 +2397,8 @@
23972397
"write": true
23982398
},
23992399
"default": true,
2400-
"size": 163840,
2401-
"start": 536870912,
2400+
"size": 0x28000,
2401+
"start": 0x20000000,
24022402
"startup": false
24032403
},
24042404
"IROM1": {
@@ -2412,7 +2412,7 @@
24122412
"write": false
24132413
},
24142414
"default": true,
2415-
"size": 524288,
2415+
"size": 0x80000,
24162416
"start": 0,
24172417
"startup": true
24182418
}

targets/targets.json5

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6463,9 +6463,6 @@
64636463
"inherits": [
64646464
"MAX32625_BASE"
64656465
],
6466-
"extra_labels_add": [
6467-
"MAX32625_NO_BOOT"
6468-
],
64696466
"detect_code": [
64706467
"0415"
64716468
],
@@ -6475,9 +6472,6 @@
64756472
"inherits": [
64766473
"MAX32625_BASE"
64776474
],
6478-
"extra_labels_add": [
6479-
"MAX32625_NO_BOOT"
6480-
],
64816475
"detect_code": [
64826476
"3102"
64836477
],
@@ -6487,10 +6481,16 @@
64876481
"inherits": [
64886482
"MAX32625_BASE"
64896483
],
6490-
"extra_labels_add": [
6491-
"MAX32625_BOOT"
6492-
],
64936484
"bootloader_supported": true,
6485+
6486+
// Reserve the first 64k of flash for the bootloader
6487+
"memory_bank_config": {
6488+
"IROM1": {
6489+
"start": 0x00010000,
6490+
"size": 0x00070000
6491+
}
6492+
},
6493+
64946494
"detect_code": [
64956495
"0444"
64966496
],

0 commit comments

Comments
 (0)