added BBB support
This commit is contained in:
10
bsp_linux_board/boardconfig/CMakeLists.txt
Normal file
10
bsp_linux_board/boardconfig/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
print.c
|
||||
)
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
||||
|
38
bsp_linux_board/boardconfig/etl_profile.h
Normal file
38
bsp_linux_board/boardconfig/etl_profile.h
Normal file
@ -0,0 +1,38 @@
|
||||
///\file
|
||||
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
https://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2019 jwellbelove
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
#ifndef __ETL_PROFILE_H__
|
||||
#define __ETL_PROFILE_H__
|
||||
|
||||
#define ETL_CHECK_PUSH_POP
|
||||
|
||||
#define ETL_CPP11_SUPPORTED 1
|
||||
#define ETL_NO_NULLPTR_SUPPORT 0
|
||||
|
||||
#endif
|
14
bsp_linux_board/boardconfig/gcov.h
Normal file
14
bsp_linux_board/boardconfig/gcov.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef LINUX_GCOV_H_
|
||||
#define LINUX_GCOV_H_
|
||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||
|
||||
#ifdef GCOV
|
||||
extern "C" void __gcov_flush();
|
||||
#else
|
||||
void __gcov_flush() {
|
||||
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
|
||||
"coverage information is desired.\n" << std::flush;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LINUX_GCOV_H_ */
|
14
bsp_linux_board/boardconfig/print.c
Normal file
14
bsp_linux_board/boardconfig/print.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <bsp_q7s/boardconfig/print.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void printChar(const char* character, bool errStream) {
|
||||
if(errStream) {
|
||||
putc(*character, stderr);
|
||||
return;
|
||||
}
|
||||
putc(*character, stdout);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
8
bsp_linux_board/boardconfig/print.h
Normal file
8
bsp_linux_board/boardconfig/print.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef HOSTED_BOARDCONFIG_PRINT_H_
|
||||
#define HOSTED_BOARDCONFIG_PRINT_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
void printChar(const char* character, bool errStream);
|
||||
|
||||
#endif /* HOSTED_BOARDCONFIG_PRINT_H_ */
|
24
bsp_linux_board/boardconfig/rpi_config.h
Normal file
24
bsp_linux_board/boardconfig/rpi_config.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_
|
||||
#define BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#define RPI_ADD_GPIO_TEST 0
|
||||
#define RPI_LOOPBACK_TEST_GPIO 0
|
||||
|
||||
/* Only one of those 2 should be enabled! */
|
||||
#define RPI_ADD_SPI_TEST 0
|
||||
#define RPI_TEST_ACS_BOARD 0
|
||||
|
||||
/* Adapt these values accordingly */
|
||||
namespace gpio {
|
||||
static constexpr uint8_t MGM_0_BCM_PIN = 0;
|
||||
static constexpr uint8_t MGM_1_BCM_PIN = 1;
|
||||
static constexpr uint8_t MGM_2_BCM_PIN = 17;
|
||||
static constexpr uint8_t MGM_3_BCM_PIN = 27;
|
||||
static constexpr uint8_t GYRO_0_BCM_PIN = 5;
|
||||
static constexpr uint8_t GYRO_1_BCM_PIN = 6;
|
||||
static constexpr uint8_t GYRO_2_BCM_PIN = 4;
|
||||
}
|
||||
|
||||
#endif /* BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_ */
|
Reference in New Issue
Block a user