Skip to content

Commit

Permalink
Merge branch 'main' into feat/usn-pkg-type
Browse files Browse the repository at this point in the history
  • Loading branch information
EricB-ADI authored Jan 13, 2025
2 parents 63dc004 + c316b83 commit c96f2cf
Show file tree
Hide file tree
Showing 865 changed files with 64,521 additions and 18,606 deletions.
14 changes: 12 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#
# Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
# Analog Devices, Inc.),
# Copyright (C) 2023-2024 Analog Devices, Inc. All Rights Reserved. This software
# is proprietary to Analog Devices, Inc. and its licensors.
# Copyright (C) 2023-2024 Analog Devices, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -73,6 +72,14 @@
- '**/Libraries/PeriphDrivers/max32655_files.mk'
- '**/Libraries/PeriphDrivers/Include/MAX32655/**/*'

'MAX32657':
- '**/Examples/MAX32657/**/*'
- '**/*me30*.*'
- '**/Libraries/Boards/MAX32657/**/*'
- '**/Libraries/CMSIS/Device/Maxim/MAX32657/**/*'
- '**/Libraries/PeriphDrivers/max32657_files.mk'
- '**/Libraries/PeriphDrivers/Include/MAX32657/**/*'

'MAX32660':
- '**/Examples/MAX32660/**/*'
- '**/*me11*.*'
Expand Down Expand Up @@ -221,3 +228,6 @@
'Workflow':
- '**/.github/workflows/**/*'
- '**/.github/**/*'

'Zephyr':
- '**/Libraries/zephyr/**/*'
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Skip autogenerated register files and internal use board files
FILTER_REGEX_EXCLUDE: (.*\/Libraries\/CMSIS\/Device\/Maxim\/.*\/Include\/partition_.*\.h)|(.*\/Libraries\/((CMSIS\/Device\/Maxim\/[^\/]*\/Include)|(PeriphDrivers\/Source\/[^\/]*))\/[^\/]*_regs\.h)|(.*\/Libraries\/Boards\/[^\/]*\/(BCB|Emulator|Simulation|ROM)[^\/]*\/.*)|(.*\/Examples\/[^\/]*\/Display\/lvgl-8\.0\.2\/.*)|(.*\/Examples\/[^\/]*\/Demo\/lv_conf.h)|(.*\/Libraries\/CMSIS\/5.9.0\/.*)|(.*\/Libraries\/CMSIS\/Include\/.*)|(.*\/Libraries\/Cordio\/.*)|(.*\/Libraries\/SDHC\/.*)|(.*\/Libraries\/lwIP\/.*)|(.*\/Examples\/[^\/]*\/CNN\/.*)|(.*\/Libraries\/tinyusb\/.*)|(.*\/Libraries\/CMSIS\/5\.9\.0\/DSP\/.*)|(.*\/Libraries\/CMSIS\/Device\/Maxim\/MAX32657\/Source\/Template\/.*)|(.*\/partition_.*\.h)
FILTER_REGEX_EXCLUDE: (.*\/Libraries\/Unity\/.*)|(.*\/Libraries\/CMSIS\/Device\/Maxim\/.*\/Include\/partition_.*\.h)|(.*\/Libraries\/((CMSIS\/Device\/Maxim\/[^\/]*\/Include)|(PeriphDrivers\/Source\/[^\/]*))\/[^\/]*_regs\.h)|(.*\/Libraries\/Boards\/[^\/]*\/(BCB|Emulator|Simulation|ROM)[^\/]*\/.*)|(.*\/Examples\/[^\/]*\/Display\/lvgl-8\.0\.2\/.*)|(.*\/Examples\/[^\/]*\/Demo\/lv_conf.h)|(.*\/Libraries\/CMSIS\/5.9.0\/.*)|(.*\/Libraries\/CMSIS\/Include\/.*)|(.*\/Libraries\/Cordio\/.*)|(.*\/Libraries\/SDHC\/.*)|(.*\/Libraries\/lwIP\/.*)|(.*\/Examples\/[^\/]*\/CNN\/.*)|(.*\/Libraries\/tinyusb\/.*)|(.*\/Libraries\/CMSIS\/5\.9\.0\/DSP\/.*)|(.*\/Libraries\/CMSIS\/Device\/Maxim\/MAX32657\/Source\/Template\/.*)|(.*\/partition_.*\.h)

# Explicity turn off all linters except CPP
# SuperLinter Documentation says all we need to do is turn on the ones we want
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/scripts/zephyr-hal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ rm -rf ${hal_adi}/MAX/

# Create parent folder
mkdir -p ${hal_adi}/MAX/Libraries/CMSIS
mkdir -p ${hal_adi}/MAX/Libraries/MAXUSB/include
mkdir -p ${hal_adi}/MAX/Libraries/MAXUSB/src
mkdir -p ${hal_adi}/MAX/Libraries/PeriphDrivers

# Copy zephyr wrappers, system files and cmakefiles
Expand All @@ -38,11 +40,19 @@ cp -rf ${msdk}/Libraries/CMSIS/Include ${hal_adi}/MAX/Libraries/CMSIS/
cp -rf ${msdk}/Libraries/PeriphDrivers/Include ${hal_adi}/MAX/Libraries/PeriphDrivers/
cp -rf ${msdk}/Libraries/PeriphDrivers/Source ${hal_adi}/MAX/Libraries/PeriphDrivers/

# Copy MAXUSB folder
cp -rf ${msdk}/Libraries/MAXUSB/include/core ${hal_adi}/MAX/Libraries/MAXUSB/include/
cp -rf ${msdk}/Libraries/MAXUSB/src/core ${hal_adi}/MAX/Libraries/MAXUSB/src/

# Remove unneeded files
rm -rf ${hal_adi}/MAX/Libraries/CMSIS/Device/Maxim/GCC
rm -rf ${hal_adi}/MAX/Libraries/CMSIS/Device/Maxim/MAX*/Source/IAR
rm -rf ${hal_adi}/MAX/Libraries/CMSIS/Device/Maxim/MAX*/Source/GCC
rm -rf ${hal_adi}/MAX/Libraries/CMSIS/Device/Maxim/MAX*/Source/ARM
rm -rf ${hal_adi}/MAX/Libraries/MAXUSB/include/core/arm
rm -rf ${hal_adi}/MAX/Libraries/MAXUSB/include/core/maxq
rm -rf ${hal_adi}/MAX/Libraries/MAXUSB/src/core/arm
rm -rf ${hal_adi}/MAX/Libraries/MAXUSB/src/core/maxq

# Check either dirty or clean
cd ${hal_adi}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Examples/*/*/build
Examples/**/build
Examples/*/*/buildrv
Examples/*/*/*/build
Examples/*/*/*/buildrv
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/USB/MAXUSB/USB_CDCACM/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/USB/MAXUSB/USB_HIDKeyboard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/USB/MAXUSB/USB_MassStorage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/USB/TinyUSB/cdc_msc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/USB/TinyUSB/cdc_msc_freertos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/USB/TinyUSB/hid_composite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32650/USB/TinyUSB/msc_dual_lun/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $(info Loaded project.mk)

ifeq "$(MAXIM_PATH)" ""
# MAXIM_PATH is still not defined...
DEPTH := ../../../../
DEPTH := ../../../../../
MAXIM_PATH := $(abspath $(DEPTH))
$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32655/Bluetooth/BLE_FreeRTOS/freertos_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
/* Determine if we need to snapshot the PalBb clock */
if (schTimerActive) {
/* Snapshot the current WUT value with the PalBb clock */
MXC_WUT_Store(MXC_WUT0);
MXC_WUT_StoreCount(MXC_WUT0);
preCapture = MXC_WUT_GetCount(MXC_WUT0);
schUsec = PalTimerGetExpTime();

Expand All @@ -176,7 +176,7 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
}
} else {
/* Snapshot the current WUT value */
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);
preCapture = MXC_WUT_GetCount(MXC_WUT0);
bleSleepTicks = 0;
schUsec = 0;
Expand Down Expand Up @@ -239,7 +239,7 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
}

/* Recalculate dsWutTicks for the FreeRTOS tick counter update */
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);
postCapture = MXC_WUT_GetCount(MXC_WUT0);
dsWutTicks = postCapture - preCapture;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
/* Determine if we need to snapshot the PalBb clock */
if (schTimerActive) {
/* Snapshot the current WUT value with the PalBb clock */
MXC_WUT_Store(MXC_WUT0);
MXC_WUT_StoreCount(MXC_WUT0);
preCapture = MXC_WUT_GetCount(MXC_WUT0);
schUsec = PalTimerGetExpTime();

Expand All @@ -176,7 +176,7 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
}
} else {
/* Snapshot the current WUT value */
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);
preCapture = MXC_WUT_GetCount(MXC_WUT0);
bleSleepTicks = 0;
schUsec = 0;
Expand Down Expand Up @@ -238,7 +238,7 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
}

/* Recalculate dsWutTicks for the FreeRTOS tick counter update */
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);
postCapture = MXC_WUT_GetCount(MXC_WUT0);
dsWutTicks = postCapture - preCapture;

Expand Down
4 changes: 2 additions & 2 deletions Examples/MAX32655/Bluetooth/RF_Test/freertos_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
MXC_GPIO_OutSet(uart_rts.port, uart_rts.mask);

/* Snapshot the current WUT value */
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);
pre_capture = MXC_WUT_GetCount(MXC_WUT0);
MXC_WUT_SetCompare(MXC_WUT0, pre_capture + wut_ticks);
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);

LED_Off(1);

Expand Down
4 changes: 2 additions & 2 deletions Examples/MAX32655/FreeRTOSDemo/freertos_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime)
MXC_GPIO_OutSet(uart_rts.port, uart_rts.mask);

/* Snapshot the current WUT value */
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);
pre_capture = MXC_WUT_GetCount(MXC_WUT0);
MXC_WUT_SetCompare(MXC_WUT0, pre_capture + wut_ticks);
MXC_WUT_Edge(MXC_WUT0);
MXC_WUT_WaitForEdge(MXC_WUT0);

LED_Off(1);

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32655/FreeRTOSDemo/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int freertos_permit_tickless(void)
*/
void WUT_IRQHandler(void)
{
MXC_WUT_IntClear(MXC_WUT0);
MXC_WUT_ClearFlags(MXC_WUT0);
NVIC_ClearPendingIRQ(WUT_IRQn);
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/MAX32655/WUT/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

void WUT_IRQHandler(void)
{
MXC_WUT_IntClear(MXC_WUT0);
MXC_WUT_ClearFlags(MXC_WUT0);
}

// *****************************************************************************
Expand Down
50 changes: 0 additions & 50 deletions Examples/MAX32657/Bluetooth/BLE5_ctr/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,56 +78,6 @@
{ "text":"set $pc=Reset_Handler"},
{ "text":"b main" }
]
},
{
"name": "GDB (RISC-V)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/buildrv/${config:program_file}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"linux": {
"miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb",
"debugServerPath": "${config:OCD_path}/openocd",
},
"windows": {
"miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb.exe",
"debugServerPath": "${config:OCD_path}/openocd.exe",
},
"osx": {
"miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb",
"debugServerPath": "${config:OCD_path}/bin/openocd",
},
"logging": {
"exceptions": true,
"trace": false,
"traceResponse": false,
"engineLogging": false
},
"miDebuggerServerAddress": "localhost:3334",
"debugServerArgs": "-c \"gdb_port 3334\" -s ${config:OCD_path}/scripts -f interface/${config:RV_OCD_interface_file} -f target/${config:RV_OCD_target_file}",
"serverStarted": "Info : Listening on port 3334 for gdb connections",
"filterStderr": true,
"customLaunchSetupCommands": [
{"text":"-list-features"}
],
"targetArchitecture": "arm",
"setupCommands": [
{ "text":"set logging overwrite on"},
{ "text":"set logging file debug-riscv.log"},
{ "text":"set logging on"},
{ "text":"cd ${workspaceFolder}" },
{ "text": "set architecture riscv:rv32", "ignoreFailures": false },
{ "text":"exec-file build/${config:program_file}", "ignoreFailures": false },
{ "text":"symbol-file buildrv/${config:symbol_file}", "ignoreFailures": false },
{ "text":"target remote localhost:3334" },
{ "text":"b main" },
{ "text": "set $pc=Reset_Handler","ignoreFailures": false }
]
}
]
}
5 changes: 3 additions & 2 deletions Examples/MAX32657/Bluetooth/BLE5_ctr/project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
LIB_CORDIO = 1

CORDIO_DIR = $(LIBS_DIR)/Packetcraft-ADI
RF_PHY_DIR = $(LIBS_DIR)/RF-PHY
LIB_PHY_DIR ?= $(LIBS_DIR)/RF-PHY

# Cordio library options
BLE_HOST = 0
Expand All @@ -37,4 +37,5 @@ BLE_CONTROLLER = 1
# TRACE option
# Set to 0 to disable
# Set to 2 to enable serial port trace messages
TRACE = 2
TRACE = 0
DEBUG = 1
50 changes: 0 additions & 50 deletions Examples/MAX32657/Hello_World/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,56 +78,6 @@
{ "text":"set $pc=Reset_Handler"},
{ "text":"b main" }
]
},
{
"name": "GDB (RISC-V)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/buildrv/${config:program_file}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"linux": {
"miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb",
"debugServerPath": "${config:OCD_path}/openocd",
},
"windows": {
"miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb.exe",
"debugServerPath": "${config:OCD_path}/openocd.exe",
},
"osx": {
"miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb",
"debugServerPath": "${config:OCD_path}/bin/openocd",
},
"logging": {
"exceptions": true,
"trace": false,
"traceResponse": false,
"engineLogging": false
},
"miDebuggerServerAddress": "localhost:3334",
"debugServerArgs": "-c \"gdb_port 3334\" -s ${config:OCD_path}/scripts -f interface/${config:RV_OCD_interface_file} -f target/${config:RV_OCD_target_file}",
"serverStarted": "Info : Listening on port 3334 for gdb connections",
"filterStderr": true,
"customLaunchSetupCommands": [
{"text":"-list-features"}
],
"targetArchitecture": "arm",
"setupCommands": [
{ "text":"set logging overwrite on"},
{ "text":"set logging file debug-riscv.log"},
{ "text":"set logging on"},
{ "text":"cd ${workspaceFolder}" },
{ "text": "set architecture riscv:rv32", "ignoreFailures": false },
{ "text":"exec-file build/${config:program_file}", "ignoreFailures": false },
{ "text":"symbol-file buildrv/${config:symbol_file}", "ignoreFailures": false },
{ "text":"target remote localhost:3334" },
{ "text":"b main" },
{ "text": "set $pc=Reset_Handler","ignoreFailures": false }
]
}
]
}
Loading

0 comments on commit c96f2cf

Please sign in to comment.