Win32 simulator updated.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2505 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-12-19 11:20:30 +00:00
parent 1f18297e2a
commit e3a932e0e6
8 changed files with 64 additions and 29 deletions

38
boards/simulator/board.c Normal file
View File

@ -0,0 +1,38 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
ChibiOS/RT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ch.h"
#include "hal.h"
/**
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
*/
#if HAL_USE_PAL || defined(__DOXYGEN__)
const PALConfig pal_default_config = {
{0, 0, 0},
{0, 0, 0}
};
#endif
/*
* Board-specific initialization code.
*/
void boardInit(void) {
}

View File

@ -20,4 +20,14 @@
#ifndef _BOARD_H_
#define _BOARD_H_
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
void boardInit(void);
#ifdef __cplusplus
}
#endif
#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */

View File

@ -0,0 +1,5 @@
# List of all the simulator board related files.
BOARDSRC = ${CHIBIOS}/boards/simulator/board.c
# Required include directories
BOARDINC = ${CHIBIOS}/boards/simulator

View File

@ -57,6 +57,7 @@ UADEFS =
# Imported source files
CHIBIOS = ../..
include $(CHIBIOS)/boards/simulator/board.mk
include ${CHIBIOS}/os/hal/hal.mk
include ${CHIBIOS}/os/hal/platforms/Win32/platform.mk
include ${CHIBIOS}/os/ports/GCC/SIMIA32/port.mk
@ -69,6 +70,7 @@ SRC = ${PORTSRC} \
${TESTSRC} \
${HALSRC} \
${PLATFORMSRC} \
$(BOARDSRC) \
${CHIBIOS}/os/various/shell.c \
main.c
@ -76,7 +78,8 @@ SRC = ${PORTSRC} \
ASRC =
# List all user directories here
UINCDIR = $(PORTINC) $(KERNINC) $(TESTINC) $(HALINC) $(PLATFORMINC) \
UINCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
${CHIBIOS}/os/various
# List the user directory to look for the libraries here

View File

@ -220,13 +220,13 @@ int main(void) {
EventListener sd1fel, sd2fel, tel;
/*
* HAL initialization.
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
/*
* ChibiOS/RT initialization.
*/
chSysInit();
/*

View File

@ -43,17 +43,6 @@
static struct timeval nextcnt;
static struct timeval tick = {0, 1000000 / CH_FREQUENCY};
/**
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
*/
#if HAL_USE_PAL || defined(__DOXYGEN__)
const PALConfig pal_default_config = {
{0, 0, 0},
{0, 0, 0}
};
#endif
/*===========================================================================*/
/* Driver local functions. */
/*===========================================================================*/

View File

@ -38,17 +38,6 @@
static LARGE_INTEGER nextcnt;
static LARGE_INTEGER slice;
/**
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
*/
#if HAL_USE_PAL || defined(__DOXYGEN__)
const PALConfig pal_default_config = {
{0, 0, 0},
{0, 0, 0}
};
#endif
/*===========================================================================*/
/* Driver local functions. */
/*===========================================================================*/

View File

@ -66,7 +66,8 @@
*** 2.1.6 ***
- FIX: Fixed error in sdPutTimeout() macro (bug 3138763)(backported in 2.0.9).
- NEW: New ARM Cortex-Mx port for IAR compiler.
- NEW: New ARM Cortex-Mx port for IAR compiler (probably will not be
included in 2.2.0, requires more testing).
- NEW: Now the STM32 CAN driver puts the lower half word of the ESR
register in the upper half word of the can status word for easier
debug.