Skip to content

Commit

Permalink
Revert "issue #307, Remove unsupported BSPs"
Browse files Browse the repository at this point in the history
This reverts commit 1ce7086.
  • Loading branch information
skliper committed Dec 30, 2019
1 parent 1ce7086 commit b5bb76c
Show file tree
Hide file tree
Showing 34 changed files with 1,949 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
136 changes: 136 additions & 0 deletions src/bsp/mcf5235-rtems/config/osconfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/******************************************************************************
** File: osconfig.h
**
** Purpose:
** This header file contains the OS API configuration parameters.
**
** Author: A. Cudmore
**
** Notes:
**
******************************************************************************/

#ifndef _osconfig_
#define _osconfig_

/*
** Platform Configuration Parameters for the OS API
*/

#define OS_MAX_TASKS 64
#define OS_MAX_QUEUES 64
#define OS_MAX_COUNT_SEMAPHORES 20
#define OS_MAX_BIN_SEMAPHORES 20
#define OS_MAX_MUTEXES 20

/*
** Maximum length for an absolute path name
*/
#define OS_MAX_PATH_LEN 64

/*
** Maximum length for a local or host path/filename.
** This parameter can consist of the OSAL filename/path +
** the host OS physical volume name or path.
*/
#define OS_MAX_LOCAL_PATH_LEN (OS_MAX_PATH_LEN + OS_FS_PHYS_NAME_LEN)

/*
** The maxium length allowed for a object (task,queue....) name
*/
#define OS_MAX_API_NAME 20

/*
** The maximum length for a file name
*/
#define OS_MAX_FILE_NAME 20

/*
** These defines are for OS_printf
*/
#define OS_BUFFER_SIZE 172
#define OS_BUFFER_MSG_DEPTH 100

/* This #define turns on a utility task that
* will read the statements to print from
* the OS_printf function. If you want OS_printf
* to print the text out itself, comment this out
*
* NOTE: The Utility Task #defines only have meaning
* on the VxWorks operating systems
*/

#define OS_UTILITY_TASK_ON


#ifdef OS_UTILITY_TASK_ON
#define OS_UTILITYTASK_STACK_SIZE 2048
/* some room is left for other lower priority tasks */
#define OS_UTILITYTASK_PRIORITY 245
#endif


/*
** the size of a command that can be passed to the underlying OS
*/
#define OS_MAX_CMD_LEN 1000

/*
** This define will include the OS network API.
** It should be turned off for targtets that do not have a network stack or
** device ( like the basic RAD750 vxWorks BSP )
*/
#undef OS_INCLUDE_NETWORK

/*
** This is the maximum number of open file descriptors allowed at a time
*/
#define OS_MAX_NUM_OPEN_FILES 50

/*
** This defines the filethe input command of OS_ShellOutputToFile
** is written to in the VxWorks6 port
*/
#define OS_SHELL_CMD_INPUT_FILE_NAME "/ram/OS_ShellCmd.in"

/*
** This define sets the queue implentation of the Linux port to use sockets
** commenting this out makes the Linux port use the POSIX message queues.
*/
/* #define OSAL_SOCKET_QUEUE */

/*
** Module loader/symbol table is optional
*/
#undef OS_INCLUDE_MODULE_LOADER

#ifdef OS_INCLUDE_MODULE_LOADER
/*
** This define sets the size of the OS Module Table, which keeps track of the loaded modules in
** the running system. This define must be set high enough to support the maximum number of
** loadable modules in the system. If the the table is filled up at runtime, a new module load
** would fail.
*/
#define OS_MAX_MODULES 10

/*
** The Static Loader define is used for switching between the Dynamic and Static loader implementations.
*/
/* #define OS_STATIC_LOADER */

#endif


/*
** This define sets the maximum symbol name string length. It is used in implementations that
** support the symbols and symbol lookup.
*/
#define OS_MAX_SYM_LEN 64


/*
** This define sets the maximum number of timers available
*/
#define OS_MAX_TIMERS 5

#endif
79 changes: 79 additions & 0 deletions src/bsp/mcf5235-rtems/make/compiler-opts.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
###############################################################################
## compiler-opts.mak - compiler definitions and options for building the OSAL
##
## Target: m5235BCC Coldfire board with RTEMS and CEXP dynamic loader
##
## Modifications:
##
###############################################################################
##
## Warning Level Configuration
##
## WARNINGS=-Wall -ansi -pedantic -Wstrict-prototypes
WARNINGS = -Wall

SYSINCS =

##
## Target Defines for the OS, Hardware Arch, etc..
##
TARGET_DEFS = -D_RTEMS_OS_ -D_m68k_ -D$(OS) -DM5235BCC -D_EMBED_

##
## Endian Defines
##
ENDIAN_DEFS=-D_EB -DENDIAN=_EB -DSOFTWARE_BIG_BIT_ORDER

##
## Compiler Architecture Switches ( double check arch switch -m52xx, m523x etc.. )
##
ARCH_OPTS = --pipe -fomit-frame-pointer -m528x -B$(RTEMS_BSP_BASE)/m68k-rtems4.10/mcf5235/lib/ -specs bsp_specs -qrtems

APP_COPTS =
APP_ASOPTS =

##
## Extra Cflags for Assembly listings, etc.
##
LIST_OPTS = -Wa,-a=$*.lis

##
## gcc options for dependancy generation
##
COPTS_D = $(APP_COPTS) $(ENDIAN_DEFS) $(TARGET_DEFS) $(ARCH_OPTS) $(SYSINCS) $(WARNINGS)

##
## General gcc options that apply to compiling and dependency generation.
##
COPTS=$(LIST_OPTS) $(COPTS_D)

##
## Extra defines and switches for assembly code
##
ASOPTS = $(APP_ASOPTS) -P -xassembler-with-cpp

##---------------------------------------------------------
## Application file extention type
## This is the defined application extention.
## Known extentions: Mac OS X: .bundle, Linux: .so, RTEMS:
## .s3r, vxWorks: .o etc..
##---------------------------------------------------------
APP_EXT = nxe

####################################################
## Host Development System and Toolchain defintions
##
## Host OS utils
##
RM=rm -f
CP=cp

##
## Compiler tools
##
COMPILER = m68k-rtems4.10-gcc
ASSEMBLER = m68k-rtems4.10-gcc
LINKER = m68k-rtems4.10-ld
AR = m68k-rtems4.10-ar
NM = m68k-rtems4.10-nm
OBJCPY = m68k-rtems4.10-objcopy
33 changes: 33 additions & 0 deletions src/bsp/mcf5235-rtems/make/link-rules.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
###############################################################################
# File: link-rules.mak
#
# Purpose:
# Makefile for linking code and producing the OSAL Core executable image.
#
# History:
#
###############################################################################

CORE_INSTALL_FILES = $(EXE_TARGET)

##
## Linker flags that are needed
##
LDFLAGS =

##
## Libraries to link in
##
LIBS =


##
## Application Link Rule
##
$(APPTARGET).$(APP_EXT): $(OBJS)
$(COMPILER) --pipe -B$(RTEMS_BSP_BASE)/m68k-rtems4.10/mcf5235/lib/ -specs bsp_specs -qrtems \
-g -Wall -O2 -g -fomit-frame-pointer -g -m528x \
-o $(APPTARGET).$(APP_EXT) \
$(OBJS) $(CORE_OBJS)
$(OBJCPY) -O binary --strip-all $(APPTARGET).$(APP_EXT) $(APPTARGET).exe

20 changes: 20 additions & 0 deletions src/bsp/mcf5235-rtems/src/bsp.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
###############################################################################
# File: bsp.mak
#
# Purpose:
# Compile Board Support Package routines
# History:
#
###############################################################################

# Subsystem produced by this makefile.
TARGET = bsp.o

#==============================================================================
# Object files required to build subsystem.
OBJS = bsp_start.o bsp_voltab.o bsp_loader.o

#==============================================================================
# Source files required to build subsystem; used to generate dependencies.
SOURCES = bsp_start.c bsp_voltab.c bsp_loader.c

28 changes: 28 additions & 0 deletions src/bsp/mcf5235-rtems/src/bsp_loader.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/******************************************************************************
** File: bsp_loader.c
**
**
** This is governed by the NASA Open Source Agreement and may be used,
** distributed and modified only pursuant to the terms of that agreement.
**
** Copyright (c) 2004-2006, United States government as represented by the
** administrator of the National Aeronautics Space Administration.
** All rights reserved.
**
**
** Purpose:
** Include the Static loader. This is not part of the OSAL, so it cannot be
** included in the source. This file allows the static loader to be included
** if it's available. If not, simply undef the OS_STATIC_LOADER define
** in osconfig.h
**
** History:
**
******************************************************************************/
#include "osapi.h"

#ifdef OS_STATIC_LOADER
#include "LzmaDec.c"
#include "loadstaticloadfile.c"
#endif

Loading

0 comments on commit b5bb76c

Please sign in to comment.