Skip to content

Commit

Permalink
Merge pull request #5 from mercedes-benz/feat/ardep-release
Browse files Browse the repository at this point in the history
feat: release of ARDEP
  • Loading branch information
andlaus authored Nov 22, 2024
2 parents cad6292 + ac3d94e commit 16b2eeb
Show file tree
Hide file tree
Showing 324 changed files with 17,850 additions and 17 deletions.
65 changes: 65 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
BasedOnStyle: Google
BinPackParameters: false
BracedInitializerIndentWidth: 2

# Zephyr specific improvements
AttributeMacros:
- __aligned
- __deprecated
- __packed
- __printf_like
- __syscall
- __syscall_always_inline
- __subsystem
ForEachMacros:
- "FOR_EACH"
- "FOR_EACH_FIXED_ARG"
- "FOR_EACH_IDX"
- "FOR_EACH_IDX_FIXED_ARG"
- "FOR_EACH_NONEMPTY_TERM"
- "RB_FOR_EACH"
- "RB_FOR_EACH_CONTAINER"
- "SYS_DLIST_FOR_EACH_CONTAINER"
- "SYS_DLIST_FOR_EACH_CONTAINER_SAFE"
- "SYS_DLIST_FOR_EACH_NODE"
- "SYS_DLIST_FOR_EACH_NODE_SAFE"
- "SYS_SFLIST_FOR_EACH_CONTAINER"
- "SYS_SFLIST_FOR_EACH_CONTAINER_SAFE"
- "SYS_SFLIST_FOR_EACH_NODE"
- "SYS_SFLIST_FOR_EACH_NODE_SAFE"
- "SYS_SLIST_FOR_EACH_CONTAINER"
- "SYS_SLIST_FOR_EACH_CONTAINER_SAFE"
- "SYS_SLIST_FOR_EACH_NODE"
- "SYS_SLIST_FOR_EACH_NODE_SAFE"
- "_WAIT_Q_FOR_EACH"
- "Z_FOR_EACH"
- "Z_FOR_EACH_ENGINE"
- "Z_FOR_EACH_EXEC"
- "Z_FOR_EACH_FIXED_ARG"
- "Z_FOR_EACH_FIXED_ARG_EXEC"
- "Z_FOR_EACH_IDX"
- "Z_FOR_EACH_IDX_EXEC"
- "Z_FOR_EACH_IDX_FIXED_ARG"
- "Z_FOR_EACH_IDX_FIXED_ARG_EXEC"
- "Z_GENLIST_FOR_EACH_CONTAINER"
- "Z_GENLIST_FOR_EACH_CONTAINER_SAFE"
- "Z_GENLIST_FOR_EACH_NODE"
- "Z_GENLIST_FOR_EACH_NODE_SAFE"
- "STRUCT_SECTION_FOREACH"
- "TYPE_SECTION_FOREACH"
- "K_SPINLOCK"
IfMacros:
- "CHECKIF"
IncludeCategories:
- Regex: '^".*\.h"$'
Priority: 0
- Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|stdarg|stdbool|stddef|stdint|stdio|stdlib|string|tgmath|time|wchar|wctype)\.h>$'
Priority: 1
- Regex: '^\<zephyr/.*\.h\>$'
Priority: 2
- Regex: ".*"
Priority: 3
WhitespaceSensitiveMacros:
- STRINGIFY
- Z_STRINGIFY
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.zip filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
build:
runs-on: ubuntu-22.04
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2
env:
CMAKE_PREFIX_PATH: /opt/toolchains
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: zephyr-workspace/ardep

- name: Initialize
working-directory: zephyr-workspace/ardep
run: |
west init -l --mf ./west.yml .
west update -o=--depth=1 -n
- name: Build firmware examples
working-directory: zephyr-workspace/ardep
run: |
west twister -T samples -v --inline-logs --integration
- name: build bootloader
working-directory: zephyr-workspace/ardep
run: |
pip install -r scripts/requirements.txt
west ardep build-bootloader
36 changes: 36 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: documentation

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install sphinx dependencies dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser sphinx_copybutton
- name: Install doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen
- name: Build documentation
run: |
cd doc
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/_build/html/
force_orphan: true
18 changes: 18 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Pylint

on:
push:

jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Lint
working-directory: scripts
run: |
pip3 install -r requirements.txt
pip3 install pylint west
pylint --disable=R,C **/*.py
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# editors
.vscode
*.swp
*~

# python
.venv

# build
/build*
/twister-out*

__pycache__/

# documentation build output
doc/_build/
doc/_board/

# clangd cache
.cache
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) Frickly Systems GmbH
# Copyright (C) MBition GmbH
#
# SPDX-License-Identifier: Apache-2.0

# CMakeLists for the module

add_subdirectory(drivers)
add_subdirectory(lib)
zephyr_include_directories(include)

list(APPEND SYSCALL_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/include/ardep/drivers)
set(SYSCALL_INCLUDE_DIRS ${SYSCALL_INCLUDE_DIRS} PARENT_SCOPE)
8 changes: 8 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (C) Frickly Systems GmbH
# Copyright (C) MBition GmbH
#
# SPDX-License-Identifier: Apache-2.0


rsource "drivers/Kconfig"
rsource "lib/Kconfig"
67 changes: 50 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
# The Automotive Rapid Development Platform (ARDEP)
ARDEP - Automotive Rapid Development Platform
##############################################

This repository contains the Software and all Hardware design files
required for the Automotive Rapid DEvelopment Platform (ARDEP). ARDEP
is an open and flexible approach to implement the soft- and hardware
of new functionality for automotive and industrial projects quickly
and frictionlessly. ARDEP also provides a path to transform early
prototypes into volume produced hardware without any breaks in the
development path.
ARDEP is a powerful toolkit specifically designed for automotive developers based on the `Zephyr RTOS <https://www.zephyrproject.org/>`_.
It provides easy to use abstractions, features and tools to simplify the development process for automotive applications.

# Installation
Getting Started
===============

TODO:
See our documentation (TODO: insert link to github pages) for more information on how to use ARDEP.

- Provide info for how to get the ARDEP board and getting started with it
- (?) make the ARDEP software work with arduino-due (with limited
functionality)
Follow our Getting Started Guide (TODO: insert link to github pages) for a quick introduction

# Provider Information

Please visit [Provider
Information](https://github.com/mercedes-benz/foss/blob/master/PROVIDER_INFORMATION.md)
for information on the provider Mercedes-Benz Tech Innovation GmbH.
Create zephyr workspace
=======================

Create workspace from west.yml in this directory, e.g.


.. code-block:: console
# create a workspace
mkdir ardep-workspace
# clone this repo into workspace
cd ardep-workspace && git clone [email protected]:frickly-systems/ardep.git ardep
# init west workspace from west.yml
cd ardep && west init -l --mf ./west.yml .
# update workspace, fetches dependencies
west update
Development bootloader
======================

Per default if the board is selected we build images to be used by the bootloader.
Those images are not signed (without signature validation).


Build the bootloader
--------------------

It is recommendet to use the `ardep` subcommand of `west` to build the bootloader.

.. code-block:: console
west ardep build-bootloader
If you want to see the raw command, execute the above and look at the first lines of output. It should look something like this:

.. code-block:: console
west build --pristine auto --board ardep --build-dir build \
{...}/ardep-workspace/bootloader/mcuboot/boot/zephyr -- \
-DEXTRA_CONF_FILE={...}/ardep-workspace/ardep/boards/arm/ardep/mcuboot.conf \
-DEXTRA_DTC_OVERLAY_FILE={...}/ardep-workspace/ardep/boards/arm/ardep/mcuboot.overlay
11 changes: 11 additions & 0 deletions boards/arm/ardep/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (C) Frickly Systems GmbH
# Copyright (C) MBition GmbH
#
# SPDX-License-Identifier: Apache-2.0

# ARDEP Board configuration

config BOARD_ARDEP
bool "Automotive Rapid Development Platform (ARDEP)"
depends on SOC_STM32G474XX

45 changes: 45 additions & 0 deletions boards/arm/ardep/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (C) Frickly Systems GmbH
# Copyright (C) MBition GmbH
#
# SPDX-License-Identifier: Apache-2.0

# ARDEP board configuration

if BOARD_ARDEP

config BOARD
default "ardep"

config SPI_STM32_INTERRUPT
default y
depends on SPI

config CAN_TERMINATION_GPIO
default y if CAN

# adc 1 and 2 use the same, but the other use diffent interrupts
# shared interrupts currently seem to be broken for a mixed of shared
# and non-shared interrupts
config ADC_STM32_SHARED_IRQS
default n

config CAN_MAX_FILTER
default 8

rsource "Kconfig.usb"
rsource "Kconfig.usb_dfu"

if !MCUBOOT
# enable building for image slots
config BOOTLOADER_MCUBOOT
default y
config FLASH_MAP
default y

rsource "Kconfig.uds"

config MCUBOOT_SIGNATURE_KEY_FILE
default "bootloader/mcuboot/root-rsa-2048.pem"
endif # !MCUBOOT

endif # BOARD_ARDEP
28 changes: 28 additions & 0 deletions boards/arm/ardep/Kconfig.uds
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) Frickly Systems GmbH
# Copyright (C) MBition GmbH
#
# SPDX-License-Identifier: Apache-2.0

# enable UDS module per default

config UDS
default y
config CAN
default y
config ISOTP
default y

config FLASH
default y

config STREAM_FLASH
default y

config IMG_MANAGER
default y

config IMG_ERASE_PROGRESSIVELY
default y

config REBOOT
default y
28 changes: 28 additions & 0 deletions boards/arm/ardep/Kconfig.usb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) Frickly Systems GmbH
# Copyright (C) MBition GmbH
#
# SPDX-License-Identifier: Apache-2.0

# enable USB per default

config USB_DEVICE_STACK
default y

config USB_DEVICE_VID
default 0x25E1

config USB_DEVICE_PID
default 0x1B1E

config USB_DEVICE_INITIALIZE_AT_BOOT
default y if !MCUBOOT

config USB_DEVICE_PRODUCT
default "ARDEP Board"

config USB_CDC_ACM
default y

choice USB_CDC_ACM_LOG_LEVEL_CHOICE
default USB_CDC_ACM_LOG_LEVEL_OFF
endchoice
Loading

0 comments on commit 16b2eeb

Please sign in to comment.