Skip to content

Commit

Permalink
Fix MAX32657 build issues
Browse files Browse the repository at this point in the history
- MXC_SYS_LockDAP_Permanent should be called only for secure mode
- Empty partition_max32657.h file added to it build on zephyr side as it is

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
  • Loading branch information
ozersa committed Sep 12, 2024
1 parent 71ad374 commit 69986bf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Libraries/PeriphDrivers/Source/SYS/sys_me30.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ void MXC_SYS_Reset_Periph(mxc_sys_reset_t reset)
}
}

#if CONFIG_TRUSTED_EXECUTION_SECURE
/* ************************************************************************** */
int MXC_SYS_LockDAP_Permanent(void)
{
Expand Down Expand Up @@ -542,5 +543,6 @@ int MXC_SYS_LockDAP_Permanent(void)
return err;
#endif
}
#endif

/**@} end of mxc_sys */
1 change: 1 addition & 0 deletions Libraries/zephyr/MAX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ set(MSDK_PERIPH_INC_DIR ${MSDK_PERIPH_DIR}/Include/${TARGET_UC})

zephyr_include_directories(
./Include
./Source/${TARGET_UC}
${MSDK_LIBRARY_DIR}/CMSIS/Include
${MSDK_CMSIS_DIR}/Include
${MSDK_PERIPH_INC_DIR}
Expand Down
27 changes: 27 additions & 0 deletions Libraries/zephyr/MAX/Source/MAX32657/partition_max32657.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/******************************************************************************
*
* Copyright (C) 2024 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/

#ifndef LIBRARIES_ZEPHYR_MAX_SOURCE_MAX32657_PARTITION_MAX32657_H_
#define LIBRARIES_ZEPHYR_MAX_SOURCE_MAX32657_PARTITION_MAX32657_H_

void TZ_SAU_Setup (void)
{
/* Added empty function to use MSDK file as it is */
}

#endif // LIBRARIES_ZEPHYR_MAX_SOURCE_MAX32657_PARTITION_MAX32657_H_

0 comments on commit 69986bf

Please sign in to comment.