forked from ROMEO/obsw
uartlite experiments
This commit is contained in:
parent
1d438f46ba
commit
1392b6ba4d
@ -74,7 +74,7 @@ if(${CMAKE_CROSSCOMPILING})
|
|||||||
projCOVERAGE_TEST=0)
|
projCOVERAGE_TEST=0)
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
freertos_config INTERFACE bsp_z7/ps7_cortexa9_0/include)
|
freertos_config INTERFACE bsp_z7/ps7_cortexa9_0/include)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR armv7a-none-eabihf)
|
||||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL armv7a-none-eabihf)
|
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL armv7a-none-eabihf)
|
||||||
# our compiler options, will trickle down through the project
|
# our compiler options, will trickle down through the project
|
||||||
target_compile_options(freertos_config INTERFACE -c -fmessage-length=0 -g -O0 -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -ffunction-sections -fdata-sections)
|
target_compile_options(freertos_config INTERFACE -c -fmessage-length=0 -g -O0 -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -ffunction-sections -fdata-sections)
|
||||||
|
@ -414,12 +414,21 @@
|
|||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
/* Canonical definitions for peripheral UARTLITE */
|
/* Canonical definitions for peripheral UARTLITE */
|
||||||
|
|
||||||
#define XUARTLITE_BASEADDRESS 0x42c00000
|
|
||||||
#define XPAR_UARTLITE_0_DEVICE_ID 111
|
#define XPAR_XUARTLITE_NUM_INSTANCES 1 /* Number of instances */
|
||||||
|
#define XPAR_UARTLITE_0_DEVICE_ID 30 /* Device ID for instance */
|
||||||
|
#define XPAR_UARTLITE_0_BASEADDR 0xA0020000 /* Device base address */
|
||||||
|
#define XPAR_UARTLITE_0_BAUDRATE 19200 /* Baud rate */
|
||||||
|
#define XPAR_UARTLITE_0_USE_PARITY FALSE /* Parity generator enabled */
|
||||||
|
#define XPAR_UARTLITE_0_ODD_PARITY FALSE /* Type of parity generated */
|
||||||
|
#define XPAR_UARTLITE_0_DATA_BITS 8 /* Data bits */
|
||||||
|
|
||||||
|
|
||||||
/* Definitions for driver UARTPS */
|
/* Definitions for driver UARTPS */
|
||||||
#define XPAR_XUARTPS_NUM_INSTANCES 1
|
#define XPAR_XUARTPS_NUM_INSTANCES 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Definitions for peripheral PS7_UART_1 */
|
/* Definitions for peripheral PS7_UART_1 */
|
||||||
#define XPAR_PS7_UART_1_DEVICE_ID 0
|
#define XPAR_PS7_UART_1_DEVICE_ID 0
|
||||||
#define XPAR_PS7_UART_1_BASEADDR 0xE0001000
|
#define XPAR_PS7_UART_1_BASEADDR 0xE0001000
|
||||||
|
@ -10,5 +10,6 @@ add_subdirectory(libsrc/scugic)
|
|||||||
add_subdirectory(libsrc/scutimer)
|
add_subdirectory(libsrc/scutimer)
|
||||||
add_subdirectory(libsrc/scuwdt)
|
add_subdirectory(libsrc/scuwdt)
|
||||||
add_subdirectory(libsrc/standalone)
|
add_subdirectory(libsrc/standalone)
|
||||||
|
add_subdirectory(libsrc/uartlite)
|
||||||
|
|
||||||
|
|
||||||
|
9
bsp_z7/ps7_cortexa9_0/libsrc/uartlite/CMakeLists.txt
Normal file
9
bsp_z7/ps7_cortexa9_0/libsrc/uartlite/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
|
src/xuartlite_g.c
|
||||||
|
src/xuartlite_intr.c
|
||||||
|
src/xuartlite_l.c
|
||||||
|
src/xuartlite_selftest.c
|
||||||
|
src/xuartlite_sinit.c
|
||||||
|
src/xuartlite_stats.c
|
||||||
|
src/xuartlite.c
|
||||||
|
)
|
@ -29,8 +29,16 @@
|
|||||||
/***************************** Include Files *********************************/
|
/***************************** Include Files *********************************/
|
||||||
|
|
||||||
#include "xuartlite.h"
|
#include "xuartlite.h"
|
||||||
#include "xparameters.h"
|
//#include "xparameters.h" // TODO: Why does this include not work?!
|
||||||
|
|
||||||
|
#define XPAR_XUARTLITE_NUM_INSTANCES 1 /* Number of instances */
|
||||||
|
|
||||||
|
#define XPAR_UARTLITE_0_DEVICE_ID 30 /* Device ID for instance */
|
||||||
|
#define XPAR_UARTLITE_0_BASEADDR 0xA0020000 /* Device base address */
|
||||||
|
#define XPAR_UARTLITE_0_BAUDRATE 19200 /* Baud rate */
|
||||||
|
#define XPAR_UARTLITE_0_USE_PARITY FALSE /* Parity generator enabled */
|
||||||
|
#define XPAR_UARTLITE_0_ODD_PARITY FALSE /* Type of parity generated */
|
||||||
|
#define XPAR_UARTLITE_0_DATA_BITS 8 /* Data bits */
|
||||||
/************************** Constant Definitions *****************************/
|
/************************** Constant Definitions *****************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,6 +59,17 @@
|
|||||||
* @note None.
|
* @note None.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
#define XPAR_XUARTLITE_NUM_INSTANCES 1 /* Number of instances */
|
||||||
|
|
||||||
|
#define XUARTLITE_BASEADDRESS 0x42c00000
|
||||||
|
#define XPAR_UARTLITE_0_BAUDRATE 1115200
|
||||||
|
#define XPAR_UARTLITE_0_BASEADDRESS 0x42c00000 /* TODO: Why are there two Base address variables?*/
|
||||||
|
#define XPAR_UARTLITE_0_DEVICE_ID 1113
|
||||||
|
#define XPAR_UARTLITE_0_USE_PARITY 1 /* TODO: What does this mean?*/
|
||||||
|
#define XPAR_UARTLITE_0_ODD_PARITY 0 /* TODO: What does this mean?*/
|
||||||
|
#define XPAR_UARTLITE_0_DATA_BITS 8 // EIGHT is always a good guess...
|
||||||
|
|
||||||
|
|
||||||
#ifndef SDT
|
#ifndef SDT
|
||||||
XUartLite_Config *XUartLite_LookupConfig(u16 DeviceId)
|
XUartLite_Config *XUartLite_LookupConfig(u16 DeviceId)
|
||||||
{
|
{
|
||||||
|
@ -21,9 +21,11 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --de
|
|||||||
# Add the Rust toolchain binaries to PATH
|
# Add the Rust toolchain binaries to PATH
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
|
|
||||||
# Install the nightly Rust toolchain, the rust-src component, and set the override
|
# Install the nightly Rust toolchain, the rust-src component, and set the override
|
||||||
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /obsw/
|
WORKDIR /obsw/
|
||||||
|
|
||||||
# ENV DOT_PATH=/usr/local/bin # Works without this in debian @paul
|
# ENV DOT_PATH=/usr/local/bin # Works without this in debian @paul
|
@ -81,6 +81,13 @@ struct Handler {
|
|||||||
data: datasets::OwnedDataset<HandlerData>,
|
data: datasets::OwnedDataset<HandlerData>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct TmtcHandler {
|
||||||
|
id: objectmanager::ObjectId,
|
||||||
|
command_queue: queues::MessageQueue<10>,
|
||||||
|
data: datasets::OwnedDataset<HandlerData>,
|
||||||
|
}
|
||||||
|
|
||||||
struct HandlerSender {
|
struct HandlerSender {
|
||||||
id: objectmanager::ObjectId,
|
id: objectmanager::ObjectId,
|
||||||
other_handler: objectmanager::ObjectId,
|
other_handler: objectmanager::ObjectId,
|
||||||
@ -218,6 +225,15 @@ fn mission() {
|
|||||||
command_queue: queues::MessageQueue::new(),
|
command_queue: queues::MessageQueue::new(),
|
||||||
data: datasets::OwnedDataset::new(),
|
data: datasets::OwnedDataset::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let mut tmtc_handler = TmtcHandler {
|
||||||
|
id: 3,
|
||||||
|
command_queue: queues::MessageQueue::new(),
|
||||||
|
data: datasets::OwnedDataset::new(),
|
||||||
|
};
|
||||||
|
|
||||||
let mut h2 = HandlerSender {
|
let mut h2 = HandlerSender {
|
||||||
id: 2,
|
id: 2,
|
||||||
other_handler: 3,
|
other_handler: 3,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user