boards/arm/sam34: CMake added boards

CMake added boards:

  - arduino-due

 - flipnclick-sam3x

 - sam3u-ek

 - sam4cmp-db

 - sam4e-ek

 - sam4l-xplained

 - sam4s-xplained

 - sam4s-xplained-pro

Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
simbit18
2026-02-12 15:42:10 +01:00
committed by Alan C. Assis
parent bd699a47af
commit d0417490d2
16 changed files with 590 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# ##############################################################################
# boards/arm/sam34/arduino-due/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)

View File

@@ -0,0 +1,59 @@
# ##############################################################################
# boards/arm/sam34/arduino-due/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c sam_bringup.c)
if(CONFIG_ARCH_LEDS)
list(APPEND SRCS sam_autoleds.c)
else()
list(APPEND SRCS sam_userleds.c)
endif()
if(CONFIG_ARDUINO_ITHEAD_TFT)
if(CONFIG_SPI_BITBANG)
if(CONFIG_MMCSD_SPI)
list(APPEND SRCS sam_mmcsd.c)
endif()
if(CONFIG_INPUT_ADS7843E)
list(APPEND SRCS sam_touchscreen.c)
endif()
endif()
if(CONFIG_LCD)
list(APPEND SRCS sam_lcd.c)
endif()
endif()
if(CONFIG_BOARDCTL)
list(APPEND SRCS sam_appinit.c)
endif()
if(CONFIG_SAM34_SPI0)
list(APPEND SRCS sam_spidev.c)
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT
"${NUTTX_BOARD_DIR}/scripts/arduino-due.ld")

View File

@@ -0,0 +1,23 @@
# ##############################################################################
# boards/arm/sam34/flipnclick-sam3x/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)

View File

@@ -0,0 +1,45 @@
# ##############################################################################
# boards/arm/sam34/flipnclick-sam3x/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c sam_bringup.c)
if(CONFIG_ARCH_LEDS)
list(APPEND SRCS sam_autoleds.c)
else()
list(APPEND SRCS sam_userleds.c)
endif()
if(CONFIG_BOARDCTL)
list(APPEND SRCS sam_appinit.c)
endif()
if(CONFIG_SAM34_SPI0)
list(APPEND SRCS sam_spi0.c)
endif()
if(CONFIG_FLIPNCLICK_SAM3X_SSD1306)
list(APPEND SRCS sam_ssd1306.c)
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")

View File

@@ -0,0 +1,30 @@
# ##############################################################################
# boards/arm/sam34/sam3u-ek/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)
if(NOT CONFIG_BUILD_FLAT)
add_subdirectory(kernel)
set_property(
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
endif()

View File

@@ -0,0 +1,47 @@
# ##############################################################################
# boards/arm/sam34/sam3u-ek/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c sam_leds.c sam_buttons.c sam_spi.c sam_usbdev.c)
if(CONFIG_LCD)
list(APPEND SRCS sam_lcd.c)
endif()
if(CONFIG_BOARDCTL)
list(APPEND SRCS sam_appinit.c)
endif()
if(CONFIG_SAM34_HSMCI)
list(APPEND SRCS sam_mmcsd.c)
endif()
if(CONFIG_USBMSC)
list(APPEND SRCS sam_usbmsc.c)
endif()
if(CONFIG_INPUT_ADS7843E)
list(APPEND SRCS sam_touchscreen.c)
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")

View File

@@ -0,0 +1,23 @@
# ##############################################################################
# boards/arm/sam34/sam4cmp-db/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)

View File

@@ -0,0 +1,34 @@
# ##############################################################################
# boards/arm/sam34/sam4cmp-db/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS sam_appinit.c sam_bringup.c)
elseif(CONFIG_BOARD_LATE_INITIALIZE)
list(APPEND SRCS sam_bringup.c)
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT
"${NUTTX_BOARD_DIR}/scripts/sam4cmp-db.ld")

View File

@@ -0,0 +1,23 @@
# ##############################################################################
# boards/arm/sam34/sam4e-ek/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)

View File

@@ -0,0 +1,64 @@
# ##############################################################################
# boards/arm/sam34/sam4e-ek/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c sam_leds.c sam_buttons.c sam_udp.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS sam_appinit.c)
endif()
if(CONFIG_SAM34_HSMCI)
list(APPEND SRCS sam_hsmci.c)
endif()
if(CONFIG_LCD)
if(CONFIG_SAM4EEK_LCD_ILI9325)
list(APPEND SRCS sam_ili9325.c)
else()
if(CONFIG_SAM4EEK_LCD_ILI9341)
list(APPEND SRCS sam_ili9341.c)
endif()
endif()
endif()
if(CONFIG_SAM34_EMAC)
list(APPEND SRCS sam_ethernet.c)
endif()
if(CONFIG_INPUT_ADS7843E)
list(APPEND SRCS sam_ads7843e.c)
endif()
if(CONFIG_SAM34_SPI0)
list(APPEND SRCS sam_spi.c)
if(CONFIG_MTD_AT25)
list(APPEND SRCS sam_at25.c)
endif()
endif()
if(CONFIG_USBMSC)
list(APPEND SRCS sam_usbmsc.c)
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")

View File

@@ -0,0 +1,23 @@
# ##############################################################################
# boards/arm/sam34/sam4l-xplained/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)

View File

@@ -0,0 +1,66 @@
# ##############################################################################
# boards/arm/sam34/sam4l-xplained/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c)
if(CONFIG_SAM34_SPI0)
list(APPEND SRCS sam_spi.c)
endif()
if(CONFIG_ARCH_LEDS)
list(APPEND SRCS sam_autoleds.c)
else()
list(APPEND SRCS sam_userleds.c)
endif()
if(CONFIG_ARCH_BUTTONS)
list(APPEND SRCS sam_buttons.c)
endif()
if(CONFIG_BOARDCTL)
list(APPEND SRCS sam_appinit.c)
endif()
if(CONFIG_SAM34_LCDCA)
if(CONFIG_SAM4L_XPLAINED_SLCD1MODULE)
list(APPEND SRCS sam_slcd.c)
endif()
endif()
if(CONFIG_SAM34_SPI0)
if(CONFIG_SAM4L_XPLAINED_IOMODULE)
list(APPEND SRCS sam_mmcsd.c)
endif()
endif()
if(CONFIG_SAM34_SPI0)
if(CONFIG_SAM4L_XPLAINED_OLED1MODULE)
if(CONFIG_LCD_UG2832HSWEG04)
list(APPEND SRCS sam_ug2832hsweg04.c)
endif()
endif()
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT
"${NUTTX_BOARD_DIR}/scripts/sam4l-xplained.ld")

View File

@@ -0,0 +1,23 @@
# ##############################################################################
# boards/arm/sam34/sam4s-xplained/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)

View File

@@ -0,0 +1,42 @@
# ##############################################################################
# boards/arm/sam34/sam4s-xplained/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c)
if(CONFIG_SAM34_EXTSRAM0)
list(APPEND SRCS sam_sram.c)
endif()
if(CONFIG_ARCH_LEDS)
list(APPEND SRCS sam_autoleds.c)
else()
list(APPEND SRCS sam_userleds.c)
endif()
if(CONFIG_ARCH_BUTTONS)
list(APPEND SRCS sam_buttons.c)
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT
"${NUTTX_BOARD_DIR}/scripts/sam4s-xplained.ld")

View File

@@ -0,0 +1,23 @@
# ##############################################################################
# boards/arm/sam34/sam4s-xplained/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
add_subdirectory(src)

View File

@@ -0,0 +1,42 @@
# ##############################################################################
# boards/arm/sam34/sam4s-xplained/src/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
set(SRCS sam_boot.c)
if(CONFIG_SAM34_EXTSRAM0)
list(APPEND SRCS sam_sram.c)
endif()
if(CONFIG_ARCH_LEDS)
list(APPEND SRCS sam_autoleds.c)
else()
list(APPEND SRCS sam_userleds.c)
endif()
if(CONFIG_ARCH_BUTTONS)
list(APPEND SRCS sam_buttons.c)
endif()
target_sources(board PRIVATE ${SRCS})
set_property(GLOBAL PROPERTY LD_SCRIPT
"${NUTTX_BOARD_DIR}/scripts/sam4s-xplained.ld")