Skip to content

Commit

Permalink
[DEV] Add RPi4 platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Graber authored and Sebastian Eckl committed Mar 15, 2024
1 parent fce5b23 commit 2051f9b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
49 changes: 49 additions & 0 deletions plat/rpi4/plat_nic.camkes
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Network API Test System, RPi4 board configuration
*
* Copyright (C) 2021, HENSOLDT Cyber GmbH
*/

#pragma once

#include "NIC_RPi4/NIC_RPi4.camkes"
NIC_RPi4_COMPONENT_DEFINE(NIC_RPi4, NIC_DRIVER_RINGBUFFER_SIZE)
NIC_RPi4_Mailbox_COMPONENT_DEFINE(NIC_RPi4_Mailbox)
NIC_RPi4_Genet_COMPONENT_DEFINE(NIC_RPi4_Genet)


#define NETWORK_TEST_NIC_INSTANCE(_nic_) \
component NIC_RPi4 _nic_; \
component NIC_RPi4_Mailbox nic_mailbox; \
component NIC_RPi4_Genet nic_genet; \
\
NIC_RPi4_INSTANCE_CONNECT( \
_nic_, \
nic_mailbox, \
nic_genet \
)

/* Macro used to configure the RPi4 driver component. It sets up a DMA pool
* of 1024 pages (4 KiB each)
*/
#define NETWORK_TEST_NIC_CONFIG(_nic_) \
NIC_RPi4_Mailbox_INSTANCE_CONFIGURE_SELF( \
nic_mailbox \
) \
NIC_RPi4_Genet_INSTANCE_CONFIGURE_SELF( \
nic_genet \
) \
NIC_RPi4_INSTANCE_CONFIGURE( \
_nic_, \
1024*4096 \
)

/* macros used to connect platform specific components to the timerserver.
* Due to the fact that it's used to connect platform specific components,
* the comma needs to be part of the macro expansion
*/
#define NETWORK_TEST_OPTIONAL_TIMESERVER_CLIENTS_NETWORK_DRIVER(_nic_) \
_nic_.timeServer_rpc, _nic_.timeServer_notify,

#define NETWORK_TEST_OPTIONAL_TIMESERVER_CLIENTS_NETWORK_DRIVER_BADGES(_nic_) \
_nic_.timeServer_rpc,
11 changes: 11 additions & 0 deletions plat/rpi4/plat_nic.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Network API Test System, RPi4 configuration
#
# Copyright (C) 2021, HENSOLDT Cyber GmbH
#

cmake_minimum_required(VERSION 3.7.2)

NIC_RPi4_DeclareCAmkESComponent(
NIC_RPi4
)

0 comments on commit 2051f9b

Please sign in to comment.