Skip to content

Commit

Permalink
SAM packages checked.
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Jun 17, 2024
1 parent 8bf0af0 commit 7f96023
Show file tree
Hide file tree
Showing 53 changed files with 23 additions and 21 deletions.
2 changes: 2 additions & 0 deletions ARM/gcc_clang/cmake/coreUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ function(core_files_set fileListInclude fileDirInclude fileListInstall linkerScr
string(TOLOWER ${MCU_NAME} mcu_match)
string(SUBSTRING ${MCU_NAME} 0 8 MCU_NAME_FIRST_8)
string(TOLOWER ${MCU_NAME_FIRST_8} MCU_NAME_FIRST_8_LOWER)
string(SUBSTRING ${MCU_NAME} 0 6 MCU_NAME_FIRST_6)
string(TOLOWER ${MCU_NAME_FIRST_6} MCU_NAME_FIRST_6_LOWER)

file(GLOB_RECURSE CMAKE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${vendor}/*.cmake)
foreach(cmakeFile ${CMAKE_FILES})
Expand Down
17 changes: 0 additions & 17 deletions ARM/gcc_clang/cmake/sam/atsamg51.cmake

This file was deleted.

File renamed without changes.
17 changes: 17 additions & 0 deletions ARM/gcc_clang/cmake/sam/samg51.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if(${MCU_NAME} MATCHES "^SAMG51N18A$")
set(${linkerScript} linker_scripts/${vendor}/${mcu_match}.ld PARENT_SCOPE)
set(${startupFile} startup/${vendor}/${mcu_match}.c PARENT_SCOPE)
list(APPEND local_list_include system/src/sam/samg51/system_samg51n18.c)
list(APPEND local_list_include common/syscalls.c)
list(APPEND local_dir_install system/src/sam/samg51/thirdparty/${MCU_NAME_FIRST_6_LOWER})
set(${thirdpartyInstall} samg51/thirdparty/${MCU_NAME_FIRST_6_LOWER} PARENT_SCOPE)
endif()

if(${MCU_NAME} MATCHES "^SAMG51G18A$")
set(${linkerScript} linker_scripts/${vendor}/${mcu_match}.ld PARENT_SCOPE)
set(${startupFile} startup/${vendor}/${mcu_match}.c PARENT_SCOPE)
list(APPEND local_list_include system/src/sam/samg51/system_samg51g18.c)
list(APPEND local_list_include common/syscalls.c)
list(APPEND local_dir_install system/src/sam/samg51/thirdparty/${MCU_NAME_FIRST_6_LOWER})
set(${thirdpartyInstall} samg51/thirdparty/${MCU_NAME_FIRST_6_LOWER} PARENT_SCOPE)
endif()
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def parse_files_for_paths(cmake_files, source_dir, isGCC=None):
if isGCC and 'list(APPEND local_list_include' in line:

systemPath = line.split()[-1][:-1].replace("${vendor}", vendor)
if 'doc_ds' in systemPath:
if 'doc_ds' in systemPath or ('sam' in systemPath and re.search('^(at)?sam.+$', file_name)):
systemPath = os.path.dirname(systemPath)
systemPath = os.path.join(source_dir, systemPath)
paths[file_name]['files'].add(systemPath)
Expand Down Expand Up @@ -576,7 +576,7 @@ async def package_asset(source_dir, output_dir, arch, entry_name, token, repo, t
version = get_version_based_on_hash(archiveName, tag_name.replace("v", ""), archiveHash, current_metadata)
# Add to packages list
name_without_extension = os.path.splitext(os.path.basename(archiveName))[0]

packages.append({"name" : name_without_extension, "display_name": displayName, "version" : version, "hash" :archiveHash, "vendor" : "MIKROE", "type" : "mcu", "hidden" : False, 'install_location': install_location})
package_changed = (version == tag_name.replace("v", ""))

Expand Down Expand Up @@ -607,7 +607,7 @@ async def package_asset(source_dir, output_dir, arch, entry_name, token, repo, t
'package_changed': package_changed,
'install_location': install_location
}

resp = es.index(index=index_name, doc_type='necto_package', id=name_without_extension, body=doc)
print(f"INDEX RESPONSE: {resp}")

Expand Down Expand Up @@ -717,7 +717,7 @@ async def main(token, repo, tag_name):
# Exit if it fails 10 times, something is wrong with the server
raise ValueError("Connection to ES failed!")
num_of_retries += 1

time.sleep(30)
index_name = os.environ['ES_INDEX']

Expand Down

0 comments on commit 7f96023

Please sign in to comment.