Skip to content

Commit 1518c8c

Browse files
committed
rename family to simply maxim, rename old family, add all boards
rename max32 to msdk
1 parent 529e62b commit 1518c8c

File tree

98 files changed

+100
-4409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+100
-4409
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ jobs:
8383
matrix:
8484
port:
8585
# Alphabetical order by family
86+
- 'maxim'
8687
# - 'stm32f303disco' # overflows flash
87-
- 'max32690'
8888
- 'stm32f4'
8989
- 'stm32h5'
9090
with:

ports/family_support.cmake

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,17 @@ function(family_flash_openocd TARGET)
301301
set(OPENOCD_OPTION2 "")
302302
endif ()
303303

304+
if (DEFINED OPENOCD_SERIAL)
305+
set(OPENOCD_OPTION "-c \"adapter serial ${OPENOCD_SERIAL}\" ${OPENOCD_OPTION}")
306+
endif ()
307+
304308
separate_arguments(OPTION_LIST UNIX_COMMAND ${OPENOCD_OPTION})
305309
separate_arguments(OPTION_LIST2 UNIX_COMMAND ${OPENOCD_OPTION2})
306310

307311
# note skip verify since it has issue with rp2040
308312
add_custom_target(${TARGET}-openocd
309313
DEPENDS ${TARGET}
310-
COMMAND ${OPENOCD} ${OPTION_LIST} -c "program $<TARGET_FILE:${TARGET}> reset" ${OPTION_LIST2} -c exit
314+
COMMAND ${OPENOCD} -c "tcl_port disabled; gdb_port disabled" ${OPTION_LIST} -c "init; halt; program $<TARGET_FILE:${TARGET}>" -c reset ${OPTION_LIST2} -c exit
311315
VERBATIM
312316
)
313317
endfunction()
@@ -323,6 +327,26 @@ function(family_flash_openocd_wch TARGET)
323327
endfunction()
324328

325329

330+
# Add flash openocd adi (Analog Devices) target
331+
# included with msdk or compiled from release branch of https://github.com/analogdevicesinc/openocd
332+
function(family_flash_openocd_adi TARGET)
333+
if (DEFINED $ENV{MAXIM_PATH})
334+
# use openocd from msdk
335+
set(OPENOCD ENV{MAXIM_PATH}/Tools/OpenOCD/openocd)
336+
set(OPENOCD_OPTION2 "-s $ENV{MAXIM_PATH}/Tools/OpenOCD/scripts")
337+
else()
338+
# compiled from source
339+
if (NOT DEFINED OPENOCD_ADI_PATH)
340+
set(OPENOCD_ADI_PATH $ENV{HOME}/app/openocd_adi)
341+
endif ()
342+
set(OPENOCD ${OPENOCD_ADI_PATH}/src/openocd)
343+
set(OPENOCD_OPTION2 "-s ${OPENOCD_ADI_PATH}/tcl")
344+
endif ()
345+
346+
family_flash_openocd(${TARGET})
347+
endfunction()
348+
349+
326350
# Flash with UF2
327351
function(family_flash_uf2 TARGET FAMILY_ID)
328352
add_custom_target(${TARGET}-uf2

0 commit comments

Comments
 (0)