-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #261, Consolidate unit test and normal BSP
Refactor the OSAL BSP code so that a single BSP implementation can work for both normal applications as well as unit tests. This intoduces a new bsp implementation abstraction layer akin to the low level OS implementation layer. This handles dealing with bootloader/command line arguments, and debug console manipluation.
- Loading branch information
Showing
34 changed files
with
1,586 additions
and
1,702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/****************************************************************************** | ||
** File: bsp_console.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: | ||
** OSAL BSP debug console abstraction | ||
** | ||
******************************************************************************/ | ||
|
||
#include <string.h> | ||
#include <unistd.h> | ||
#include <stdio.h> | ||
|
||
#include "mcp750_bsp_internal.h" | ||
#include "bsp-impl.h" | ||
|
||
/**************************************************************************************** | ||
BSP CONSOLE IMPLEMENTATION FUNCTIONS | ||
****************************************************************************************/ | ||
|
||
/*---------------------------------------------------------------- | ||
OS_BSP_ConsoleOutput_Impl | ||
See full description in header | ||
------------------------------------------------------------------*/ | ||
void OS_BSP_ConsoleOutput_Impl(const char *Str, uint32 DataLen) | ||
{ | ||
while (DataLen > 0) | ||
{ | ||
putchar(*Str); | ||
++Str; | ||
--DataLen; | ||
} | ||
} | ||
|
||
/*---------------------------------------------------------------- | ||
OS_BSP_ConsoleSetMode_Impl() definition | ||
See full description in header | ||
------------------------------------------------------------------*/ | ||
void OS_BSP_ConsoleSetMode_Impl(uint32 ModeBits) | ||
{ | ||
/* ignored; not implemented */ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/****************************************************************************** | ||
** File: mcp750_bsp_internal.h | ||
** | ||
** | ||
** 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: | ||
** Header file for internal data to the MCP750 BSP | ||
** | ||
******************************************************************************/ | ||
|
||
#ifndef _MCP750_BSP_INTERNAL_H_ | ||
#define _MCP750_BSP_INTERNAL_H_ | ||
|
||
/* | ||
** OSAL includes | ||
*/ | ||
#include "osapi.h" | ||
#include "bsp-impl.h" | ||
|
||
#endif /* _MCP750_BSP_INTERNAL_H_ */ |
Oops, something went wrong.