Skip to content

Commit

Permalink
Updated SAM MCUs
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Jun 17, 2024
1 parent 86cf15e commit 73b513b
Show file tree
Hide file tree
Showing 158 changed files with 51,872 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ARM/gcc_clang/cmake/coreUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ function(set_flags flags)
elseif (${CORE_NAME} STREQUAL "M3")
set(${flags} -std=gnu99 -Wl,-Map=output.map,-gc-sections,--print-memory-usage -mcpu=cortex-m3 -mthumb --specs=nosys.specs -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration PARENT_SCOPE)
elseif (${CORE_NAME} STREQUAL "M4")
set(${flags} -std=gnu99 -Wl,-Map=output.map,-gc-sections,--print-memory-usage -mcpu=cortex-m4 -mthumb --specs=nosys.specs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration PARENT_SCOPE)else
if (${CORE_NAME} STREQUAL "M4EF")
set(${flags} -std=gnu99 -Wl,-Map=output.map,-gc-sections,--print-memory-usage -mcpu=cortex-m4 -mthumb --specs=nosys.specs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration PARENT_SCOPE)
elseif (${CORE_NAME} STREQUAL "M4EF")
set(${flags} -std=gnu99 -Wl,-Map=output.map,-gc-sections,--print-memory-usage -mcpu=cortex-m4 -mthumb --specs=nosys.specs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration PARENT_SCOPE)
elseif (${CORE_NAME} STREQUAL "M4DSP")
set(${flags} -std=gnu99 -Wl,-Map=output.map,-gc-sections,--print-memory-usage -mcpu=cortex-m4 -mthumb --specs=nosys.specs -mfloat-abi=soft -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration PARENT_SCOPE)
Expand Down
3 changes: 1 addition & 2 deletions ARM/gcc_clang/cmake/sam/atsamc20_21.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
if(${MCU_NAME} MATCHES "^ATSAMC20E15A$|^ATSAMC20E16A$|^ATSAMC20E17A$|^ATSAMC20E18A$|^ATSAMC20G15A$|^ATSAMC20G16A$|^ATSAMC20G17A$|^ATSAMC20G18A$|^ATSAMC20J15A$|^ATSAMC20J16A$|^ATSAMC20J17A$|^ATSAMC20J18A$|^ATSAMC20N17A$|^ATSAMC20N18A$|^ATSAMC21E15A$|^ATSAMC21E16A$|^ATSAMC21E17A$|^ATSAMC21E18A$|^ATSAMC21G15A$|^ATSAMC21G16A$|^ATSAMC21G17A$|^ATSAMC21G18A$|^ATSAMC21J15A$|^ATSAMC21J16A$|^ATSAMC21J17A$|^ATSAMC21J18A$|^ATSAMC21N17A$|^ATSAMC21N18A")
if(${MCU_NAME} MATCHES "^ATSAMC20E15A$|^ATSAMC20E16A$|^ATSAMC20E17A$|^ATSAMC20E18A$|^ATSAMC20G15A$|^ATSAMC20G16A$|^ATSAMC20G17A$|^ATSAMC20G18A$|^ATSAMC20J15A$|^ATSAMC20J16A$|^ATSAMC20J17A$|^ATSAMC20J18A$|^ATSAMC21E15A$|^ATSAMC21E16A$|^ATSAMC21E17A$|^ATSAMC21E18A$|^ATSAMC21G15A$|^ATSAMC21G16A$|^ATSAMC21G17A$|^ATSAMC21G18A$|^ATSAMC21J15A$|^ATSAMC21J16A$|^ATSAMC21J17A$|^ATSAMC21J18A$")
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/atsamc20_21/system_samc20_21.c)
list(APPEND local_list_include common/syscalls.c)
list(APPEND local_dir_install system/src/sam/atsamc20_21/thirdparty/${MCU_NAME_FIRST_8_LOWER})
set(${thirdpartyInstall} atsamc20_21/thirdparty/${MCU_NAME_FIRST_8_LOWER} PARENT_SCOPE)
endif()

8 changes: 8 additions & 0 deletions ARM/gcc_clang/cmake/sam/atsamc20n_21n.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if(${MCU_NAME} MATCHES "^ATSAMC20N17A$|^ATSAMC20N18A$|^ATSAMC21N17A$|^ATSAMC21N18A$")
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/atsamc20n_21n/system_samc20n_21n.c)
list(APPEND local_list_include common/syscalls.c)
list(APPEND local_dir_install system/src/sam/atsamc20n_21n/thirdparty/${MCU_NAME_FIRST_8_LOWER})
set(${thirdpartyInstall} atsamc20n_21n/thirdparty/${MCU_NAME_FIRST_8_LOWER} PARENT_SCOPE)
endif()
2 changes: 1 addition & 1 deletion ARM/gcc_clang/cmake/sam/delays/atsamc20_21.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if(${MCU_NAME} MATCHES "^ATSAMC20E15A$|^ATSAMC20E16A$|^ATSAMC20E17A$|^ATSAMC20E18A$|^ATSAMC20G15A$|^ATSAMC20G16A$|^ATSAMC20G17A$|^ATSAMC20G18A$|^ATSAMC20J15A$|^ATSAMC20J16A$|^ATSAMC20J17A$|^ATSAMC20J18A$|^ATSAMC20N17A$|^ATSAMC20N18A$|^ATSAMC21E15A$|^ATSAMC21E16A$|^ATSAMC21E17A$|^ATSAMC21E18A$|^ATSAMC21G15A$|^ATSAMC21G16A$|^ATSAMC21G17A$|^ATSAMC21G18A$|^ATSAMC21J15A$|^ATSAMC21J16A$|^ATSAMC21J17A$|^ATSAMC21J18A$|^ATSAMC21N17A$|^ATSAMC21N18A$")
if(${MCU_NAME} MATCHES "^ATSAMC20E15A$|^ATSAMC20E16A$|^ATSAMC20E17A$|^ATSAMC20E18A$|^ATSAMC20G15A$|^ATSAMC20G16A$|^ATSAMC20G17A$|^ATSAMC20G18A$|^ATSAMC20J15A$|^ATSAMC20J16A$|^ATSAMC20J17A$|^ATSAMC20J18A$|^ATSAMC21E15A$|^ATSAMC21E16A$|^ATSAMC21E17A$|^ATSAMC21E18A$|^ATSAMC21G15A$|^ATSAMC21G16A$|^ATSAMC21G17A$|^ATSAMC21G18A$|^ATSAMC21J15A$|^ATSAMC21J16A$|^ATSAMC21J17A$|^ATSAMC21J18A$")
list(APPEND local_list_macros "getClockValue(_clock) (_clock/1000UL/4)")
endif()
3 changes: 3 additions & 0 deletions ARM/gcc_clang/cmake/sam/delays/atsamc20n_21n.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(${MCU_NAME} MATCHES "^ATSAMC20N17A$|^ATSAMC20N18A$|^ATSAMC21N17A$|^ATSAMC21N18A$")
list(APPEND local_list_macros "getClockValue(_clock) (_clock/1000UL/4)")
endif()
Loading

0 comments on commit 73b513b

Please sign in to comment.