Merge pull request #2098 from opentx/bsongis/move_to_STM32F4
Bsongis/move to stm32 f4
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
#define PCBTARANIS
|
#define PCBTARANIS
|
||||||
#define CPUARM
|
#define CPUARM
|
||||||
#define CPUSTM32
|
#define CPUSTM32
|
||||||
|
#define STM32F40_41xxx
|
||||||
#define GUI
|
#define GUI
|
||||||
#define HELI
|
#define HELI
|
||||||
#define SPLASH
|
#define SPLASH
|
||||||
|
|||||||
@@ -1,16 +1,39 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsConfig.h
|
* @file OsConfig.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief This file use by user to configuration CooCox CoOS.
|
* @brief This file use by user to configuration CooCox CoOS.
|
||||||
* @note Ensure you have knew every item before modify this file.
|
* @note Ensure you have knew every item before modify this file.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,7 +60,11 @@ Max number of tasks that can be running.
|
|||||||
/*!<
|
/*!<
|
||||||
Idle task stack size(word).
|
Idle task stack size(word).
|
||||||
*/
|
*/
|
||||||
|
#if CFG_CHIP_TYPE == 3
|
||||||
|
#define CFG_IDLE_STACK_SIZE (58)
|
||||||
|
#else
|
||||||
#define CFG_IDLE_STACK_SIZE (25)
|
#define CFG_IDLE_STACK_SIZE (25)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!<
|
/*!<
|
||||||
System frequency (Hz).
|
System frequency (Hz).
|
||||||
@@ -1,22 +1,45 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file CoOS.h
|
* @file CoOS.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief API header file of CooCox CoOS.
|
* @brief API header file of CooCox CoOS.
|
||||||
* @details This file including all API functions's declare of CooCox CoOS.
|
* @details This file including all API functions's declare of CooCox CoOS.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CCRTOS_H
|
#ifndef _CCRTOS_H
|
||||||
#define _CCRTOS_H
|
#define _CCRTOS_H
|
||||||
#include "OsConfig.h"
|
#include "../OsConfig.h"
|
||||||
/*---------------------------- Type Define ----------------------------------*/
|
/*---------------------------- Type Define ----------------------------------*/
|
||||||
typedef signed char S8;
|
typedef signed char S8;
|
||||||
typedef unsigned char U8;
|
typedef unsigned char U8;
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsCore.h
|
* @file OsCore.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Header file related to kernel
|
* @brief Header file related to kernel
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,39 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsError.h
|
* @file OsError.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief rror dispose header file
|
* @brief rror dispose header file
|
||||||
* @details This file use to dispose error which from error configure for OS.
|
* @details This file use to dispose error which from error configure for OS.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsEvent.h
|
* @file OsEvent.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Event management header file
|
* @brief Event management header file
|
||||||
* @details This file including some defines and declares related to event
|
* @details This file including some defines and declares related to event
|
||||||
* (semaphore,mailbox,queque) management.
|
* (semaphore,mailbox,queque) management.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,39 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsFlag.h
|
* @file OsFlag.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Evnet flag management header file
|
* @brief Evnet flag management header file
|
||||||
* @details This file including some defines and declares about flag management.
|
* @details This file including some defines and declares about flag management.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsKernelHeap.h
|
* @file OsKernelHeap.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Header file related to memory management
|
* @brief Header file related to memory management
|
||||||
* @details This file including some defines and function declare related to
|
* @details This file including some defines and function declare related to
|
||||||
* kernel heap management.
|
* kernel heap management.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsMm.h
|
* @file OsMm.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Header file related to memory management
|
* @brief Header file related to memory management
|
||||||
* @details This file including some defines and function declare related to
|
* @details This file including some defines and function declare related to
|
||||||
* memory management.
|
* memory management.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsMutex.h
|
* @file OsMutex.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Mutex management header file
|
* @brief Mutex management header file
|
||||||
* @details This file including some defines and declare related to mutex
|
* @details This file including some defines and declare related to mutex
|
||||||
* management.
|
* management.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,39 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsQueue.h
|
* @file OsQueue.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Queue management header file
|
* @brief Queue management header file
|
||||||
* @details This file including some defines and declares about queue management.
|
* @details This file including some defines and declares about queue management.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsServiceReq.h
|
* @file OsServiceReq.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Header file related to service request
|
* @brief Header file related to service request
|
||||||
* @details This file including some defines and function declare related to
|
* @details This file including some defines and function declare related to
|
||||||
* service request.
|
* service request.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,39 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsTask.h
|
* @file OsTask.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Header file related to task.
|
* @brief Header file related to task.
|
||||||
* @details This file including some defines and function declare related to task.
|
* @details This file including some defines and function declare related to task.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,39 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsTime.c
|
* @file OsTime.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Header file related to time management
|
* @brief Header file related to time management
|
||||||
* @details Thie file including some data declare related to time managment.
|
* @details Thie file including some data declare related to time managment.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsTimer.h
|
* @file OsTimer.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Timer manage header file
|
* @brief Timer manage header file
|
||||||
* @details This file including some declares and defines related to timer
|
* @details This file including some declares and defines related to timer
|
||||||
* management.
|
* management.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file coocox.h
|
* @file coocox.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Gather for all header file of CooCox CoOS.
|
* @brief Gather for all header file of CooCox CoOS.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,8 +40,8 @@
|
|||||||
#ifndef _COOCOX_H
|
#ifndef _COOCOX_H
|
||||||
#define _COOCOX_H
|
#define _COOCOX_H
|
||||||
|
|
||||||
#define OS_VERSION (U16)0x0113 /*!< OS version.(format: Vx.xx),
|
#define OS_VERSION (U16)0x0116 /*!< OS version.(format: Vx.xx),
|
||||||
e.g. value 0x0113 is version V1.13*/
|
e.g. value 0x0114 is version V1.14*/
|
||||||
/*---------------------------- Include ---------------------------------------*/
|
/*---------------------------- Include ---------------------------------------*/
|
||||||
#include "CoOS.h"
|
#include "CoOS.h"
|
||||||
#include "OsArch.h"
|
#include "OsArch.h"
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file core.c
|
* @file core.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Core implementation code of CooCox CoOS kernel.
|
* @brief Core implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file event.c
|
* @file event.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief event management implementation code of CooCox CoOS kernel.
|
* @brief event management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -323,30 +346,32 @@ void EventTaskToRdy(P_ECB pecb)
|
|||||||
{
|
{
|
||||||
RemoveDelayList(ptcb); /* Yes,remove task from DELAY list */
|
RemoveDelayList(ptcb); /* Yes,remove task from DELAY list */
|
||||||
}
|
}
|
||||||
|
#if CFG_MAILBOX_EN >0
|
||||||
if(pecb->eventType == EVENT_TYPE_MBOX)/* Is it a mailbox event? */
|
if(pecb->eventType == EVENT_TYPE_MBOX)/* Is it a mailbox event? */
|
||||||
{
|
{
|
||||||
ptcb->pmail = pecb->eventPtr; /* Yes,send mail to task */
|
ptcb->pmail = pecb->eventPtr; /* Yes,send mail to task */
|
||||||
pecb->eventPtr = Co_NULL; /* Clear event sign */
|
pecb->eventPtr = Co_NULL; /* Clear event sign */
|
||||||
pecb->eventCounter--;
|
//pecb->eventCounter--;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#if CFG_QUEUE_EN >0
|
#if CFG_QUEUE_EN >0
|
||||||
else if(pecb->eventType == EVENT_TYPE_QUEUE) /* Is it a queue event? */
|
else if(pecb->eventType == EVENT_TYPE_QUEUE) /* Is it a queue event? */
|
||||||
{
|
{
|
||||||
pqcb = (P_QCB)pecb->eventPtr; /* Yes,get queue pointer */
|
pqcb = (P_QCB)pecb->eventPtr; /* Yes,get queue pointer */
|
||||||
ptcb->pmail = *(pqcb->qStart + pqcb->head); /* Send mail to task */
|
ptcb->pmail = *(pqcb->qStart + pqcb->head); /* Send mail to task */
|
||||||
pqcb->head++; /* Clear event sign */
|
//pqcb->head++; /* Clear event sign */
|
||||||
pqcb->qSize--;
|
//pqcb->qSize--;
|
||||||
if(pqcb->head == pqcb->qMaxSize)
|
//if(pqcb->head == pqcb->qMaxSize)
|
||||||
{
|
//{
|
||||||
pqcb->head = 0;
|
// pqcb->head = 0;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CFG_MAILBOX_EN >0
|
#if CFG_SEM_EN >0
|
||||||
else if(pecb->eventType == EVENT_TYPE_SEM)/* Is it a semaphore event? */
|
else if(pecb->eventType == EVENT_TYPE_SEM)/* Is it a semaphore event? */
|
||||||
{
|
{
|
||||||
pecb->eventCounter--; /* Yes,clear event sign */
|
//pecb->eventCounter--; /* Yes,clear event sign */
|
||||||
ptcb->pmail = (void*)0xffffffff; /* Indicate task woke by event */
|
ptcb->pmail = (void*)0xffffffff; /* Indicate task woke by event */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file flag.c
|
* @file flag.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Flag management implementation code of coocox CoOS kernel.
|
* @brief Flag management implementation code of coocox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file hook.c
|
* @file hook.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief hook management implementation code of CooCox CoOS kernel.
|
* @brief hook management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file kernelHeap.c
|
* @file kernelHeap.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief kernel heap management implementation code of CooCox CoOS kernel.
|
* @brief kernel heap management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file mbox.c
|
* @file mbox.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Mailbox management implementation code of CooCox CoOS kernel.
|
* @brief Mailbox management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -208,8 +231,11 @@ void* CoPendMail(OS_EventID id,U32 timeout,StatusType* perr)
|
|||||||
*perr = E_OK;
|
*perr = E_OK;
|
||||||
|
|
||||||
/* Have recived a message or the mailbox have been deleted */
|
/* Have recived a message or the mailbox have been deleted */
|
||||||
|
OsSchedLock();
|
||||||
pmail = curTCB->pmail;
|
pmail = curTCB->pmail;
|
||||||
|
pecb->eventCounter = 0;
|
||||||
curTCB->pmail = Co_NULL;
|
curTCB->pmail = Co_NULL;
|
||||||
|
OsSchedUnlock();
|
||||||
return pmail; /* Return received message or Co_NULL */
|
return pmail; /* Return received message or Co_NULL */
|
||||||
}
|
}
|
||||||
else /* If time-out is configured */
|
else /* If time-out is configured */
|
||||||
@@ -228,8 +254,13 @@ void* CoPendMail(OS_EventID id,U32 timeout,StatusType* perr)
|
|||||||
else /* Have recived a message or the mailbox have been deleted*/
|
else /* Have recived a message or the mailbox have been deleted*/
|
||||||
{
|
{
|
||||||
*perr = E_OK;
|
*perr = E_OK;
|
||||||
|
|
||||||
|
OsSchedLock();
|
||||||
pmail = curTCB->pmail;
|
pmail = curTCB->pmail;
|
||||||
|
pecb->eventCounter = 0;
|
||||||
curTCB->pmail = Co_NULL;
|
curTCB->pmail = Co_NULL;
|
||||||
|
OsSchedUnlock();
|
||||||
|
|
||||||
return pmail; /* Return received message or Co_NULL */
|
return pmail; /* Return received message or Co_NULL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file mm.c
|
* @file mm.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief memory management implementation code of CooCox CoOS kernel.
|
* @brief memory management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file mutex.c
|
* @file mutex.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Mutex management implementation code of CooCox CoOS kernel.
|
* @brief Mutex management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file queue.c
|
* @file queue.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Queue management implementation code of CooCox CoOS kernel.
|
* @brief Queue management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -267,8 +290,16 @@ void* CoPendQueueMail(OS_EventID id,U32 timeout,StatusType* perr)
|
|||||||
EventTaskToWait(pecb,curTCB);
|
EventTaskToWait(pecb,curTCB);
|
||||||
|
|
||||||
/* Have recived message or the queue have been deleted */
|
/* Have recived message or the queue have been deleted */
|
||||||
|
OsSchedLock();
|
||||||
pmail = curTCB->pmail;
|
pmail = curTCB->pmail;
|
||||||
curTCB->pmail = Co_NULL;
|
curTCB->pmail = Co_NULL;
|
||||||
|
pqcb->head++; /* Clear event sign */
|
||||||
|
pqcb->qSize--;
|
||||||
|
if(pqcb->head == pqcb->qMaxSize)
|
||||||
|
{
|
||||||
|
pqcb->head = 0;
|
||||||
|
}
|
||||||
|
OsSchedUnlock();
|
||||||
*perr = E_OK;
|
*perr = E_OK;
|
||||||
return pmail; /* Return message received or Co_NULL */
|
return pmail; /* Return message received or Co_NULL */
|
||||||
}
|
}
|
||||||
@@ -287,8 +318,16 @@ void* CoPendQueueMail(OS_EventID id,U32 timeout,StatusType* perr)
|
|||||||
}
|
}
|
||||||
else /* If event occured */
|
else /* If event occured */
|
||||||
{
|
{
|
||||||
|
OsSchedLock();
|
||||||
pmail = curTCB->pmail;
|
pmail = curTCB->pmail;
|
||||||
curTCB->pmail = Co_NULL;
|
curTCB->pmail = Co_NULL;
|
||||||
|
pqcb->head++; /* Clear event sign */
|
||||||
|
pqcb->qSize--;
|
||||||
|
if(pqcb->head == pqcb->qMaxSize)
|
||||||
|
{
|
||||||
|
pqcb->head = 0;
|
||||||
|
}
|
||||||
|
OsSchedUnlock();
|
||||||
*perr = E_OK;
|
*perr = E_OK;
|
||||||
return pmail; /* Return message received or Co_NULL */
|
return pmail; /* Return message received or Co_NULL */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file sem.c
|
* @file sem.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Semaphore management implementation code of CooCox CoOS kernel.
|
* @brief Semaphore management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -136,8 +159,8 @@ StatusType CoAcceptSem(OS_EventID id)
|
|||||||
OsSchedLock();
|
OsSchedLock();
|
||||||
if(pecb->eventCounter > 0) /* If semaphore is positive,resource available */
|
if(pecb->eventCounter > 0) /* If semaphore is positive,resource available */
|
||||||
{
|
{
|
||||||
OsSchedUnlock();
|
|
||||||
pecb->eventCounter--; /* Decrement semaphore only if positive */
|
pecb->eventCounter--; /* Decrement semaphore only if positive */
|
||||||
|
OsSchedUnlock();
|
||||||
return E_OK;
|
return E_OK;
|
||||||
}
|
}
|
||||||
else /* Resource is not available */
|
else /* Resource is not available */
|
||||||
@@ -203,18 +226,17 @@ StatusType CoPendSem(OS_EventID id,U32 timeout)
|
|||||||
}
|
}
|
||||||
else /* Resource is not available */
|
else /* Resource is not available */
|
||||||
{
|
{
|
||||||
OsSchedUnlock();
|
|
||||||
curTCB = TCBRunning;
|
curTCB = TCBRunning;
|
||||||
if(timeout == 0) /* If time-out is not configured */
|
if(timeout == 0) /* If time-out is not configured */
|
||||||
{
|
{
|
||||||
EventTaskToWait(pecb,curTCB); /* Block task until event occurs */
|
EventTaskToWait(pecb,curTCB); /* Block task until event occurs */
|
||||||
|
pecb->eventCounter--;
|
||||||
curTCB->pmail = Co_NULL;
|
curTCB->pmail = Co_NULL;
|
||||||
|
OsSchedUnlock();
|
||||||
return E_OK;
|
return E_OK;
|
||||||
}
|
}
|
||||||
else /* If time-out is configured */
|
else /* If time-out is configured */
|
||||||
{
|
{
|
||||||
OsSchedLock();
|
|
||||||
|
|
||||||
/* Block task until event or timeout occurs */
|
/* Block task until event or timeout occurs */
|
||||||
EventTaskToWait(pecb,curTCB);
|
EventTaskToWait(pecb,curTCB);
|
||||||
InsertDelayList(curTCB,timeout);
|
InsertDelayList(curTCB,timeout);
|
||||||
@@ -226,7 +248,10 @@ StatusType CoPendSem(OS_EventID id,U32 timeout)
|
|||||||
}
|
}
|
||||||
else /* Event occurred or event have been deleted*/
|
else /* Event occurred or event have been deleted*/
|
||||||
{
|
{
|
||||||
|
OsSchedLock();
|
||||||
curTCB->pmail = Co_NULL;
|
curTCB->pmail = Co_NULL;
|
||||||
|
pecb->eventCounter--;
|
||||||
|
OsSchedUnlock();
|
||||||
return E_OK;
|
return E_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file serviceReq.c
|
* @file serviceReq.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief servive request management implementation code of CooCox CoOS kernel.
|
* @brief servive request management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file task.c
|
* @file task.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief task management implementation code of CooCox CoOS kernel.
|
* @brief task management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file time.c
|
* @file time.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief time management implementation code of CooCox CoOS kernel.
|
* @brief time management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file timer.c
|
* @file timer.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief timer management implementation code of CooCox CoOS kernel.
|
* @brief timer management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file utility.c
|
* @file utility.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Utility management implementation code of CooCox CoOS kernel.
|
* @brief Utility management implementation code of CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file utility.h
|
* @file utility.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Utility function header file
|
* @brief Utility function header file
|
||||||
* @details This file including some defines and declares related to utility
|
* @details This file including some defines and declares related to utility
|
||||||
* function.
|
* function.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,38 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file prot.c
|
* @file prot.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Compiler adapter for CooCox CoOS kernel.
|
* @brief Compiler adapter for CooCox CoOS kernel.
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2010 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -159,7 +182,11 @@ void SetEnvironment (OS_STK *pstk)
|
|||||||
{
|
{
|
||||||
__asm volatile
|
__asm volatile
|
||||||
(
|
(
|
||||||
|
#if CFG_CHIP_TYPE == 3
|
||||||
|
" SUB R0,#100 \n"
|
||||||
|
#else
|
||||||
" SUB R0,#28 \n"
|
" SUB R0,#28 \n"
|
||||||
|
#endif
|
||||||
" MSR PSP,R0 \n"
|
" MSR PSP,R0 \n"
|
||||||
" BX LR \n"
|
" BX LR \n"
|
||||||
);
|
);
|
||||||
@@ -258,7 +285,7 @@ void PendSV_Handler(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CFG_CHIP_TYPE == 1
|
#if CFG_CHIP_TYPE == 1 || 3 == CFG_CHIP_TYPE
|
||||||
void PendSV_Handler(void)
|
void PendSV_Handler(void)
|
||||||
{
|
{
|
||||||
////////debug block /////////////////////////
|
////////debug block /////////////////////////
|
||||||
@@ -275,21 +302,31 @@ void PendSV_Handler(void)
|
|||||||
" MRS R0, PSP \n" // Get PSP point (can not use PUSH,in ISR,SP is MSP )
|
" MRS R0, PSP \n" // Get PSP point (can not use PUSH,in ISR,SP is MSP )
|
||||||
" STMDB R0!,{R4-R11} \n" // Store r4-r11,r0 -= regCnt * 4,r0 is new stack
|
" STMDB R0!,{R4-R11} \n" // Store r4-r11,r0 -= regCnt * 4,r0 is new stack
|
||||||
// top point (addr h->l r11,r10,...,r5,r4)
|
// top point (addr h->l r11,r10,...,r5,r4)
|
||||||
|
#if CFG_CHIP_TYPE == 3
|
||||||
|
" VSTMDB R0!, {S16-S31} \n" // store remaining FPU registers
|
||||||
|
#endif // CFG_FPU_ENABLE
|
||||||
|
|
||||||
" STR R0,[R1] \n" // Save orig PSP
|
" STR R0,[R1] \n" // Save orig PSP
|
||||||
|
|
||||||
" STR R2, [R3] \n" // TCBRunning = TCBNext;
|
" STR R2, [R3] \n" // TCBRunning = TCBNext;
|
||||||
" LDR R0, [R2] \n" // Get SP of task that be switch into.
|
" LDR R0, [R2] \n" // Get SP of task that be switch into.
|
||||||
|
|
||||||
|
#if CFG_CHIP_TYPE == 3
|
||||||
|
" VLDMIA R0!, {S16-S31} \n" // load remaining FPU registers
|
||||||
|
#endif // CFG_FPU_ENABLE
|
||||||
|
|
||||||
" LDMIA R0!,{R4-R11} \n" // POP {R4-R11},R0 += regCnt * 4
|
" LDMIA R0!,{R4-R11} \n" // POP {R4-R11},R0 += regCnt * 4
|
||||||
" MSR PSP, R0 \n" // Mov new stack point to PSP
|
" MSR PSP, R0 \n" // Mov new stack point to PSP
|
||||||
|
|
||||||
|
|
||||||
" exitPendSV: \n"
|
" exitPendSV: \n"
|
||||||
" LDR R3,=OSSchedLock\n"
|
" LDR R3,=OSSchedLock\n"
|
||||||
" MOVS R0, #0x0 \n"
|
" MOVS R0, #0x0 \n"
|
||||||
" STRB R0, [R3] \n"
|
" STRB R0, [R3] \n"
|
||||||
" ORR LR,LR,#0x04 \n" // Ensure exception return uses process stack
|
" ORR LR,LR,#0x04 \n" // Ensure exception return uses process stack
|
||||||
|
#if CFG_CHIP_TYPE == 3
|
||||||
|
" LDR LR,=0xFFFFFFED \n"
|
||||||
|
#endif
|
||||||
" BX LR \n" // Exit interrupt
|
" BX LR \n" // Exit interrupt
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file OsArch.h
|
* @file OsArch.h
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief Implement function declare related to Cortex-M3(ARM-v7)
|
* @brief Implement function declare related to Cortex-M3(ARM-v7)
|
||||||
* @details This header file including functions or defines related to
|
* @details This header file including functions or defines related to
|
||||||
* Cortex-M3(ARM-v7).
|
* Cortex-M3(ARM-v7).
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
*
|
*
|
||||||
* INTERNAL FILE,DON'T PUBLIC.
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -47,4 +70,6 @@ extern U8 Inc8 (volatile U8 *data);
|
|||||||
extern U8 Dec8 (volatile U8 *data);
|
extern U8 Dec8 (volatile U8 *data);
|
||||||
extern void IRQ_ENABLE_RESTORE(void);
|
extern void IRQ_ENABLE_RESTORE(void);
|
||||||
extern void IRQ_DISABLE_SAVE(void);
|
extern void IRQ_DISABLE_SAVE(void);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#endif /* _CPU_H */
|
||||||
|
|||||||
@@ -1,14 +1,37 @@
|
|||||||
/**
|
/**
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @file arch.c
|
* @file arch.c
|
||||||
* @version V1.1.4
|
* @version V1.1.6
|
||||||
* @date 2011.04.20
|
* @date 2014.05.23
|
||||||
* @brief This file provides InitTaskContext() and SysTick_Handler().
|
* @brief This file provides InitTaskContext() and SysTick_Handler().
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* @copy
|
* @copy
|
||||||
* WRITE COPY INFORMATION USE CAPITAL LETTER
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
*
|
*
|
||||||
* <h2><center>© COPYRIGHT 2009 CooCox </center></h2>
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* <h2><center>© COPYRIGHT 2014 CooCox </center></h2>
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -34,12 +57,19 @@ OS_STK *InitTaskContext(FUNCPtr task,void *param,OS_STK *pstk)
|
|||||||
{
|
{
|
||||||
OS_STK *context;
|
OS_STK *context;
|
||||||
context = pstk;
|
context = pstk;
|
||||||
|
#if CFG_CHIP_TYPE == 3
|
||||||
|
context = context - 18;
|
||||||
|
#endif
|
||||||
*(context--) = (U32)0x01000000L; /* xPSR */
|
*(context--) = (U32)0x01000000L; /* xPSR */
|
||||||
*(context--) = (U32)task; /* Entry point of task. */
|
*(context--) = (U32)task; /* Entry point of task. */
|
||||||
*(context) = (U32)0xFFFFFFFEL;
|
*(context) = (U32)0xFFFFFFFEL;
|
||||||
context = context - 5;
|
context = context - 5;
|
||||||
*(context) = (U32)param; /* R0: argument */
|
*(context) = (U32)param; /* R0: argument */
|
||||||
context = context - 8;
|
context = context - 8;
|
||||||
|
#if CFG_CHIP_TYPE == 3
|
||||||
|
context = context - 16;
|
||||||
|
#endif
|
||||||
|
// *(--context) = 0xfffffffd; /* LR */
|
||||||
|
|
||||||
return (context); /* Returns location of new stack top. */
|
return (context); /* Returns location of new stack top. */
|
||||||
}
|
}
|
||||||
|
|||||||
+40
-17
@@ -720,7 +720,7 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
|
|||||||
CPPSRC += targets/sky9x/coproc_driver.cpp
|
CPPSRC += targets/sky9x/coproc_driver.cpp
|
||||||
endif
|
endif
|
||||||
TRGT = arm-none-eabi-
|
TRGT = arm-none-eabi-
|
||||||
MCU = cortex-m3
|
MCU = cortex-m3
|
||||||
OPT = s
|
OPT = s
|
||||||
SDCARD = YES
|
SDCARD = YES
|
||||||
BUZZER = NO
|
BUZZER = NO
|
||||||
@@ -733,7 +733,7 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
|
|||||||
ifeq ($(SPORT_FILE_LOG), YES)
|
ifeq ($(SPORT_FILE_LOG), YES)
|
||||||
CPPDEFS += -DSPORT_FILE_LOG
|
CPPDEFS += -DSPORT_FILE_LOG
|
||||||
endif
|
endif
|
||||||
INCDIRS += targets/sky9x CoOS/kernel CoOS/portable
|
INCDIRS += targets/sky9x CoOS CoOS/kernel CoOS/portable
|
||||||
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_hardware.cpp gui/$(GUIDIRECTORY)/menu_general_diagkeys.cpp gui/$(GUIDIRECTORY)/menu_general_diaganas.cpp
|
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_hardware.cpp gui/$(GUIDIRECTORY)/menu_general_diagkeys.cpp gui/$(GUIDIRECTORY)/menu_general_diaganas.cpp
|
||||||
BOARDSRC = main_arm.cpp targets/sky9x/board_sky9x.cpp
|
BOARDSRC = main_arm.cpp targets/sky9x/board_sky9x.cpp
|
||||||
EXTRABOARDSRC = targets/sky9x/lcd_driver.cpp
|
EXTRABOARDSRC = targets/sky9x/lcd_driver.cpp
|
||||||
@@ -779,6 +779,7 @@ ifeq ($(PCB), TARANIS)
|
|||||||
LCDSIZE = 212
|
LCDSIZE = 212
|
||||||
GUIDIRECTORY = Taranis
|
GUIDIRECTORY = Taranis
|
||||||
ifeq ($(PCBREV), REV9E)
|
ifeq ($(PCBREV), REV9E)
|
||||||
|
MCU = cortex-m4
|
||||||
FLAVOUR = taranis-x9e
|
FLAVOUR = taranis-x9e
|
||||||
CPPDEFS = -DREVPLUS -DREV9E
|
CPPDEFS = -DREVPLUS -DREV9E
|
||||||
ifeq ($(LCD_DUAL_BUFFER), YES)
|
ifeq ($(LCD_DUAL_BUFFER), YES)
|
||||||
@@ -787,6 +788,7 @@ ifeq ($(PCB), TARANIS)
|
|||||||
HAPTIC = YES
|
HAPTIC = YES
|
||||||
EXTRABOARDSRC += targets/taranis/bluetooth_driver.cpp
|
EXTRABOARDSRC += targets/taranis/bluetooth_driver.cpp
|
||||||
else ifeq ($(PCBREV), REVPLUS)
|
else ifeq ($(PCBREV), REVPLUS)
|
||||||
|
MCU = cortex-m3
|
||||||
FLAVOUR = taranis-plus
|
FLAVOUR = taranis-plus
|
||||||
CPPDEFS = -DREVPLUS
|
CPPDEFS = -DREVPLUS
|
||||||
ifeq ($(LCD_DUAL_BUFFER), YES)
|
ifeq ($(LCD_DUAL_BUFFER), YES)
|
||||||
@@ -794,12 +796,15 @@ ifeq ($(PCB), TARANIS)
|
|||||||
endif
|
endif
|
||||||
HAPTIC = YES
|
HAPTIC = YES
|
||||||
else ifeq ($(PCBREV), REV3)
|
else ifeq ($(PCBREV), REV3)
|
||||||
|
MCU = cortex-m3
|
||||||
FLAVOUR = taranis
|
FLAVOUR = taranis
|
||||||
CPPDEFS = -DREV3
|
CPPDEFS = -DREV3
|
||||||
else ifeq ($(PCBREV), REV4a)
|
else ifeq ($(PCBREV), REV4a)
|
||||||
|
MCU = cortex-m3
|
||||||
FLAVOUR = taranis
|
FLAVOUR = taranis
|
||||||
CPPDEFS = -DREV4a
|
CPPDEFS = -DREV4a
|
||||||
else
|
else
|
||||||
|
MCU = cortex-m3
|
||||||
FLAVOUR = taranis
|
FLAVOUR = taranis
|
||||||
CPPDEFS = -DREV4
|
CPPDEFS = -DREV4
|
||||||
endif
|
endif
|
||||||
@@ -829,7 +834,6 @@ ifeq ($(PCB), TARANIS)
|
|||||||
endif
|
endif
|
||||||
LDSCRIPT = targets/taranis/stm32_flash_bl.ld
|
LDSCRIPT = targets/taranis/stm32_flash_bl.ld
|
||||||
TRGT = arm-none-eabi-
|
TRGT = arm-none-eabi-
|
||||||
MCU = cortex-m3
|
|
||||||
OPT = s
|
OPT = s
|
||||||
CPPDEFS += -DHSE_VALUE=12000000
|
CPPDEFS += -DHSE_VALUE=12000000
|
||||||
BITMAPS += $(patsubst %.png,%.lbm,$(wildcard bitmaps/Taranis/*.png)) bitmaps/Taranis/mainmenu.lbm
|
BITMAPS += $(patsubst %.png,%.lbm,$(wildcard bitmaps/Taranis/*.png)) bitmaps/Taranis/mainmenu.lbm
|
||||||
@@ -843,8 +847,13 @@ ifeq ($(PCB), TARANIS)
|
|||||||
PPM_CENTER_ADJUSTABLE = YES
|
PPM_CENTER_ADJUSTABLE = YES
|
||||||
DSM2 = PPM
|
DSM2 = PPM
|
||||||
CPPDEFS += -DPCBTARANIS -DCPUARM -DCPUSTM32 -DVIRTUALINPUTS -DLUAINPUTS -DXCURVES -DEEPROM_VARIANT=0 -DAUDIO -DPXX
|
CPPDEFS += -DPCBTARANIS -DCPUARM -DCPUSTM32 -DVIRTUALINPUTS -DLUAINPUTS -DXCURVES -DEEPROM_VARIANT=0 -DAUDIO -DPXX
|
||||||
INCDIRS += targets/taranis CoOS/kernel CoOS/portable
|
INCDIRS += targets/taranis CoOS CoOS/kernel CoOS/portable
|
||||||
EXTRAINCDIRS += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/include
|
ifeq ($(PCBREV), REV9E)
|
||||||
|
CPPDEFS += -DSTM32F40_41xxx
|
||||||
|
EXTRAINCDIRS += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Include targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc
|
||||||
|
else
|
||||||
|
EXTRAINCDIRS += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/include
|
||||||
|
endif
|
||||||
EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
|
EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
|
||||||
EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/hid/inc
|
EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/hid/inc
|
||||||
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_hardware.cpp
|
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_hardware.cpp
|
||||||
@@ -857,17 +866,31 @@ ifeq ($(PCB), TARANIS)
|
|||||||
CPPSRC += tasks_arm.cpp audio_arm.cpp sbus.cpp telemetry/telemetry.cpp
|
CPPSRC += tasks_arm.cpp audio_arm.cpp sbus.cpp telemetry/telemetry.cpp
|
||||||
CPPSRC += targets/taranis/pulses_driver.cpp targets/taranis/keys_driver.cpp targets/taranis/adc_driver.cpp targets/taranis/trainer_driver.cpp targets/taranis/audio_driver.cpp targets/taranis/uart3_driver.cpp targets/taranis/telemetry_driver.cpp
|
CPPSRC += targets/taranis/pulses_driver.cpp targets/taranis/keys_driver.cpp targets/taranis/adc_driver.cpp targets/taranis/trainer_driver.cpp targets/taranis/audio_driver.cpp targets/taranis/uart3_driver.cpp targets/taranis/telemetry_driver.cpp
|
||||||
CPPSRC += bmp.cpp gui/$(GUIDIRECTORY)/view_channels.cpp gui/$(GUIDIRECTORY)/view_about.cpp gui/$(GUIDIRECTORY)/view_text.cpp loadboot.cpp debug.cpp
|
CPPSRC += bmp.cpp gui/$(GUIDIRECTORY)/view_channels.cpp gui/$(GUIDIRECTORY)/view_about.cpp gui/$(GUIDIRECTORY)/view_text.cpp loadboot.cpp debug.cpp
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
|
ifeq ($(PCBREV), REV9E)
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dbgmcu.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dma.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rtc.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_pwr.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_usart.c
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c
|
||||||
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c
|
||||||
|
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s
|
||||||
|
else
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dbgmcu.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dma.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rtc.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_pwr.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_usart.c
|
||||||
|
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
|
||||||
|
endif
|
||||||
SRC += targets/taranis/usb_bsp.c targets/taranis/usbd_desc.c
|
SRC += targets/taranis/usb_bsp.c targets/taranis/usbd_desc.c
|
||||||
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c
|
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c
|
||||||
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd.c
|
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd.c
|
||||||
@@ -1621,7 +1644,7 @@ OBJS = $(TMP:.s=.o)
|
|||||||
@echo
|
@echo
|
||||||
@echo $(MSG_COMPILING) $@
|
@echo $(MSG_COMPILING) $@
|
||||||
$(CC) $(ARMCPPFLAGS) $< -o allsrc.o
|
$(CC) $(ARMCPPFLAGS) $< -o allsrc.o
|
||||||
$(CC) $(OBJS) allsrc.o -mcpu=cortex-m3 -mthumb -nostartfiles -lm -T$(LDSCRIPT) -Wl,-Map=$(TARGET).map,--cref,--no-warn-mismatch,--gc-sections $(NEWLIB_NANO_FLAGS) -o $@
|
$(CC) $(OBJS) allsrc.o -mcpu=$(MCU) -mthumb -nostartfiles -lm -T$(LDSCRIPT) -Wl,-Map=$(TARGET).map,--cref,--no-warn-mismatch,--gc-sections $(NEWLIB_NANO_FLAGS) -o $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Target: clean project.
|
# Target: clean project.
|
||||||
|
|||||||
@@ -27,7 +27,11 @@ BINX = $(CP) -O binary
|
|||||||
|
|
||||||
OBJDIR = .
|
OBJDIR = .
|
||||||
|
|
||||||
MCU = cortex-m3
|
ifeq ($(PCBREV), REV9E)
|
||||||
|
MCU = cortex-m4
|
||||||
|
else
|
||||||
|
MCU = cortex-m3
|
||||||
|
endif
|
||||||
|
|
||||||
# List all default C defines here, like -D_DEBUG=1
|
# List all default C defines here, like -D_DEBUG=1
|
||||||
DDEFS =
|
DDEFS =
|
||||||
@@ -109,8 +113,16 @@ else
|
|||||||
CPPDEFS += -DHSE_VALUE=12000000
|
CPPDEFS += -DHSE_VALUE=12000000
|
||||||
CPPDEFS += -DPCBTARANIS
|
CPPDEFS += -DPCBTARANIS
|
||||||
FULL_PRJ = $(PROJECT)_ramBoot
|
FULL_PRJ = $(PROJECT)_ramBoot
|
||||||
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc
|
ifeq ($(PCBREV), REV9E)
|
||||||
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include
|
CPPDEFS += -DSTM32F40_41xxx
|
||||||
|
EXTRAINCDIRS += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc
|
||||||
|
EXTRAINCDIRS += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include
|
||||||
|
EXTRAINCDIRS += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Include
|
||||||
|
else
|
||||||
|
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc
|
||||||
|
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include
|
||||||
|
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/include
|
||||||
|
endif
|
||||||
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc
|
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc
|
||||||
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
|
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
|
||||||
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc
|
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc
|
||||||
@@ -141,32 +153,40 @@ endif
|
|||||||
# Define ASM defines here
|
# Define ASM defines here
|
||||||
UADEFS =
|
UADEFS =
|
||||||
|
|
||||||
|
SRC =
|
||||||
|
|
||||||
ifeq ($(PCB), TARANIS)
|
ifeq ($(PCB), TARANIS)
|
||||||
SRC = ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c \
|
ifeq ($(PCBREV), REV9E)
|
||||||
../targets/taranis/i2c.c \
|
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
|
||||||
../targets/taranis/delays.c \
|
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
|
||||||
../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c \
|
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
|
||||||
../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c \
|
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
|
||||||
../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c \
|
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c
|
||||||
../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c \
|
else
|
||||||
../FatFs/ff.c \
|
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
|
||||||
../FatFs/option/ccsbcs.c \
|
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c \
|
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd.c \
|
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c \
|
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_core.c \
|
endif
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_ioreq.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_req.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_core.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_ioreq.c
|
||||||
../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_req.c
|
||||||
../targets/taranis/usbd_desc.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c
|
||||||
../targets/taranis/aspi.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c
|
||||||
../targets/taranis/usb_bsp.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
|
||||||
../targets/taranis/usb_driver.c \
|
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
|
||||||
../targets/taranis/pwr_driver.c \
|
SRC += ../targets/taranis/i2c.c ../targets/taranis/delays.c
|
||||||
init.c
|
SRC += ../FatFs/ff.c ../FatFs/option/ccsbcs.c
|
||||||
|
SRC += ../targets/taranis/usbd_desc.c
|
||||||
|
SRC += ../targets/taranis/aspi.c
|
||||||
|
SRC += ../targets/taranis/usb_bsp.c
|
||||||
|
SRC += ../targets/taranis/usb_driver.c
|
||||||
|
SRC += ../targets/taranis/pwr_driver.c
|
||||||
|
SRC += init.c
|
||||||
|
|
||||||
CPPSRC = ../targets/taranis/lcd_driver.cpp \
|
CPPSRC = ../targets/taranis/lcd_driver.cpp \
|
||||||
../targets/taranis/configure_pins.cpp \
|
../targets/taranis/configure_pins.cpp \
|
||||||
@@ -186,7 +206,12 @@ ifeq ($(PCBREV), REV9E)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# List ASM source files here
|
# List ASM source files here
|
||||||
ASRC = ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
|
|
||||||
|
ifeq ($(PCBREV), REV9E)
|
||||||
|
ASRC = ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s
|
||||||
|
else
|
||||||
|
ASRC = ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
|
||||||
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|||||||
@@ -355,17 +355,22 @@ void menuChannelsView(uint8_t event);
|
|||||||
|
|
||||||
#define KEY_MOVE_UP KEY_PLUS
|
#define KEY_MOVE_UP KEY_PLUS
|
||||||
#define KEY_MOVE_DOWN KEY_MINUS
|
#define KEY_MOVE_DOWN KEY_MINUS
|
||||||
|
|
||||||
#if defined(REV9E)
|
#if defined(REV9E)
|
||||||
#define CURSOR_MOVED_LEFT(event) (EVT_KEY_MASK(event) == KEY_MINUS)
|
#define CURSOR_MOVED_LEFT(event) (EVT_KEY_MASK(event) == KEY_MINUS)
|
||||||
#define CURSOR_MOVED_RIGHT(event) (EVT_KEY_MASK(event) == KEY_PLUS)
|
#define CURSOR_MOVED_RIGHT(event) (EVT_KEY_MASK(event) == KEY_PLUS)
|
||||||
|
#define CASE_EVT_ROTARY_MOVE_RIGHT CASE_EVT_ROTARY_RIGHT
|
||||||
|
#define CASE_EVT_ROTARY_MOVE_LEFT CASE_EVT_ROTARY_LEFT
|
||||||
|
#define IS_ROTARY_MOVE_RIGHT IS_ROTARY_RIGHT
|
||||||
|
#define IS_ROTARY_MOVE_LEFT IS_ROTARY_LEFT
|
||||||
#else
|
#else
|
||||||
#define CURSOR_MOVED_LEFT(event) (EVT_KEY_MASK(event) == KEY_PLUS)
|
#define CURSOR_MOVED_LEFT(event) (EVT_KEY_MASK(event) == KEY_PLUS)
|
||||||
#define CURSOR_MOVED_RIGHT(event) (EVT_KEY_MASK(event) == KEY_MINUS)
|
#define CURSOR_MOVED_RIGHT(event) (EVT_KEY_MASK(event) == KEY_MINUS)
|
||||||
|
#define CASE_EVT_ROTARY_MOVE_RIGHT CASE_EVT_ROTARY_LEFT
|
||||||
|
#define CASE_EVT_ROTARY_MOVE_LEFT CASE_EVT_ROTARY_RIGHT
|
||||||
|
#define IS_ROTARY_MOVE_RIGHT IS_ROTARY_LEFT
|
||||||
|
#define IS_ROTARY_MOVE_LEFT IS_ROTARY_RIGHT
|
||||||
#endif
|
#endif
|
||||||
#define CASE_EVT_ROTARY_MOVE_RIGHT CASE_EVT_ROTARY_LEFT
|
|
||||||
#define CASE_EVT_ROTARY_MOVE_LEFT CASE_EVT_ROTARY_RIGHT
|
|
||||||
#define IS_ROTARY_MOVE_RIGHT IS_ROTARY_LEFT
|
|
||||||
#define IS_ROTARY_MOVE_LEFT IS_ROTARY_RIGHT
|
|
||||||
|
|
||||||
#define REPEAT_LAST_CURSOR_MOVE() { if (CURSOR_MOVED_LEFT(event) || CURSOR_MOVED_RIGHT(event)) putEvent(event); else m_posHorz = 0; }
|
#define REPEAT_LAST_CURSOR_MOVE() { if (CURSOR_MOVED_LEFT(event) || CURSOR_MOVED_RIGHT(event)) putEvent(event); else m_posHorz = 0; }
|
||||||
#define MOVE_CURSOR_FROM_HERE() if (m_posHorz > 0) REPEAT_LAST_CURSOR_MOVE()
|
#define MOVE_CURSOR_FROM_HERE() if (m_posHorz > 0) REPEAT_LAST_CURSOR_MOVE()
|
||||||
|
|||||||
@@ -51,6 +51,9 @@
|
|||||||
|
|
||||||
#if defined(PCBSKY9X)
|
#if defined(PCBSKY9X)
|
||||||
#include "AT91SAM3S4.h"
|
#include "AT91SAM3S4.h"
|
||||||
|
#elif defined(PCBTARANIS) && defined(REV9E)
|
||||||
|
#include "stm32f4xx.h"
|
||||||
|
#include "stm32f4xx_gpio.h"
|
||||||
#elif defined(PCBTARANIS)
|
#elif defined(PCBTARANIS)
|
||||||
#include "stm32f2xx.h"
|
#include "stm32f2xx.h"
|
||||||
#include "stm32f2xx_gpio.h"
|
#include "stm32f2xx_gpio.h"
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f2xx.h"
|
#include "../../CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F2xx_StdPeriph_Driver
|
/** @addtogroup STM32F2xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+6
-4
@@ -12,15 +12,15 @@
|
|||||||
* is using in the C source code, usually in main.c. This file contains:
|
* is using in the C source code, usually in main.c. This file contains:
|
||||||
* - Configuration section that allows to select:
|
* - Configuration section that allows to select:
|
||||||
* - The device used in the target application
|
* - The device used in the target application
|
||||||
* - To use or not the peripheral’s drivers in application code(i.e.
|
* - To use or not the peripheral�s drivers in application code(i.e.
|
||||||
* code will be based on direct access to peripheral’s registers
|
* code will be based on direct access to peripheral�s registers
|
||||||
* rather than drivers API), this option is controlled by
|
* rather than drivers API), this option is controlled by
|
||||||
* "#define USE_STDPERIPH_DRIVER"
|
* "#define USE_STDPERIPH_DRIVER"
|
||||||
* - To change few application-specific parameters such as the HSE
|
* - To change few application-specific parameters such as the HSE
|
||||||
* crystal frequency
|
* crystal frequency
|
||||||
* - Data structures and the address mapping for all peripherals
|
* - Data structures and the address mapping for all peripherals
|
||||||
* - Peripheral's registers declarations and bits definition
|
* - Peripheral's registers declarations and bits definition
|
||||||
* - Macros to access peripheral’s registers hardware
|
* - Macros to access peripheral�s registers hardware
|
||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
@@ -53,6 +53,8 @@
|
|||||||
#ifndef __STM32F4xx_H
|
#ifndef __STM32F4xx_H
|
||||||
#define __STM32F4xx_H
|
#define __STM32F4xx_H
|
||||||
|
|
||||||
|
#define assert_param(xx)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
@@ -467,7 +469,7 @@ typedef enum IRQn
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "core_cm4.h" /* Cortex-M4 processor and core peripherals */
|
#include "../../../../Include/core_cm4.h" /* Cortex-M4 processor and core peripherals */
|
||||||
#include "system_stm32f4xx.h"
|
#include "system_stm32f4xx.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|||||||
-438
@@ -1,438 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file startup_stm32f40xx.s
|
|
||||||
* @author MCD Application Team
|
|
||||||
* @version V1.3.0
|
|
||||||
* @date 08-November-2013
|
|
||||||
* @brief STM32F401xx Devices vector table for RIDE7 toolchain.
|
|
||||||
* This module performs:
|
|
||||||
* - Set the initial SP
|
|
||||||
* - Set the initial PC == Reset_Handler,
|
|
||||||
* - Set the vector table entries with the exceptions ISR address
|
|
||||||
* - Configure the clock system
|
|
||||||
* - Branches to main in the C library (which eventually
|
|
||||||
* calls main()).
|
|
||||||
* After Reset the Cortex-M4 processor is in Thread mode,
|
|
||||||
* priority is Privileged, and the Stack is set to Main.
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
|
|
||||||
*
|
|
||||||
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
|
|
||||||
* You may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.st.com/software_license_agreement_liberty_v2
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
.cpu cortex-m3
|
|
||||||
.fpu softvfp
|
|
||||||
.thumb
|
|
||||||
|
|
||||||
.global g_pfnVectors
|
|
||||||
.global Default_Handler
|
|
||||||
|
|
||||||
/* start address for the initialization values of the .data section.
|
|
||||||
defined in linker script */
|
|
||||||
.word _sidata
|
|
||||||
/* start address for the .data section. defined in linker script */
|
|
||||||
.word _sdata
|
|
||||||
/* end address for the .data section. defined in linker script */
|
|
||||||
.word _edata
|
|
||||||
/* start address for the .bss section. defined in linker script */
|
|
||||||
.word _sbss
|
|
||||||
/* end address for the .bss section. defined in linker script */
|
|
||||||
.word _ebss
|
|
||||||
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor first
|
|
||||||
* starts execution following a reset event. Only the absolutely
|
|
||||||
* necessary set is performed, after which the application
|
|
||||||
* supplied main() routine is called.
|
|
||||||
* @param None
|
|
||||||
* @retval : None
|
|
||||||
*/
|
|
||||||
|
|
||||||
.section .text.Reset_Handler
|
|
||||||
.weak Reset_Handler
|
|
||||||
.type Reset_Handler, %function
|
|
||||||
Reset_Handler:
|
|
||||||
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
|
||||||
movs r1, #0
|
|
||||||
b LoopCopyDataInit
|
|
||||||
|
|
||||||
CopyDataInit:
|
|
||||||
ldr r3, =_sidata
|
|
||||||
ldr r3, [r3, r1]
|
|
||||||
str r3, [r0, r1]
|
|
||||||
adds r1, r1, #4
|
|
||||||
|
|
||||||
LoopCopyDataInit:
|
|
||||||
ldr r0, =_sdata
|
|
||||||
ldr r3, =_edata
|
|
||||||
adds r2, r0, r1
|
|
||||||
cmp r2, r3
|
|
||||||
bcc CopyDataInit
|
|
||||||
ldr r2, =_sbss
|
|
||||||
b LoopFillZerobss
|
|
||||||
/* Zero fill the bss segment. */
|
|
||||||
FillZerobss:
|
|
||||||
movs r3, #0
|
|
||||||
str r3, [r2], #4
|
|
||||||
|
|
||||||
LoopFillZerobss:
|
|
||||||
ldr r3, = _ebss
|
|
||||||
cmp r2, r3
|
|
||||||
bcc FillZerobss
|
|
||||||
|
|
||||||
/* Call the clock system intitialization function.*/
|
|
||||||
bl SystemInit
|
|
||||||
/* Call the application's entry point.*/
|
|
||||||
bl main
|
|
||||||
bx lr
|
|
||||||
.size Reset_Handler, .-Reset_Handler
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor receives an
|
|
||||||
* unexpected interrupt. This simply enters an infinite loop, preserving
|
|
||||||
* the system state for examination by a debugger.
|
|
||||||
* @param None
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
.section .text.Default_Handler,"ax",%progbits
|
|
||||||
Default_Handler:
|
|
||||||
Infinite_Loop:
|
|
||||||
b Infinite_Loop
|
|
||||||
.size Default_Handler, .-Default_Handler
|
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* The minimal vector table for a Cortex M3. Note that the proper constructs
|
|
||||||
* must be placed on this to ensure that it ends up at physical address
|
|
||||||
* 0x0000.0000.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.section .isr_vector,"a",%progbits
|
|
||||||
.type g_pfnVectors, %object
|
|
||||||
.size g_pfnVectors, .-g_pfnVectors
|
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
|
||||||
.word _estack
|
|
||||||
.word Reset_Handler
|
|
||||||
.word NMI_Handler
|
|
||||||
.word HardFault_Handler
|
|
||||||
.word MemManage_Handler
|
|
||||||
.word BusFault_Handler
|
|
||||||
.word UsageFault_Handler
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word SVC_Handler
|
|
||||||
.word DebugMon_Handler
|
|
||||||
.word 0
|
|
||||||
.word PendSV_Handler
|
|
||||||
.word SysTick_Handler
|
|
||||||
|
|
||||||
/* External Interrupts */
|
|
||||||
.word WWDG_IRQHandler /* Window WatchDog */
|
|
||||||
.word PVD_IRQHandler /* PVD through EXTI Line detection */
|
|
||||||
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
|
|
||||||
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
|
|
||||||
.word FLASH_IRQHandler /* FLASH */
|
|
||||||
.word RCC_IRQHandler /* RCC */
|
|
||||||
.word EXTI0_IRQHandler /* EXTI Line0 */
|
|
||||||
.word EXTI1_IRQHandler /* EXTI Line1 */
|
|
||||||
.word EXTI2_IRQHandler /* EXTI Line2 */
|
|
||||||
.word EXTI3_IRQHandler /* EXTI Line3 */
|
|
||||||
.word EXTI4_IRQHandler /* EXTI Line4 */
|
|
||||||
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
|
|
||||||
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
|
|
||||||
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
|
|
||||||
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
|
|
||||||
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
|
|
||||||
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
|
|
||||||
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
|
|
||||||
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
|
|
||||||
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
|
|
||||||
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
|
|
||||||
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
|
|
||||||
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
|
|
||||||
.word TIM2_IRQHandler /* TIM2 */
|
|
||||||
.word TIM3_IRQHandler /* TIM3 */
|
|
||||||
.word TIM4_IRQHandler /* TIM4 */
|
|
||||||
.word I2C1_EV_IRQHandler /* I2C1 Event */
|
|
||||||
.word I2C1_ER_IRQHandler /* I2C1 Error */
|
|
||||||
.word I2C2_EV_IRQHandler /* I2C2 Event */
|
|
||||||
.word I2C2_ER_IRQHandler /* I2C2 Error */
|
|
||||||
.word SPI1_IRQHandler /* SPI1 */
|
|
||||||
.word SPI2_IRQHandler /* SPI2 */
|
|
||||||
.word USART1_IRQHandler /* USART1 */
|
|
||||||
.word USART2_IRQHandler /* USART2 */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
|
|
||||||
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
|
|
||||||
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word SDIO_IRQHandler /* SDIO */
|
|
||||||
.word TIM5_IRQHandler /* TIM5 */
|
|
||||||
.word SPI3_IRQHandler /* SPI3 */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
|
|
||||||
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
|
|
||||||
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
|
|
||||||
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
|
|
||||||
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word OTG_FS_IRQHandler /* USB OTG FS */
|
|
||||||
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
|
|
||||||
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
|
|
||||||
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
|
|
||||||
.word USART6_IRQHandler /* USART6 */
|
|
||||||
.word I2C3_EV_IRQHandler /* I2C3 event */
|
|
||||||
.word I2C3_ER_IRQHandler /* I2C3 error */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word FPU_IRQHandler /* FPU */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word SPI4_IRQHandler /* SPI4 */
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* Provide weak aliases for each Exception handler to the Default_Handler.
|
|
||||||
* As they are weak aliases, any function with the same name will override
|
|
||||||
* this definition.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.weak NMI_Handler
|
|
||||||
.thumb_set NMI_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak HardFault_Handler
|
|
||||||
.thumb_set HardFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak MemManage_Handler
|
|
||||||
.thumb_set MemManage_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak BusFault_Handler
|
|
||||||
.thumb_set BusFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak UsageFault_Handler
|
|
||||||
.thumb_set UsageFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SVC_Handler
|
|
||||||
.thumb_set SVC_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak DebugMon_Handler
|
|
||||||
.thumb_set DebugMon_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak PendSV_Handler
|
|
||||||
.thumb_set PendSV_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SysTick_Handler
|
|
||||||
.thumb_set SysTick_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak WWDG_IRQHandler
|
|
||||||
.thumb_set WWDG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak PVD_IRQHandler
|
|
||||||
.thumb_set PVD_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TAMP_STAMP_IRQHandler
|
|
||||||
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_WKUP_IRQHandler
|
|
||||||
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FLASH_IRQHandler
|
|
||||||
.thumb_set FLASH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RCC_IRQHandler
|
|
||||||
.thumb_set RCC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI0_IRQHandler
|
|
||||||
.thumb_set EXTI0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI1_IRQHandler
|
|
||||||
.thumb_set EXTI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI2_IRQHandler
|
|
||||||
.thumb_set EXTI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI3_IRQHandler
|
|
||||||
.thumb_set EXTI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI4_IRQHandler
|
|
||||||
.thumb_set EXTI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ADC_IRQHandler
|
|
||||||
.thumb_set ADC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI9_5_IRQHandler
|
|
||||||
.thumb_set EXTI9_5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_BRK_TIM9_IRQHandler
|
|
||||||
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_UP_TIM10_IRQHandler
|
|
||||||
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_TRG_COM_TIM11_IRQHandler
|
|
||||||
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_CC_IRQHandler
|
|
||||||
.thumb_set TIM1_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM2_IRQHandler
|
|
||||||
.thumb_set TIM2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM3_IRQHandler
|
|
||||||
.thumb_set TIM3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM4_IRQHandler
|
|
||||||
.thumb_set TIM4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_EV_IRQHandler
|
|
||||||
.thumb_set I2C1_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_ER_IRQHandler
|
|
||||||
.thumb_set I2C1_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_EV_IRQHandler
|
|
||||||
.thumb_set I2C2_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_ER_IRQHandler
|
|
||||||
.thumb_set I2C2_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI1_IRQHandler
|
|
||||||
.thumb_set SPI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI2_IRQHandler
|
|
||||||
.thumb_set SPI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART1_IRQHandler
|
|
||||||
.thumb_set USART1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART2_IRQHandler
|
|
||||||
.thumb_set USART2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI15_10_IRQHandler
|
|
||||||
.thumb_set EXTI15_10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_Alarm_IRQHandler
|
|
||||||
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SDIO_IRQHandler
|
|
||||||
.thumb_set SDIO_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM5_IRQHandler
|
|
||||||
.thumb_set TIM5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI3_IRQHandler
|
|
||||||
.thumb_set SPI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_IRQHandler
|
|
||||||
.thumb_set OTG_FS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART6_IRQHandler
|
|
||||||
.thumb_set USART6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_EV_IRQHandler
|
|
||||||
.thumb_set I2C3_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_ER_IRQHandler
|
|
||||||
.thumb_set I2C3_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FPU_IRQHandler
|
|
||||||
.thumb_set FPU_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI4_IRQHandler
|
|
||||||
.thumb_set SPI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
+2
@@ -101,6 +101,8 @@ LoopFillZerobss:
|
|||||||
|
|
||||||
/* Call the clock system intitialization function.*/
|
/* Call the clock system intitialization function.*/
|
||||||
bl SystemInit
|
bl SystemInit
|
||||||
|
/* Call C++ constructors for static objects */
|
||||||
|
bl __libc_init_array
|
||||||
/* Call the application's entry point.*/
|
/* Call the application's entry point.*/
|
||||||
bl main
|
bl main
|
||||||
bx lr
|
bx lr
|
||||||
|
|||||||
-516
@@ -1,516 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file startup_stm32f40xx.s
|
|
||||||
* @author MCD Application Team
|
|
||||||
* @version V1.3.0
|
|
||||||
* @date 08-November-2013
|
|
||||||
* @brief STM32F40xxx/41xxx Devices vector table for RIDE7 toolchain.
|
|
||||||
* Same as startup_stm32f40xx.s and maintained for legacy purpose
|
|
||||||
* This module performs:
|
|
||||||
* - Set the initial SP
|
|
||||||
* - Set the initial PC == Reset_Handler,
|
|
||||||
* - Set the vector table entries with the exceptions ISR address
|
|
||||||
* - Configure the clock system and the external SRAM mounted on
|
|
||||||
* STM324xG-EVAL board to be used as data memory (optional,
|
|
||||||
* to be enabled by user)
|
|
||||||
* - Branches to main in the C library (which eventually
|
|
||||||
* calls main()).
|
|
||||||
* After Reset the Cortex-M4 processor is in Thread mode,
|
|
||||||
* priority is Privileged, and the Stack is set to Main.
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
|
|
||||||
*
|
|
||||||
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
|
|
||||||
* You may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.st.com/software_license_agreement_liberty_v2
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
.cpu cortex-m3
|
|
||||||
.fpu softvfp
|
|
||||||
.thumb
|
|
||||||
|
|
||||||
.global g_pfnVectors
|
|
||||||
.global Default_Handler
|
|
||||||
|
|
||||||
/* start address for the initialization values of the .data section.
|
|
||||||
defined in linker script */
|
|
||||||
.word _sidata
|
|
||||||
/* start address for the .data section. defined in linker script */
|
|
||||||
.word _sdata
|
|
||||||
/* end address for the .data section. defined in linker script */
|
|
||||||
.word _edata
|
|
||||||
/* start address for the .bss section. defined in linker script */
|
|
||||||
.word _sbss
|
|
||||||
/* end address for the .bss section. defined in linker script */
|
|
||||||
.word _ebss
|
|
||||||
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor first
|
|
||||||
* starts execution following a reset event. Only the absolutely
|
|
||||||
* necessary set is performed, after which the application
|
|
||||||
* supplied main() routine is called.
|
|
||||||
* @param None
|
|
||||||
* @retval : None
|
|
||||||
*/
|
|
||||||
|
|
||||||
.section .text.Reset_Handler
|
|
||||||
.weak Reset_Handler
|
|
||||||
.type Reset_Handler, %function
|
|
||||||
Reset_Handler:
|
|
||||||
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
|
||||||
movs r1, #0
|
|
||||||
b LoopCopyDataInit
|
|
||||||
|
|
||||||
CopyDataInit:
|
|
||||||
ldr r3, =_sidata
|
|
||||||
ldr r3, [r3, r1]
|
|
||||||
str r3, [r0, r1]
|
|
||||||
adds r1, r1, #4
|
|
||||||
|
|
||||||
LoopCopyDataInit:
|
|
||||||
ldr r0, =_sdata
|
|
||||||
ldr r3, =_edata
|
|
||||||
adds r2, r0, r1
|
|
||||||
cmp r2, r3
|
|
||||||
bcc CopyDataInit
|
|
||||||
ldr r2, =_sbss
|
|
||||||
b LoopFillZerobss
|
|
||||||
/* Zero fill the bss segment. */
|
|
||||||
FillZerobss:
|
|
||||||
movs r3, #0
|
|
||||||
str r3, [r2], #4
|
|
||||||
|
|
||||||
LoopFillZerobss:
|
|
||||||
ldr r3, = _ebss
|
|
||||||
cmp r2, r3
|
|
||||||
bcc FillZerobss
|
|
||||||
|
|
||||||
/* Call the clock system intitialization function.*/
|
|
||||||
bl SystemInit
|
|
||||||
/* Call the application's entry point.*/
|
|
||||||
bl main
|
|
||||||
bx lr
|
|
||||||
.size Reset_Handler, .-Reset_Handler
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor receives an
|
|
||||||
* unexpected interrupt. This simply enters an infinite loop, preserving
|
|
||||||
* the system state for examination by a debugger.
|
|
||||||
* @param None
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
.section .text.Default_Handler,"ax",%progbits
|
|
||||||
Default_Handler:
|
|
||||||
Infinite_Loop:
|
|
||||||
b Infinite_Loop
|
|
||||||
.size Default_Handler, .-Default_Handler
|
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* The minimal vector table for a Cortex M3. Note that the proper constructs
|
|
||||||
* must be placed on this to ensure that it ends up at physical address
|
|
||||||
* 0x0000.0000.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.section .isr_vector,"a",%progbits
|
|
||||||
.type g_pfnVectors, %object
|
|
||||||
.size g_pfnVectors, .-g_pfnVectors
|
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
|
||||||
.word _estack
|
|
||||||
.word Reset_Handler
|
|
||||||
.word NMI_Handler
|
|
||||||
.word HardFault_Handler
|
|
||||||
.word MemManage_Handler
|
|
||||||
.word BusFault_Handler
|
|
||||||
.word UsageFault_Handler
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word SVC_Handler
|
|
||||||
.word DebugMon_Handler
|
|
||||||
.word 0
|
|
||||||
.word PendSV_Handler
|
|
||||||
.word SysTick_Handler
|
|
||||||
|
|
||||||
/* External Interrupts */
|
|
||||||
.word WWDG_IRQHandler /* Window WatchDog */
|
|
||||||
.word PVD_IRQHandler /* PVD through EXTI Line detection */
|
|
||||||
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
|
|
||||||
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
|
|
||||||
.word FLASH_IRQHandler /* FLASH */
|
|
||||||
.word RCC_IRQHandler /* RCC */
|
|
||||||
.word EXTI0_IRQHandler /* EXTI Line0 */
|
|
||||||
.word EXTI1_IRQHandler /* EXTI Line1 */
|
|
||||||
.word EXTI2_IRQHandler /* EXTI Line2 */
|
|
||||||
.word EXTI3_IRQHandler /* EXTI Line3 */
|
|
||||||
.word EXTI4_IRQHandler /* EXTI Line4 */
|
|
||||||
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
|
|
||||||
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
|
|
||||||
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
|
|
||||||
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
|
|
||||||
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
|
|
||||||
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
|
|
||||||
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
|
|
||||||
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
|
|
||||||
.word CAN1_TX_IRQHandler /* CAN1 TX */
|
|
||||||
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
|
|
||||||
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
|
|
||||||
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
|
|
||||||
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
|
|
||||||
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
|
|
||||||
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
|
|
||||||
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
|
|
||||||
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
|
|
||||||
.word TIM2_IRQHandler /* TIM2 */
|
|
||||||
.word TIM3_IRQHandler /* TIM3 */
|
|
||||||
.word TIM4_IRQHandler /* TIM4 */
|
|
||||||
.word I2C1_EV_IRQHandler /* I2C1 Event */
|
|
||||||
.word I2C1_ER_IRQHandler /* I2C1 Error */
|
|
||||||
.word I2C2_EV_IRQHandler /* I2C2 Event */
|
|
||||||
.word I2C2_ER_IRQHandler /* I2C2 Error */
|
|
||||||
.word SPI1_IRQHandler /* SPI1 */
|
|
||||||
.word SPI2_IRQHandler /* SPI2 */
|
|
||||||
.word USART1_IRQHandler /* USART1 */
|
|
||||||
.word USART2_IRQHandler /* USART2 */
|
|
||||||
.word USART3_IRQHandler /* USART3 */
|
|
||||||
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
|
|
||||||
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
|
|
||||||
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
|
|
||||||
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
|
|
||||||
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
|
|
||||||
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
|
|
||||||
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
|
|
||||||
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
|
|
||||||
.word FSMC_IRQHandler /* FSMC */
|
|
||||||
.word SDIO_IRQHandler /* SDIO */
|
|
||||||
.word TIM5_IRQHandler /* TIM5 */
|
|
||||||
.word SPI3_IRQHandler /* SPI3 */
|
|
||||||
.word UART4_IRQHandler /* UART4 */
|
|
||||||
.word UART5_IRQHandler /* UART5 */
|
|
||||||
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
|
|
||||||
.word TIM7_IRQHandler /* TIM7 */
|
|
||||||
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
|
|
||||||
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
|
|
||||||
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
|
|
||||||
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
|
|
||||||
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
|
|
||||||
.word ETH_IRQHandler /* Ethernet */
|
|
||||||
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
|
|
||||||
.word CAN2_TX_IRQHandler /* CAN2 TX */
|
|
||||||
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
|
|
||||||
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
|
|
||||||
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
|
|
||||||
.word OTG_FS_IRQHandler /* USB OTG FS */
|
|
||||||
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
|
|
||||||
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
|
|
||||||
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
|
|
||||||
.word USART6_IRQHandler /* USART6 */
|
|
||||||
.word I2C3_EV_IRQHandler /* I2C3 event */
|
|
||||||
.word I2C3_ER_IRQHandler /* I2C3 error */
|
|
||||||
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
|
|
||||||
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
|
|
||||||
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
|
|
||||||
.word OTG_HS_IRQHandler /* USB OTG HS */
|
|
||||||
.word DCMI_IRQHandler /* DCMI */
|
|
||||||
.word CRYP_IRQHandler /* CRYP crypto */
|
|
||||||
.word HASH_RNG_IRQHandler /* Hash and Rng */
|
|
||||||
.word FPU_IRQHandler /* FPU */
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* Provide weak aliases for each Exception handler to the Default_Handler.
|
|
||||||
* As they are weak aliases, any function with the same name will override
|
|
||||||
* this definition.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.weak NMI_Handler
|
|
||||||
.thumb_set NMI_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak HardFault_Handler
|
|
||||||
.thumb_set HardFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak MemManage_Handler
|
|
||||||
.thumb_set MemManage_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak BusFault_Handler
|
|
||||||
.thumb_set BusFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak UsageFault_Handler
|
|
||||||
.thumb_set UsageFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SVC_Handler
|
|
||||||
.thumb_set SVC_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak DebugMon_Handler
|
|
||||||
.thumb_set DebugMon_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak PendSV_Handler
|
|
||||||
.thumb_set PendSV_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SysTick_Handler
|
|
||||||
.thumb_set SysTick_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak WWDG_IRQHandler
|
|
||||||
.thumb_set WWDG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak PVD_IRQHandler
|
|
||||||
.thumb_set PVD_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TAMP_STAMP_IRQHandler
|
|
||||||
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_WKUP_IRQHandler
|
|
||||||
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FLASH_IRQHandler
|
|
||||||
.thumb_set FLASH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RCC_IRQHandler
|
|
||||||
.thumb_set RCC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI0_IRQHandler
|
|
||||||
.thumb_set EXTI0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI1_IRQHandler
|
|
||||||
.thumb_set EXTI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI2_IRQHandler
|
|
||||||
.thumb_set EXTI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI3_IRQHandler
|
|
||||||
.thumb_set EXTI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI4_IRQHandler
|
|
||||||
.thumb_set EXTI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ADC_IRQHandler
|
|
||||||
.thumb_set ADC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_TX_IRQHandler
|
|
||||||
.thumb_set CAN1_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX0_IRQHandler
|
|
||||||
.thumb_set CAN1_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX1_IRQHandler
|
|
||||||
.thumb_set CAN1_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_SCE_IRQHandler
|
|
||||||
.thumb_set CAN1_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI9_5_IRQHandler
|
|
||||||
.thumb_set EXTI9_5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_BRK_TIM9_IRQHandler
|
|
||||||
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_UP_TIM10_IRQHandler
|
|
||||||
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_TRG_COM_TIM11_IRQHandler
|
|
||||||
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_CC_IRQHandler
|
|
||||||
.thumb_set TIM1_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM2_IRQHandler
|
|
||||||
.thumb_set TIM2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM3_IRQHandler
|
|
||||||
.thumb_set TIM3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM4_IRQHandler
|
|
||||||
.thumb_set TIM4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_EV_IRQHandler
|
|
||||||
.thumb_set I2C1_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_ER_IRQHandler
|
|
||||||
.thumb_set I2C1_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_EV_IRQHandler
|
|
||||||
.thumb_set I2C2_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_ER_IRQHandler
|
|
||||||
.thumb_set I2C2_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI1_IRQHandler
|
|
||||||
.thumb_set SPI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI2_IRQHandler
|
|
||||||
.thumb_set SPI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART1_IRQHandler
|
|
||||||
.thumb_set USART1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART2_IRQHandler
|
|
||||||
.thumb_set USART2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART3_IRQHandler
|
|
||||||
.thumb_set USART3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI15_10_IRQHandler
|
|
||||||
.thumb_set EXTI15_10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_Alarm_IRQHandler
|
|
||||||
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_BRK_TIM12_IRQHandler
|
|
||||||
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_UP_TIM13_IRQHandler
|
|
||||||
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_TRG_COM_TIM14_IRQHandler
|
|
||||||
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_CC_IRQHandler
|
|
||||||
.thumb_set TIM8_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FSMC_IRQHandler
|
|
||||||
.thumb_set FSMC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SDIO_IRQHandler
|
|
||||||
.thumb_set SDIO_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM5_IRQHandler
|
|
||||||
.thumb_set TIM5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI3_IRQHandler
|
|
||||||
.thumb_set SPI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART4_IRQHandler
|
|
||||||
.thumb_set UART4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART5_IRQHandler
|
|
||||||
.thumb_set UART5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM6_DAC_IRQHandler
|
|
||||||
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM7_IRQHandler
|
|
||||||
.thumb_set TIM7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_IRQHandler
|
|
||||||
.thumb_set ETH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_WKUP_IRQHandler
|
|
||||||
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_TX_IRQHandler
|
|
||||||
.thumb_set CAN2_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX0_IRQHandler
|
|
||||||
.thumb_set CAN2_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX1_IRQHandler
|
|
||||||
.thumb_set CAN2_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_SCE_IRQHandler
|
|
||||||
.thumb_set CAN2_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_IRQHandler
|
|
||||||
.thumb_set OTG_FS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART6_IRQHandler
|
|
||||||
.thumb_set USART6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_EV_IRQHandler
|
|
||||||
.thumb_set I2C3_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_ER_IRQHandler
|
|
||||||
.thumb_set I2C3_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_OUT_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_IN_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_IRQHandler
|
|
||||||
.thumb_set OTG_HS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DCMI_IRQHandler
|
|
||||||
.thumb_set DCMI_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CRYP_IRQHandler
|
|
||||||
.thumb_set CRYP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak HASH_RNG_IRQHandler
|
|
||||||
.thumb_set HASH_RNG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FPU_IRQHandler
|
|
||||||
.thumb_set FPU_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
-551
@@ -1,551 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file startup_stm32f427_437xx.s
|
|
||||||
* @author MCD Application Team
|
|
||||||
* @version V1.3.0
|
|
||||||
* @date 08-November-2013
|
|
||||||
* @brief STM32F427xx/437xx Devices vector table for RIDE7 toolchain.
|
|
||||||
* This module performs:
|
|
||||||
* - Set the initial SP
|
|
||||||
* - Set the initial PC == Reset_Handler,
|
|
||||||
* - Set the vector table entries with the exceptions ISR address
|
|
||||||
* - Configure the clock system and the external SRAM mounted on
|
|
||||||
* STM324x7I-EVAL board to be used as data memory (optional,
|
|
||||||
* to be enabled by user)
|
|
||||||
* - Branches to main in the C library (which eventually
|
|
||||||
* calls main()).
|
|
||||||
* After Reset the Cortex-M4 processor is in Thread mode,
|
|
||||||
* priority is Privileged, and the Stack is set to Main.
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
|
|
||||||
*
|
|
||||||
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
|
|
||||||
* You may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.st.com/software_license_agreement_liberty_v2
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
.cpu cortex-m3
|
|
||||||
.fpu softvfp
|
|
||||||
.thumb
|
|
||||||
|
|
||||||
.global g_pfnVectors
|
|
||||||
.global Default_Handler
|
|
||||||
|
|
||||||
/* start address for the initialization values of the .data section.
|
|
||||||
defined in linker script */
|
|
||||||
.word _sidata
|
|
||||||
/* start address for the .data section. defined in linker script */
|
|
||||||
.word _sdata
|
|
||||||
/* end address for the .data section. defined in linker script */
|
|
||||||
.word _edata
|
|
||||||
/* start address for the .bss section. defined in linker script */
|
|
||||||
.word _sbss
|
|
||||||
/* end address for the .bss section. defined in linker script */
|
|
||||||
.word _ebss
|
|
||||||
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor first
|
|
||||||
* starts execution following a reset event. Only the absolutely
|
|
||||||
* necessary set is performed, after which the application
|
|
||||||
* supplied main() routine is called.
|
|
||||||
* @param None
|
|
||||||
* @retval : None
|
|
||||||
*/
|
|
||||||
|
|
||||||
.section .text.Reset_Handler
|
|
||||||
.weak Reset_Handler
|
|
||||||
.type Reset_Handler, %function
|
|
||||||
Reset_Handler:
|
|
||||||
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
|
||||||
movs r1, #0
|
|
||||||
b LoopCopyDataInit
|
|
||||||
|
|
||||||
CopyDataInit:
|
|
||||||
ldr r3, =_sidata
|
|
||||||
ldr r3, [r3, r1]
|
|
||||||
str r3, [r0, r1]
|
|
||||||
adds r1, r1, #4
|
|
||||||
|
|
||||||
LoopCopyDataInit:
|
|
||||||
ldr r0, =_sdata
|
|
||||||
ldr r3, =_edata
|
|
||||||
adds r2, r0, r1
|
|
||||||
cmp r2, r3
|
|
||||||
bcc CopyDataInit
|
|
||||||
ldr r2, =_sbss
|
|
||||||
b LoopFillZerobss
|
|
||||||
/* Zero fill the bss segment. */
|
|
||||||
FillZerobss:
|
|
||||||
movs r3, #0
|
|
||||||
str r3, [r2], #4
|
|
||||||
|
|
||||||
LoopFillZerobss:
|
|
||||||
ldr r3, = _ebss
|
|
||||||
cmp r2, r3
|
|
||||||
bcc FillZerobss
|
|
||||||
|
|
||||||
/* Call the clock system intitialization function.*/
|
|
||||||
bl SystemInit
|
|
||||||
/* Call the application's entry point.*/
|
|
||||||
bl main
|
|
||||||
bx lr
|
|
||||||
.size Reset_Handler, .-Reset_Handler
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor receives an
|
|
||||||
* unexpected interrupt. This simply enters an infinite loop, preserving
|
|
||||||
* the system state for examination by a debugger.
|
|
||||||
* @param None
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
.section .text.Default_Handler,"ax",%progbits
|
|
||||||
Default_Handler:
|
|
||||||
Infinite_Loop:
|
|
||||||
b Infinite_Loop
|
|
||||||
.size Default_Handler, .-Default_Handler
|
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* The minimal vector table for a Cortex M3. Note that the proper constructs
|
|
||||||
* must be placed on this to ensure that it ends up at physical address
|
|
||||||
* 0x0000.0000.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.section .isr_vector,"a",%progbits
|
|
||||||
.type g_pfnVectors, %object
|
|
||||||
.size g_pfnVectors, .-g_pfnVectors
|
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
|
||||||
.word _estack
|
|
||||||
.word Reset_Handler
|
|
||||||
.word NMI_Handler
|
|
||||||
.word HardFault_Handler
|
|
||||||
.word MemManage_Handler
|
|
||||||
.word BusFault_Handler
|
|
||||||
.word UsageFault_Handler
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word SVC_Handler
|
|
||||||
.word DebugMon_Handler
|
|
||||||
.word 0
|
|
||||||
.word PendSV_Handler
|
|
||||||
.word SysTick_Handler
|
|
||||||
|
|
||||||
/* External Interrupts */
|
|
||||||
.word WWDG_IRQHandler /* Window WatchDog */
|
|
||||||
.word PVD_IRQHandler /* PVD through EXTI Line detection */
|
|
||||||
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
|
|
||||||
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
|
|
||||||
.word FLASH_IRQHandler /* FLASH */
|
|
||||||
.word RCC_IRQHandler /* RCC */
|
|
||||||
.word EXTI0_IRQHandler /* EXTI Line0 */
|
|
||||||
.word EXTI1_IRQHandler /* EXTI Line1 */
|
|
||||||
.word EXTI2_IRQHandler /* EXTI Line2 */
|
|
||||||
.word EXTI3_IRQHandler /* EXTI Line3 */
|
|
||||||
.word EXTI4_IRQHandler /* EXTI Line4 */
|
|
||||||
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
|
|
||||||
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
|
|
||||||
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
|
|
||||||
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
|
|
||||||
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
|
|
||||||
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
|
|
||||||
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
|
|
||||||
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
|
|
||||||
.word CAN1_TX_IRQHandler /* CAN1 TX */
|
|
||||||
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
|
|
||||||
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
|
|
||||||
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
|
|
||||||
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
|
|
||||||
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
|
|
||||||
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
|
|
||||||
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
|
|
||||||
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
|
|
||||||
.word TIM2_IRQHandler /* TIM2 */
|
|
||||||
.word TIM3_IRQHandler /* TIM3 */
|
|
||||||
.word TIM4_IRQHandler /* TIM4 */
|
|
||||||
.word I2C1_EV_IRQHandler /* I2C1 Event */
|
|
||||||
.word I2C1_ER_IRQHandler /* I2C1 Error */
|
|
||||||
.word I2C2_EV_IRQHandler /* I2C2 Event */
|
|
||||||
.word I2C2_ER_IRQHandler /* I2C2 Error */
|
|
||||||
.word SPI1_IRQHandler /* SPI1 */
|
|
||||||
.word SPI2_IRQHandler /* SPI2 */
|
|
||||||
.word USART1_IRQHandler /* USART1 */
|
|
||||||
.word USART2_IRQHandler /* USART2 */
|
|
||||||
.word USART3_IRQHandler /* USART3 */
|
|
||||||
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
|
|
||||||
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
|
|
||||||
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
|
|
||||||
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
|
|
||||||
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
|
|
||||||
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
|
|
||||||
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
|
|
||||||
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
|
|
||||||
.word FSMC_IRQHandler /* FSMC */
|
|
||||||
.word SDIO_IRQHandler /* SDIO */
|
|
||||||
.word TIM5_IRQHandler /* TIM5 */
|
|
||||||
.word SPI3_IRQHandler /* SPI3 */
|
|
||||||
.word UART4_IRQHandler /* UART4 */
|
|
||||||
.word UART5_IRQHandler /* UART5 */
|
|
||||||
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
|
|
||||||
.word TIM7_IRQHandler /* TIM7 */
|
|
||||||
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
|
|
||||||
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
|
|
||||||
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
|
|
||||||
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
|
|
||||||
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
|
|
||||||
.word ETH_IRQHandler /* Ethernet */
|
|
||||||
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
|
|
||||||
.word CAN2_TX_IRQHandler /* CAN2 TX */
|
|
||||||
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
|
|
||||||
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
|
|
||||||
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
|
|
||||||
.word OTG_FS_IRQHandler /* USB OTG FS */
|
|
||||||
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
|
|
||||||
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
|
|
||||||
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
|
|
||||||
.word USART6_IRQHandler /* USART6 */
|
|
||||||
.word I2C3_EV_IRQHandler /* I2C3 event */
|
|
||||||
.word I2C3_ER_IRQHandler /* I2C3 error */
|
|
||||||
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
|
|
||||||
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
|
|
||||||
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
|
|
||||||
.word OTG_HS_IRQHandler /* USB OTG HS */
|
|
||||||
.word DCMI_IRQHandler /* DCMI */
|
|
||||||
.word CRYP_IRQHandler /* CRYP crypto */
|
|
||||||
.word HASH_RNG_IRQHandler /* Hash and Rng */
|
|
||||||
.word FPU_IRQHandler /* FPU */
|
|
||||||
.word UART7_IRQHandler /* UART7 */
|
|
||||||
.word UART8_IRQHandler /* UART8 */
|
|
||||||
.word SPI4_IRQHandler /* SPI4 */
|
|
||||||
.word SPI5_IRQHandler /* SPI5 */
|
|
||||||
.word SPI6_IRQHandler /* SPI6 */
|
|
||||||
.word SAI1_IRQHandler /* SAI1 */
|
|
||||||
.word LTDC_IRQHandler /* LTDC */
|
|
||||||
.word LTDC_ER_IRQHandler /* LTDC error */
|
|
||||||
.word DMA2D_IRQHandler /* DMA2D */
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* Provide weak aliases for each Exception handler to the Default_Handler.
|
|
||||||
* As they are weak aliases, any function with the same name will override
|
|
||||||
* this definition.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.weak NMI_Handler
|
|
||||||
.thumb_set NMI_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak HardFault_Handler
|
|
||||||
.thumb_set HardFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak MemManage_Handler
|
|
||||||
.thumb_set MemManage_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak BusFault_Handler
|
|
||||||
.thumb_set BusFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak UsageFault_Handler
|
|
||||||
.thumb_set UsageFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SVC_Handler
|
|
||||||
.thumb_set SVC_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak DebugMon_Handler
|
|
||||||
.thumb_set DebugMon_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak PendSV_Handler
|
|
||||||
.thumb_set PendSV_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SysTick_Handler
|
|
||||||
.thumb_set SysTick_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak WWDG_IRQHandler
|
|
||||||
.thumb_set WWDG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak PVD_IRQHandler
|
|
||||||
.thumb_set PVD_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TAMP_STAMP_IRQHandler
|
|
||||||
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_WKUP_IRQHandler
|
|
||||||
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FLASH_IRQHandler
|
|
||||||
.thumb_set FLASH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RCC_IRQHandler
|
|
||||||
.thumb_set RCC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI0_IRQHandler
|
|
||||||
.thumb_set EXTI0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI1_IRQHandler
|
|
||||||
.thumb_set EXTI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI2_IRQHandler
|
|
||||||
.thumb_set EXTI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI3_IRQHandler
|
|
||||||
.thumb_set EXTI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI4_IRQHandler
|
|
||||||
.thumb_set EXTI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ADC_IRQHandler
|
|
||||||
.thumb_set ADC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_TX_IRQHandler
|
|
||||||
.thumb_set CAN1_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX0_IRQHandler
|
|
||||||
.thumb_set CAN1_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX1_IRQHandler
|
|
||||||
.thumb_set CAN1_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_SCE_IRQHandler
|
|
||||||
.thumb_set CAN1_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI9_5_IRQHandler
|
|
||||||
.thumb_set EXTI9_5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_BRK_TIM9_IRQHandler
|
|
||||||
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_UP_TIM10_IRQHandler
|
|
||||||
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_TRG_COM_TIM11_IRQHandler
|
|
||||||
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_CC_IRQHandler
|
|
||||||
.thumb_set TIM1_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM2_IRQHandler
|
|
||||||
.thumb_set TIM2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM3_IRQHandler
|
|
||||||
.thumb_set TIM3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM4_IRQHandler
|
|
||||||
.thumb_set TIM4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_EV_IRQHandler
|
|
||||||
.thumb_set I2C1_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_ER_IRQHandler
|
|
||||||
.thumb_set I2C1_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_EV_IRQHandler
|
|
||||||
.thumb_set I2C2_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_ER_IRQHandler
|
|
||||||
.thumb_set I2C2_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI1_IRQHandler
|
|
||||||
.thumb_set SPI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI2_IRQHandler
|
|
||||||
.thumb_set SPI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART1_IRQHandler
|
|
||||||
.thumb_set USART1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART2_IRQHandler
|
|
||||||
.thumb_set USART2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART3_IRQHandler
|
|
||||||
.thumb_set USART3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI15_10_IRQHandler
|
|
||||||
.thumb_set EXTI15_10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_Alarm_IRQHandler
|
|
||||||
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_BRK_TIM12_IRQHandler
|
|
||||||
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_UP_TIM13_IRQHandler
|
|
||||||
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_TRG_COM_TIM14_IRQHandler
|
|
||||||
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_CC_IRQHandler
|
|
||||||
.thumb_set TIM8_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FSMC_IRQHandler
|
|
||||||
.thumb_set FSMC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SDIO_IRQHandler
|
|
||||||
.thumb_set SDIO_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM5_IRQHandler
|
|
||||||
.thumb_set TIM5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI3_IRQHandler
|
|
||||||
.thumb_set SPI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART4_IRQHandler
|
|
||||||
.thumb_set UART4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART5_IRQHandler
|
|
||||||
.thumb_set UART5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM6_DAC_IRQHandler
|
|
||||||
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM7_IRQHandler
|
|
||||||
.thumb_set TIM7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_IRQHandler
|
|
||||||
.thumb_set ETH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_WKUP_IRQHandler
|
|
||||||
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_TX_IRQHandler
|
|
||||||
.thumb_set CAN2_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX0_IRQHandler
|
|
||||||
.thumb_set CAN2_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX1_IRQHandler
|
|
||||||
.thumb_set CAN2_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_SCE_IRQHandler
|
|
||||||
.thumb_set CAN2_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_IRQHandler
|
|
||||||
.thumb_set OTG_FS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART6_IRQHandler
|
|
||||||
.thumb_set USART6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_EV_IRQHandler
|
|
||||||
.thumb_set I2C3_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_ER_IRQHandler
|
|
||||||
.thumb_set I2C3_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_OUT_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_IN_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_IRQHandler
|
|
||||||
.thumb_set OTG_HS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DCMI_IRQHandler
|
|
||||||
.thumb_set DCMI_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CRYP_IRQHandler
|
|
||||||
.thumb_set CRYP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak HASH_RNG_IRQHandler
|
|
||||||
.thumb_set HASH_RNG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FPU_IRQHandler
|
|
||||||
.thumb_set FPU_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART7_IRQHandler
|
|
||||||
.thumb_set UART7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART8_IRQHandler
|
|
||||||
.thumb_set UART8_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI4_IRQHandler
|
|
||||||
.thumb_set SPI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI5_IRQHandler
|
|
||||||
.thumb_set SPI5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI6_IRQHandler
|
|
||||||
.thumb_set SPI6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SAI1_IRQHandler
|
|
||||||
.thumb_set SAI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak LTDC_IRQHandler
|
|
||||||
.thumb_set LTDC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak LTDC_ER_IRQHandler
|
|
||||||
.thumb_set LTDC_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2D_IRQHandler
|
|
||||||
.thumb_set DMA2D_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
-552
@@ -1,552 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file startup_stm32f427x.s
|
|
||||||
* @author MCD Application Team
|
|
||||||
* @version V1.3.0
|
|
||||||
* @date 08-November-2013
|
|
||||||
* @brief STM32F427xx/437xx Devices vector table for RIDE7 toolchain.
|
|
||||||
* Same as startup_stm32f427_437xx.s and maintained for legacy purpose
|
|
||||||
* This module performs:
|
|
||||||
* - Set the initial SP
|
|
||||||
* - Set the initial PC == Reset_Handler,
|
|
||||||
* - Set the vector table entries with the exceptions ISR address
|
|
||||||
* - Configure the clock system and the external SRAM mounted on
|
|
||||||
* STM324x7I-EVAL board to be used as data memory
|
|
||||||
* (optional, to be enabled by user)
|
|
||||||
* - Branches to main in the C library (which eventually
|
|
||||||
* calls main()).
|
|
||||||
* After Reset the Cortex-M4 processor is in Thread mode,
|
|
||||||
* priority is Privileged, and the Stack is set to Main.
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
|
|
||||||
*
|
|
||||||
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
|
|
||||||
* You may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.st.com/software_license_agreement_liberty_v2
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
.cpu cortex-m3
|
|
||||||
.fpu softvfp
|
|
||||||
.thumb
|
|
||||||
|
|
||||||
.global g_pfnVectors
|
|
||||||
.global Default_Handler
|
|
||||||
|
|
||||||
/* start address for the initialization values of the .data section.
|
|
||||||
defined in linker script */
|
|
||||||
.word _sidata
|
|
||||||
/* start address for the .data section. defined in linker script */
|
|
||||||
.word _sdata
|
|
||||||
/* end address for the .data section. defined in linker script */
|
|
||||||
.word _edata
|
|
||||||
/* start address for the .bss section. defined in linker script */
|
|
||||||
.word _sbss
|
|
||||||
/* end address for the .bss section. defined in linker script */
|
|
||||||
.word _ebss
|
|
||||||
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor first
|
|
||||||
* starts execution following a reset event. Only the absolutely
|
|
||||||
* necessary set is performed, after which the application
|
|
||||||
* supplied main() routine is called.
|
|
||||||
* @param None
|
|
||||||
* @retval : None
|
|
||||||
*/
|
|
||||||
|
|
||||||
.section .text.Reset_Handler
|
|
||||||
.weak Reset_Handler
|
|
||||||
.type Reset_Handler, %function
|
|
||||||
Reset_Handler:
|
|
||||||
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
|
||||||
movs r1, #0
|
|
||||||
b LoopCopyDataInit
|
|
||||||
|
|
||||||
CopyDataInit:
|
|
||||||
ldr r3, =_sidata
|
|
||||||
ldr r3, [r3, r1]
|
|
||||||
str r3, [r0, r1]
|
|
||||||
adds r1, r1, #4
|
|
||||||
|
|
||||||
LoopCopyDataInit:
|
|
||||||
ldr r0, =_sdata
|
|
||||||
ldr r3, =_edata
|
|
||||||
adds r2, r0, r1
|
|
||||||
cmp r2, r3
|
|
||||||
bcc CopyDataInit
|
|
||||||
ldr r2, =_sbss
|
|
||||||
b LoopFillZerobss
|
|
||||||
/* Zero fill the bss segment. */
|
|
||||||
FillZerobss:
|
|
||||||
movs r3, #0
|
|
||||||
str r3, [r2], #4
|
|
||||||
|
|
||||||
LoopFillZerobss:
|
|
||||||
ldr r3, = _ebss
|
|
||||||
cmp r2, r3
|
|
||||||
bcc FillZerobss
|
|
||||||
|
|
||||||
/* Call the clock system intitialization function.*/
|
|
||||||
bl SystemInit
|
|
||||||
/* Call the application's entry point.*/
|
|
||||||
bl main
|
|
||||||
bx lr
|
|
||||||
.size Reset_Handler, .-Reset_Handler
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor receives an
|
|
||||||
* unexpected interrupt. This simply enters an infinite loop, preserving
|
|
||||||
* the system state for examination by a debugger.
|
|
||||||
* @param None
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
.section .text.Default_Handler,"ax",%progbits
|
|
||||||
Default_Handler:
|
|
||||||
Infinite_Loop:
|
|
||||||
b Infinite_Loop
|
|
||||||
.size Default_Handler, .-Default_Handler
|
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* The minimal vector table for a Cortex M3. Note that the proper constructs
|
|
||||||
* must be placed on this to ensure that it ends up at physical address
|
|
||||||
* 0x0000.0000.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.section .isr_vector,"a",%progbits
|
|
||||||
.type g_pfnVectors, %object
|
|
||||||
.size g_pfnVectors, .-g_pfnVectors
|
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
|
||||||
.word _estack
|
|
||||||
.word Reset_Handler
|
|
||||||
.word NMI_Handler
|
|
||||||
.word HardFault_Handler
|
|
||||||
.word MemManage_Handler
|
|
||||||
.word BusFault_Handler
|
|
||||||
.word UsageFault_Handler
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word SVC_Handler
|
|
||||||
.word DebugMon_Handler
|
|
||||||
.word 0
|
|
||||||
.word PendSV_Handler
|
|
||||||
.word SysTick_Handler
|
|
||||||
|
|
||||||
/* External Interrupts */
|
|
||||||
.word WWDG_IRQHandler /* Window WatchDog */
|
|
||||||
.word PVD_IRQHandler /* PVD through EXTI Line detection */
|
|
||||||
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
|
|
||||||
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
|
|
||||||
.word FLASH_IRQHandler /* FLASH */
|
|
||||||
.word RCC_IRQHandler /* RCC */
|
|
||||||
.word EXTI0_IRQHandler /* EXTI Line0 */
|
|
||||||
.word EXTI1_IRQHandler /* EXTI Line1 */
|
|
||||||
.word EXTI2_IRQHandler /* EXTI Line2 */
|
|
||||||
.word EXTI3_IRQHandler /* EXTI Line3 */
|
|
||||||
.word EXTI4_IRQHandler /* EXTI Line4 */
|
|
||||||
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
|
|
||||||
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
|
|
||||||
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
|
|
||||||
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
|
|
||||||
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
|
|
||||||
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
|
|
||||||
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
|
|
||||||
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
|
|
||||||
.word CAN1_TX_IRQHandler /* CAN1 TX */
|
|
||||||
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
|
|
||||||
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
|
|
||||||
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
|
|
||||||
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
|
|
||||||
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
|
|
||||||
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
|
|
||||||
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
|
|
||||||
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
|
|
||||||
.word TIM2_IRQHandler /* TIM2 */
|
|
||||||
.word TIM3_IRQHandler /* TIM3 */
|
|
||||||
.word TIM4_IRQHandler /* TIM4 */
|
|
||||||
.word I2C1_EV_IRQHandler /* I2C1 Event */
|
|
||||||
.word I2C1_ER_IRQHandler /* I2C1 Error */
|
|
||||||
.word I2C2_EV_IRQHandler /* I2C2 Event */
|
|
||||||
.word I2C2_ER_IRQHandler /* I2C2 Error */
|
|
||||||
.word SPI1_IRQHandler /* SPI1 */
|
|
||||||
.word SPI2_IRQHandler /* SPI2 */
|
|
||||||
.word USART1_IRQHandler /* USART1 */
|
|
||||||
.word USART2_IRQHandler /* USART2 */
|
|
||||||
.word USART3_IRQHandler /* USART3 */
|
|
||||||
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
|
|
||||||
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
|
|
||||||
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
|
|
||||||
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
|
|
||||||
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
|
|
||||||
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
|
|
||||||
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
|
|
||||||
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
|
|
||||||
.word FSMC_IRQHandler /* FSMC */
|
|
||||||
.word SDIO_IRQHandler /* SDIO */
|
|
||||||
.word TIM5_IRQHandler /* TIM5 */
|
|
||||||
.word SPI3_IRQHandler /* SPI3 */
|
|
||||||
.word UART4_IRQHandler /* UART4 */
|
|
||||||
.word UART5_IRQHandler /* UART5 */
|
|
||||||
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
|
|
||||||
.word TIM7_IRQHandler /* TIM7 */
|
|
||||||
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
|
|
||||||
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
|
|
||||||
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
|
|
||||||
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
|
|
||||||
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
|
|
||||||
.word ETH_IRQHandler /* Ethernet */
|
|
||||||
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
|
|
||||||
.word CAN2_TX_IRQHandler /* CAN2 TX */
|
|
||||||
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
|
|
||||||
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
|
|
||||||
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
|
|
||||||
.word OTG_FS_IRQHandler /* USB OTG FS */
|
|
||||||
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
|
|
||||||
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
|
|
||||||
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
|
|
||||||
.word USART6_IRQHandler /* USART6 */
|
|
||||||
.word I2C3_EV_IRQHandler /* I2C3 event */
|
|
||||||
.word I2C3_ER_IRQHandler /* I2C3 error */
|
|
||||||
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
|
|
||||||
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
|
|
||||||
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
|
|
||||||
.word OTG_HS_IRQHandler /* USB OTG HS */
|
|
||||||
.word DCMI_IRQHandler /* DCMI */
|
|
||||||
.word CRYP_IRQHandler /* CRYP crypto */
|
|
||||||
.word HASH_RNG_IRQHandler /* Hash and Rng */
|
|
||||||
.word FPU_IRQHandler /* FPU */
|
|
||||||
.word UART7_IRQHandler /* UART7 */
|
|
||||||
.word UART8_IRQHandler /* UART8 */
|
|
||||||
.word SPI4_IRQHandler /* SPI4 */
|
|
||||||
.word SPI5_IRQHandler /* SPI5 */
|
|
||||||
.word SPI6_IRQHandler /* SPI6 */
|
|
||||||
.word SAI1_IRQHandler /* SAI1 */
|
|
||||||
.word LTDC_IRQHandler /* LTDC */
|
|
||||||
.word LTDC_ER_IRQHandler /* LTDC error */
|
|
||||||
.word DMA2D_IRQHandler /* DMA2D */
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* Provide weak aliases for each Exception handler to the Default_Handler.
|
|
||||||
* As they are weak aliases, any function with the same name will override
|
|
||||||
* this definition.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.weak NMI_Handler
|
|
||||||
.thumb_set NMI_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak HardFault_Handler
|
|
||||||
.thumb_set HardFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak MemManage_Handler
|
|
||||||
.thumb_set MemManage_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak BusFault_Handler
|
|
||||||
.thumb_set BusFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak UsageFault_Handler
|
|
||||||
.thumb_set UsageFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SVC_Handler
|
|
||||||
.thumb_set SVC_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak DebugMon_Handler
|
|
||||||
.thumb_set DebugMon_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak PendSV_Handler
|
|
||||||
.thumb_set PendSV_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SysTick_Handler
|
|
||||||
.thumb_set SysTick_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak WWDG_IRQHandler
|
|
||||||
.thumb_set WWDG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak PVD_IRQHandler
|
|
||||||
.thumb_set PVD_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TAMP_STAMP_IRQHandler
|
|
||||||
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_WKUP_IRQHandler
|
|
||||||
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FLASH_IRQHandler
|
|
||||||
.thumb_set FLASH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RCC_IRQHandler
|
|
||||||
.thumb_set RCC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI0_IRQHandler
|
|
||||||
.thumb_set EXTI0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI1_IRQHandler
|
|
||||||
.thumb_set EXTI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI2_IRQHandler
|
|
||||||
.thumb_set EXTI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI3_IRQHandler
|
|
||||||
.thumb_set EXTI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI4_IRQHandler
|
|
||||||
.thumb_set EXTI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ADC_IRQHandler
|
|
||||||
.thumb_set ADC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_TX_IRQHandler
|
|
||||||
.thumb_set CAN1_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX0_IRQHandler
|
|
||||||
.thumb_set CAN1_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX1_IRQHandler
|
|
||||||
.thumb_set CAN1_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_SCE_IRQHandler
|
|
||||||
.thumb_set CAN1_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI9_5_IRQHandler
|
|
||||||
.thumb_set EXTI9_5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_BRK_TIM9_IRQHandler
|
|
||||||
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_UP_TIM10_IRQHandler
|
|
||||||
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_TRG_COM_TIM11_IRQHandler
|
|
||||||
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_CC_IRQHandler
|
|
||||||
.thumb_set TIM1_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM2_IRQHandler
|
|
||||||
.thumb_set TIM2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM3_IRQHandler
|
|
||||||
.thumb_set TIM3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM4_IRQHandler
|
|
||||||
.thumb_set TIM4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_EV_IRQHandler
|
|
||||||
.thumb_set I2C1_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_ER_IRQHandler
|
|
||||||
.thumb_set I2C1_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_EV_IRQHandler
|
|
||||||
.thumb_set I2C2_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_ER_IRQHandler
|
|
||||||
.thumb_set I2C2_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI1_IRQHandler
|
|
||||||
.thumb_set SPI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI2_IRQHandler
|
|
||||||
.thumb_set SPI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART1_IRQHandler
|
|
||||||
.thumb_set USART1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART2_IRQHandler
|
|
||||||
.thumb_set USART2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART3_IRQHandler
|
|
||||||
.thumb_set USART3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI15_10_IRQHandler
|
|
||||||
.thumb_set EXTI15_10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_Alarm_IRQHandler
|
|
||||||
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_BRK_TIM12_IRQHandler
|
|
||||||
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_UP_TIM13_IRQHandler
|
|
||||||
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_TRG_COM_TIM14_IRQHandler
|
|
||||||
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_CC_IRQHandler
|
|
||||||
.thumb_set TIM8_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FSMC_IRQHandler
|
|
||||||
.thumb_set FSMC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SDIO_IRQHandler
|
|
||||||
.thumb_set SDIO_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM5_IRQHandler
|
|
||||||
.thumb_set TIM5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI3_IRQHandler
|
|
||||||
.thumb_set SPI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART4_IRQHandler
|
|
||||||
.thumb_set UART4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART5_IRQHandler
|
|
||||||
.thumb_set UART5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM6_DAC_IRQHandler
|
|
||||||
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM7_IRQHandler
|
|
||||||
.thumb_set TIM7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_IRQHandler
|
|
||||||
.thumb_set ETH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_WKUP_IRQHandler
|
|
||||||
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_TX_IRQHandler
|
|
||||||
.thumb_set CAN2_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX0_IRQHandler
|
|
||||||
.thumb_set CAN2_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX1_IRQHandler
|
|
||||||
.thumb_set CAN2_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_SCE_IRQHandler
|
|
||||||
.thumb_set CAN2_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_IRQHandler
|
|
||||||
.thumb_set OTG_FS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART6_IRQHandler
|
|
||||||
.thumb_set USART6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_EV_IRQHandler
|
|
||||||
.thumb_set I2C3_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_ER_IRQHandler
|
|
||||||
.thumb_set I2C3_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_OUT_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_IN_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_IRQHandler
|
|
||||||
.thumb_set OTG_HS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DCMI_IRQHandler
|
|
||||||
.thumb_set DCMI_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CRYP_IRQHandler
|
|
||||||
.thumb_set CRYP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak HASH_RNG_IRQHandler
|
|
||||||
.thumb_set HASH_RNG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FPU_IRQHandler
|
|
||||||
.thumb_set FPU_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART7_IRQHandler
|
|
||||||
.thumb_set UART7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART8_IRQHandler
|
|
||||||
.thumb_set UART8_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI4_IRQHandler
|
|
||||||
.thumb_set SPI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI5_IRQHandler
|
|
||||||
.thumb_set SPI5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI6_IRQHandler
|
|
||||||
.thumb_set SPI6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SAI1_IRQHandler
|
|
||||||
.thumb_set SAI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak LTDC_IRQHandler
|
|
||||||
.thumb_set LTDC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak LTDC_ER_IRQHandler
|
|
||||||
.thumb_set LTDC_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2D_IRQHandler
|
|
||||||
.thumb_set DMA2D_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
-551
@@ -1,551 +0,0 @@
|
|||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file startup_stm32f429_439xx.s
|
|
||||||
* @author MCD Application Team
|
|
||||||
* @version V1.3.0
|
|
||||||
* @date 08-November-2013
|
|
||||||
* @brief STM32F429xx/439xx Devices vector table for RIDE7 toolchain.
|
|
||||||
* This module performs:
|
|
||||||
* - Set the initial SP
|
|
||||||
* - Set the initial PC == Reset_Handler,
|
|
||||||
* - Set the vector table entries with the exceptions ISR address
|
|
||||||
* - Configure the clock system and the external SRAM mounted on
|
|
||||||
* STM324x9I-EVAL board to be used as data memory (optional,
|
|
||||||
* to be enabled by user)
|
|
||||||
* - Branches to main in the C library (which eventually
|
|
||||||
* calls main()).
|
|
||||||
* After Reset the Cortex-M4 processor is in Thread mode,
|
|
||||||
* priority is Privileged, and the Stack is set to Main.
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
|
|
||||||
*
|
|
||||||
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
|
|
||||||
* You may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.st.com/software_license_agreement_liberty_v2
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*
|
|
||||||
******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
.cpu cortex-m3
|
|
||||||
.fpu softvfp
|
|
||||||
.thumb
|
|
||||||
|
|
||||||
.global g_pfnVectors
|
|
||||||
.global Default_Handler
|
|
||||||
|
|
||||||
/* start address for the initialization values of the .data section.
|
|
||||||
defined in linker script */
|
|
||||||
.word _sidata
|
|
||||||
/* start address for the .data section. defined in linker script */
|
|
||||||
.word _sdata
|
|
||||||
/* end address for the .data section. defined in linker script */
|
|
||||||
.word _edata
|
|
||||||
/* start address for the .bss section. defined in linker script */
|
|
||||||
.word _sbss
|
|
||||||
/* end address for the .bss section. defined in linker script */
|
|
||||||
.word _ebss
|
|
||||||
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor first
|
|
||||||
* starts execution following a reset event. Only the absolutely
|
|
||||||
* necessary set is performed, after which the application
|
|
||||||
* supplied main() routine is called.
|
|
||||||
* @param None
|
|
||||||
* @retval : None
|
|
||||||
*/
|
|
||||||
|
|
||||||
.section .text.Reset_Handler
|
|
||||||
.weak Reset_Handler
|
|
||||||
.type Reset_Handler, %function
|
|
||||||
Reset_Handler:
|
|
||||||
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
|
||||||
movs r1, #0
|
|
||||||
b LoopCopyDataInit
|
|
||||||
|
|
||||||
CopyDataInit:
|
|
||||||
ldr r3, =_sidata
|
|
||||||
ldr r3, [r3, r1]
|
|
||||||
str r3, [r0, r1]
|
|
||||||
adds r1, r1, #4
|
|
||||||
|
|
||||||
LoopCopyDataInit:
|
|
||||||
ldr r0, =_sdata
|
|
||||||
ldr r3, =_edata
|
|
||||||
adds r2, r0, r1
|
|
||||||
cmp r2, r3
|
|
||||||
bcc CopyDataInit
|
|
||||||
ldr r2, =_sbss
|
|
||||||
b LoopFillZerobss
|
|
||||||
/* Zero fill the bss segment. */
|
|
||||||
FillZerobss:
|
|
||||||
movs r3, #0
|
|
||||||
str r3, [r2], #4
|
|
||||||
|
|
||||||
LoopFillZerobss:
|
|
||||||
ldr r3, = _ebss
|
|
||||||
cmp r2, r3
|
|
||||||
bcc FillZerobss
|
|
||||||
|
|
||||||
/* Call the clock system intitialization function.*/
|
|
||||||
bl SystemInit
|
|
||||||
/* Call the application's entry point.*/
|
|
||||||
bl main
|
|
||||||
bx lr
|
|
||||||
.size Reset_Handler, .-Reset_Handler
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the code that gets called when the processor receives an
|
|
||||||
* unexpected interrupt. This simply enters an infinite loop, preserving
|
|
||||||
* the system state for examination by a debugger.
|
|
||||||
* @param None
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
.section .text.Default_Handler,"ax",%progbits
|
|
||||||
Default_Handler:
|
|
||||||
Infinite_Loop:
|
|
||||||
b Infinite_Loop
|
|
||||||
.size Default_Handler, .-Default_Handler
|
|
||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* The minimal vector table for a Cortex M3. Note that the proper constructs
|
|
||||||
* must be placed on this to ensure that it ends up at physical address
|
|
||||||
* 0x0000.0000.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.section .isr_vector,"a",%progbits
|
|
||||||
.type g_pfnVectors, %object
|
|
||||||
.size g_pfnVectors, .-g_pfnVectors
|
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
|
||||||
.word _estack
|
|
||||||
.word Reset_Handler
|
|
||||||
.word NMI_Handler
|
|
||||||
.word HardFault_Handler
|
|
||||||
.word MemManage_Handler
|
|
||||||
.word BusFault_Handler
|
|
||||||
.word UsageFault_Handler
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
.word SVC_Handler
|
|
||||||
.word DebugMon_Handler
|
|
||||||
.word 0
|
|
||||||
.word PendSV_Handler
|
|
||||||
.word SysTick_Handler
|
|
||||||
|
|
||||||
/* External Interrupts */
|
|
||||||
.word WWDG_IRQHandler /* Window WatchDog */
|
|
||||||
.word PVD_IRQHandler /* PVD through EXTI Line detection */
|
|
||||||
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
|
|
||||||
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
|
|
||||||
.word FLASH_IRQHandler /* FLASH */
|
|
||||||
.word RCC_IRQHandler /* RCC */
|
|
||||||
.word EXTI0_IRQHandler /* EXTI Line0 */
|
|
||||||
.word EXTI1_IRQHandler /* EXTI Line1 */
|
|
||||||
.word EXTI2_IRQHandler /* EXTI Line2 */
|
|
||||||
.word EXTI3_IRQHandler /* EXTI Line3 */
|
|
||||||
.word EXTI4_IRQHandler /* EXTI Line4 */
|
|
||||||
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
|
|
||||||
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
|
|
||||||
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
|
|
||||||
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
|
|
||||||
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
|
|
||||||
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
|
|
||||||
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
|
|
||||||
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
|
|
||||||
.word CAN1_TX_IRQHandler /* CAN1 TX */
|
|
||||||
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
|
|
||||||
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
|
|
||||||
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
|
|
||||||
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
|
|
||||||
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
|
|
||||||
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
|
|
||||||
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
|
|
||||||
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
|
|
||||||
.word TIM2_IRQHandler /* TIM2 */
|
|
||||||
.word TIM3_IRQHandler /* TIM3 */
|
|
||||||
.word TIM4_IRQHandler /* TIM4 */
|
|
||||||
.word I2C1_EV_IRQHandler /* I2C1 Event */
|
|
||||||
.word I2C1_ER_IRQHandler /* I2C1 Error */
|
|
||||||
.word I2C2_EV_IRQHandler /* I2C2 Event */
|
|
||||||
.word I2C2_ER_IRQHandler /* I2C2 Error */
|
|
||||||
.word SPI1_IRQHandler /* SPI1 */
|
|
||||||
.word SPI2_IRQHandler /* SPI2 */
|
|
||||||
.word USART1_IRQHandler /* USART1 */
|
|
||||||
.word USART2_IRQHandler /* USART2 */
|
|
||||||
.word USART3_IRQHandler /* USART3 */
|
|
||||||
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
|
|
||||||
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
|
|
||||||
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
|
|
||||||
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
|
|
||||||
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
|
|
||||||
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
|
|
||||||
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
|
|
||||||
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
|
|
||||||
.word FSMC_IRQHandler /* FSMC */
|
|
||||||
.word SDIO_IRQHandler /* SDIO */
|
|
||||||
.word TIM5_IRQHandler /* TIM5 */
|
|
||||||
.word SPI3_IRQHandler /* SPI3 */
|
|
||||||
.word UART4_IRQHandler /* UART4 */
|
|
||||||
.word UART5_IRQHandler /* UART5 */
|
|
||||||
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
|
|
||||||
.word TIM7_IRQHandler /* TIM7 */
|
|
||||||
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
|
|
||||||
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
|
|
||||||
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
|
|
||||||
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
|
|
||||||
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
|
|
||||||
.word ETH_IRQHandler /* Ethernet */
|
|
||||||
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
|
|
||||||
.word CAN2_TX_IRQHandler /* CAN2 TX */
|
|
||||||
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
|
|
||||||
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
|
|
||||||
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
|
|
||||||
.word OTG_FS_IRQHandler /* USB OTG FS */
|
|
||||||
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
|
|
||||||
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
|
|
||||||
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
|
|
||||||
.word USART6_IRQHandler /* USART6 */
|
|
||||||
.word I2C3_EV_IRQHandler /* I2C3 event */
|
|
||||||
.word I2C3_ER_IRQHandler /* I2C3 error */
|
|
||||||
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
|
|
||||||
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
|
|
||||||
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
|
|
||||||
.word OTG_HS_IRQHandler /* USB OTG HS */
|
|
||||||
.word DCMI_IRQHandler /* DCMI */
|
|
||||||
.word CRYP_IRQHandler /* CRYP crypto */
|
|
||||||
.word HASH_RNG_IRQHandler /* Hash and Rng */
|
|
||||||
.word FPU_IRQHandler /* FPU */
|
|
||||||
.word UART7_IRQHandler /* UART7 */
|
|
||||||
.word UART8_IRQHandler /* UART8 */
|
|
||||||
.word SPI4_IRQHandler /* SPI4 */
|
|
||||||
.word SPI5_IRQHandler /* SPI5 */
|
|
||||||
.word SPI6_IRQHandler /* SPI6 */
|
|
||||||
.word SAI1_IRQHandler /* SAI1 */
|
|
||||||
.word LTDC_IRQHandler /* LTDC */
|
|
||||||
.word LTDC_ER_IRQHandler /* LTDC error */
|
|
||||||
.word DMA2D_IRQHandler /* DMA2D */
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* Provide weak aliases for each Exception handler to the Default_Handler.
|
|
||||||
* As they are weak aliases, any function with the same name will override
|
|
||||||
* this definition.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
.weak NMI_Handler
|
|
||||||
.thumb_set NMI_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak HardFault_Handler
|
|
||||||
.thumb_set HardFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak MemManage_Handler
|
|
||||||
.thumb_set MemManage_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak BusFault_Handler
|
|
||||||
.thumb_set BusFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak UsageFault_Handler
|
|
||||||
.thumb_set UsageFault_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SVC_Handler
|
|
||||||
.thumb_set SVC_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak DebugMon_Handler
|
|
||||||
.thumb_set DebugMon_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak PendSV_Handler
|
|
||||||
.thumb_set PendSV_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak SysTick_Handler
|
|
||||||
.thumb_set SysTick_Handler,Default_Handler
|
|
||||||
|
|
||||||
.weak WWDG_IRQHandler
|
|
||||||
.thumb_set WWDG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak PVD_IRQHandler
|
|
||||||
.thumb_set PVD_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TAMP_STAMP_IRQHandler
|
|
||||||
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_WKUP_IRQHandler
|
|
||||||
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FLASH_IRQHandler
|
|
||||||
.thumb_set FLASH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RCC_IRQHandler
|
|
||||||
.thumb_set RCC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI0_IRQHandler
|
|
||||||
.thumb_set EXTI0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI1_IRQHandler
|
|
||||||
.thumb_set EXTI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI2_IRQHandler
|
|
||||||
.thumb_set EXTI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI3_IRQHandler
|
|
||||||
.thumb_set EXTI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI4_IRQHandler
|
|
||||||
.thumb_set EXTI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ADC_IRQHandler
|
|
||||||
.thumb_set ADC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_TX_IRQHandler
|
|
||||||
.thumb_set CAN1_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX0_IRQHandler
|
|
||||||
.thumb_set CAN1_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_RX1_IRQHandler
|
|
||||||
.thumb_set CAN1_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN1_SCE_IRQHandler
|
|
||||||
.thumb_set CAN1_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI9_5_IRQHandler
|
|
||||||
.thumb_set EXTI9_5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_BRK_TIM9_IRQHandler
|
|
||||||
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_UP_TIM10_IRQHandler
|
|
||||||
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_TRG_COM_TIM11_IRQHandler
|
|
||||||
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM1_CC_IRQHandler
|
|
||||||
.thumb_set TIM1_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM2_IRQHandler
|
|
||||||
.thumb_set TIM2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM3_IRQHandler
|
|
||||||
.thumb_set TIM3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM4_IRQHandler
|
|
||||||
.thumb_set TIM4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_EV_IRQHandler
|
|
||||||
.thumb_set I2C1_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C1_ER_IRQHandler
|
|
||||||
.thumb_set I2C1_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_EV_IRQHandler
|
|
||||||
.thumb_set I2C2_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C2_ER_IRQHandler
|
|
||||||
.thumb_set I2C2_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI1_IRQHandler
|
|
||||||
.thumb_set SPI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI2_IRQHandler
|
|
||||||
.thumb_set SPI2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART1_IRQHandler
|
|
||||||
.thumb_set USART1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART2_IRQHandler
|
|
||||||
.thumb_set USART2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART3_IRQHandler
|
|
||||||
.thumb_set USART3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak EXTI15_10_IRQHandler
|
|
||||||
.thumb_set EXTI15_10_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak RTC_Alarm_IRQHandler
|
|
||||||
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_BRK_TIM12_IRQHandler
|
|
||||||
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_UP_TIM13_IRQHandler
|
|
||||||
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_TRG_COM_TIM14_IRQHandler
|
|
||||||
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM8_CC_IRQHandler
|
|
||||||
.thumb_set TIM8_CC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA1_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FSMC_IRQHandler
|
|
||||||
.thumb_set FSMC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SDIO_IRQHandler
|
|
||||||
.thumb_set SDIO_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM5_IRQHandler
|
|
||||||
.thumb_set TIM5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI3_IRQHandler
|
|
||||||
.thumb_set SPI3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART4_IRQHandler
|
|
||||||
.thumb_set UART4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART5_IRQHandler
|
|
||||||
.thumb_set UART5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM6_DAC_IRQHandler
|
|
||||||
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak TIM7_IRQHandler
|
|
||||||
.thumb_set TIM7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream0_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream1_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream2_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream3_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream4_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_IRQHandler
|
|
||||||
.thumb_set ETH_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak ETH_WKUP_IRQHandler
|
|
||||||
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_TX_IRQHandler
|
|
||||||
.thumb_set CAN2_TX_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX0_IRQHandler
|
|
||||||
.thumb_set CAN2_RX0_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_RX1_IRQHandler
|
|
||||||
.thumb_set CAN2_RX1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CAN2_SCE_IRQHandler
|
|
||||||
.thumb_set CAN2_SCE_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_FS_IRQHandler
|
|
||||||
.thumb_set OTG_FS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream5_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream6_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2_Stream7_IRQHandler
|
|
||||||
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak USART6_IRQHandler
|
|
||||||
.thumb_set USART6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_EV_IRQHandler
|
|
||||||
.thumb_set I2C3_EV_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak I2C3_ER_IRQHandler
|
|
||||||
.thumb_set I2C3_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_OUT_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_EP1_IN_IRQHandler
|
|
||||||
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_WKUP_IRQHandler
|
|
||||||
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak OTG_HS_IRQHandler
|
|
||||||
.thumb_set OTG_HS_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DCMI_IRQHandler
|
|
||||||
.thumb_set DCMI_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak CRYP_IRQHandler
|
|
||||||
.thumb_set CRYP_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak HASH_RNG_IRQHandler
|
|
||||||
.thumb_set HASH_RNG_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak FPU_IRQHandler
|
|
||||||
.thumb_set FPU_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART7_IRQHandler
|
|
||||||
.thumb_set UART7_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak UART8_IRQHandler
|
|
||||||
.thumb_set UART8_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI4_IRQHandler
|
|
||||||
.thumb_set SPI4_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI5_IRQHandler
|
|
||||||
.thumb_set SPI5_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SPI6_IRQHandler
|
|
||||||
.thumb_set SPI6_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak SAI1_IRQHandler
|
|
||||||
.thumb_set SAI1_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak LTDC_IRQHandler
|
|
||||||
.thumb_set LTDC_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak LTDC_ER_IRQHandler
|
|
||||||
.thumb_set LTDC_ER_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
.weak DMA2D_IRQHandler
|
|
||||||
.thumb_set DMA2D_IRQHandler,Default_Handler
|
|
||||||
|
|
||||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
||||||
+7
-5
@@ -259,7 +259,7 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stm32f4xx.h"
|
#include "../../Include/stm32f4xx.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
@@ -293,9 +293,9 @@
|
|||||||
through STLINK MCO pin of STM32F103 microcontroller. The frequency cannot be changed
|
through STLINK MCO pin of STM32F103 microcontroller. The frequency cannot be changed
|
||||||
and is fixed at 8 MHz.
|
and is fixed at 8 MHz.
|
||||||
Hardware configuration needed for Nucleo Board:
|
Hardware configuration needed for Nucleo Board:
|
||||||
– SB54, SB55 OFF
|
� SB54, SB55 OFF
|
||||||
– R35 removed
|
� R35 removed
|
||||||
– SB16, SB50 ON */
|
� SB16, SB50 ON */
|
||||||
/* #define USE_HSE_BYPASS */
|
/* #define USE_HSE_BYPASS */
|
||||||
|
|
||||||
#if defined (USE_HSE_BYPASS)
|
#if defined (USE_HSE_BYPASS)
|
||||||
@@ -451,7 +451,9 @@ void SystemInit(void)
|
|||||||
#ifdef VECT_TAB_SRAM
|
#ifdef VECT_TAB_SRAM
|
||||||
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
|
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
|
||||||
#else
|
#else
|
||||||
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
|
// SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
|
||||||
|
extern uint32_t g_pfnVectors ;
|
||||||
|
SCB->VTOR = (uint32_t) &g_pfnVectors ; /* Vector Table Relocation in Internal FLASH */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -166,9 +166,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h> /* standard types definitions */
|
#include <stdint.h> /* standard types definitions */
|
||||||
#include <core_cmInstr.h> /* Core Instruction Access */
|
#include "core_cmInstr.h" /* Core Instruction Access */
|
||||||
#include <core_cmFunc.h> /* Core Function Access */
|
#include "core_cmFunc.h" /* Core Function Access */
|
||||||
#include <core_cm4_simd.h> /* Compiler specific SIMD Intrinsics */
|
#include "core_cm4_simd.h" /* Compiler specific SIMD Intrinsics */
|
||||||
|
|
||||||
#endif /* __CORE_CM4_H_GENERIC */
|
#endif /* __CORE_CM4_H_GENERIC */
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "stm32f4xx.h"
|
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
|
||||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "./STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
|
||||||
|
|
||||||
#define __no_operation __NOP
|
#define __no_operation __NOP
|
||||||
|
|
||||||
#define LCD_NCS_HIGH() GPIO_LCD_NCS->BSRRL = PIN_LCD_NCS
|
#define LCD_NCS_HIGH() GPIO_LCD_NCS->BSRRL = PIN_LCD_NCS
|
||||||
|
|||||||
@@ -142,9 +142,11 @@ void audioEnd()
|
|||||||
#if !defined(SIMU)
|
#if !defined(SIMU)
|
||||||
extern "C" void TIM6_DAC_IRQHandler()
|
extern "C" void TIM6_DAC_IRQHandler()
|
||||||
{
|
{
|
||||||
DAC->CR &= ~DAC_CR_DMAEN1 ; // Stop DMA requests
|
DAC->CR &= ~DAC_CR_DMAEN1 ; // Stop DMA requests
|
||||||
|
#if !defined(REV9E)
|
||||||
DAC->CR &= ~DAC_CR_DMAUDRIE1 ; // Stop underrun interrupt
|
DAC->CR &= ~DAC_CR_DMAUDRIE1 ; // Stop underrun interrupt
|
||||||
DAC->SR = DAC_SR_DMAUDR1 ; // Write 1 to clear flag
|
#endif
|
||||||
|
DAC->SR = DAC_SR_DMAUDR1 ; // Write 1 to clear flag
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void DMA1_Stream5_IRQHandler()
|
extern "C" void DMA1_Stream5_IRQHandler()
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
||||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h"
|
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dbgmcu.h"
|
|
||||||
#if defined(__cplusplus) && !defined(SIMU)
|
#if defined(__cplusplus) && !defined(SIMU)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -43,15 +43,31 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_rcc.h"
|
#if defined(REV9E)
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_gpio.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_spi.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rcc.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_rtc.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_gpio.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_pwr.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_spi.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dma.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rtc.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_usart.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_pwr.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dma.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/misc.h"
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_usart.h"
|
||||||
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_flash.h"
|
||||||
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dbgmcu.h"
|
||||||
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/misc.h"
|
||||||
|
#else
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_rcc.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_gpio.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_spi.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_rtc.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_pwr.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dma.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_usart.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_flash.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dbgmcu.h"
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/misc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(SIMU)
|
#if !defined(SIMU)
|
||||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_core.h"
|
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_core.h"
|
||||||
@@ -157,11 +173,8 @@ uint32_t isBootloaderStart(const void * buffer);
|
|||||||
void init_no_pulses(uint32_t port);
|
void init_no_pulses(uint32_t port);
|
||||||
void disable_no_pulses(uint32_t port);
|
void disable_no_pulses(uint32_t port);
|
||||||
void init_ppm( uint32_t module_index );
|
void init_ppm( uint32_t module_index );
|
||||||
void disable_ppm( uint32_t module_index );
|
|
||||||
void set_external_ppm_parameters(uint32_t idleTime, uint32_t delay, uint32_t positive);
|
void set_external_ppm_parameters(uint32_t idleTime, uint32_t delay, uint32_t positive);
|
||||||
#if defined(TARANIS_INTERNAL_PPM)
|
void disable_ppm( uint32_t module_index );
|
||||||
void set_internal_ppm_parameters(uint32_t idleTime, uint32_t delay, uint32_t positive);
|
|
||||||
#endif
|
|
||||||
void init_pxx( uint32_t module_index );
|
void init_pxx( uint32_t module_index );
|
||||||
void disable_pxx( uint32_t module_index );
|
void disable_pxx( uint32_t module_index );
|
||||||
void init_dsm2( uint32_t module_index );
|
void init_dsm2( uint32_t module_index );
|
||||||
@@ -170,13 +183,13 @@ void disable_dsm2( uint32_t module_index );
|
|||||||
// Trainer driver
|
// Trainer driver
|
||||||
void init_trainer_ppm(void);
|
void init_trainer_ppm(void);
|
||||||
void stop_trainer_ppm(void);
|
void stop_trainer_ppm(void);
|
||||||
void set_trainer_ppm_parameters(uint32_t idleTime, uint32_t delay, uint32_t positive);
|
|
||||||
void init_trainer_capture(void);
|
void init_trainer_capture(void);
|
||||||
void stop_trainer_capture(void);
|
void stop_trainer_capture(void);
|
||||||
void init_cppm_on_heartbeat_capture(void);
|
void init_cppm_on_heartbeat_capture(void);
|
||||||
void stop_cppm_on_heartbeat_capture(void);
|
void stop_cppm_on_heartbeat_capture(void);
|
||||||
void init_sbus_on_heartbeat_capture(void);
|
void init_sbus_on_heartbeat_capture(void);
|
||||||
void stop_sbus_on_heartbeat_capture(void);
|
void stop_sbus_on_heartbeat_capture(void);
|
||||||
|
void set_trainer_ppm_parameters(uint32_t idleTime, uint32_t delay, uint32_t positive);
|
||||||
|
|
||||||
// Keys driver
|
// Keys driver
|
||||||
void keysInit(void);
|
void keysInit(void);
|
||||||
@@ -238,7 +251,7 @@ void turnBacklightOff(void);
|
|||||||
#define setBacklight(xx) turnBacklightOn(xx, g_eeGeneral.backlightColor)
|
#define setBacklight(xx) turnBacklightOn(xx, g_eeGeneral.backlightColor)
|
||||||
#define __BACKLIGHT_ON turnBacklightOn(g_eeGeneral.backlightBright, g_eeGeneral.backlightColor)
|
#define __BACKLIGHT_ON turnBacklightOn(g_eeGeneral.backlightBright, g_eeGeneral.backlightColor)
|
||||||
#define __BACKLIGHT_OFF turnBacklightOff()
|
#define __BACKLIGHT_OFF turnBacklightOff()
|
||||||
#define IS_BACKLIGHT_ON() (TIM4->CCR4 != 0) || (TIM4->CCR2 != 0)
|
#define IS_BACKLIGHT_ON() (TIM_BL->CCR4 != 0) || (TIM_BL->CCR2 != 0)
|
||||||
#else
|
#else
|
||||||
#define setBacklight(xx) TIM10->CCR1 = 100-xx
|
#define setBacklight(xx) TIM10->CCR1 = 100-xx
|
||||||
#define __BACKLIGHT_ON TIM10->CCR1 = 100-g_eeGeneral.backlightBright
|
#define __BACKLIGHT_ON TIM10->CCR1 = 100-g_eeGeneral.backlightBright
|
||||||
@@ -294,7 +307,7 @@ void uart3SbusInit(void);
|
|||||||
void uart3Stop(void);
|
void uart3Stop(void);
|
||||||
|
|
||||||
// BT driver
|
// BT driver
|
||||||
int bt_open();
|
int bt_open(void);
|
||||||
int bt_write(const void *buffer, int len);
|
int bt_write(const void *buffer, int len);
|
||||||
int bt_read(void *buffer, int len);
|
int bt_read(void *buffer, int len);
|
||||||
|
|
||||||
|
|||||||
@@ -36,16 +36,6 @@
|
|||||||
|
|
||||||
#include "../../opentx.h"
|
#include "../../opentx.h"
|
||||||
|
|
||||||
#if defined(__cplusplus) && !defined(SIMU)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
|
||||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h"
|
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dbgmcu.h"
|
|
||||||
#if defined(__cplusplus) && !defined(SIMU)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void configure_pins( uint32_t pins, uint16_t config )
|
void configure_pins( uint32_t pins, uint16_t config )
|
||||||
{
|
{
|
||||||
uint32_t address ;
|
uint32_t address ;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include "../../opentx.h"
|
#include "../../opentx.h"
|
||||||
#include "stm32f2xx_flash.h"
|
|
||||||
|
|
||||||
//After reset, write is not allowed in the Flash control register (FLASH_CR) to protect the
|
//After reset, write is not allowed in the Flash control register (FLASH_CR) to protect the
|
||||||
//Flash memory against possible unwanted operations due, for example, to electric
|
//Flash memory against possible unwanted operations due, for example, to electric
|
||||||
|
|||||||
@@ -324,14 +324,25 @@
|
|||||||
#define PIN_FS_DP GPIO_Pin_12 // PA.12
|
#define PIN_FS_DP GPIO_Pin_12 // PA.12
|
||||||
|
|
||||||
// BackLight
|
// BackLight
|
||||||
#if defined (REVPLUS)
|
#if defined(REV9E)
|
||||||
#define RCC_AHB1Periph_GPIOBL RCC_AHB1Periph_GPIOD
|
#define TIM_BL TIM9
|
||||||
#define GPIO_Pin_BL GPIO_Pin_15 // PD.15
|
#define GPIOBL GPIOE
|
||||||
#define Pin_BL_AF GPIO_AF_TIM4
|
#define RCC_AHB1Periph_GPIOBL RCC_AHB1Periph_GPIOE
|
||||||
|
#define Pin_BL_AF GPIO_AF_TIM9
|
||||||
|
#define GPIO_Pin_BL GPIO_Pin_6 // PE.06
|
||||||
|
#define GPIO_PinSource_BL GPIO_PinSource6
|
||||||
|
#define Pin_BLW_AF GPIO_AF_TIM9
|
||||||
|
#define GPIO_Pin_BLW GPIO_Pin_5 // PE.05
|
||||||
|
#define GPIO_PinSource_BLW GPIO_PinSource5
|
||||||
|
#elif defined (REVPLUS)
|
||||||
|
#define TIM_BL TIM4
|
||||||
#define GPIOBL GPIOD
|
#define GPIOBL GPIOD
|
||||||
|
#define RCC_AHB1Periph_GPIOBL RCC_AHB1Periph_GPIOD
|
||||||
|
#define Pin_BL_AF GPIO_AF_TIM4
|
||||||
|
#define GPIO_Pin_BL GPIO_Pin_15 // PD.15
|
||||||
#define GPIO_PinSource_BL GPIO_PinSource15
|
#define GPIO_PinSource_BL GPIO_PinSource15
|
||||||
#define GPIO_Pin_BLW GPIO_Pin_13 // PD.13
|
|
||||||
#define Pin_BLW_AF GPIO_AF_TIM4
|
#define Pin_BLW_AF GPIO_AF_TIM4
|
||||||
|
#define GPIO_Pin_BLW GPIO_Pin_13 // PD.13
|
||||||
#define GPIO_PinSource_BLW GPIO_PinSource13
|
#define GPIO_PinSource_BLW GPIO_PinSource13
|
||||||
#else
|
#else
|
||||||
#define RCC_AHB1Periph_GPIOBL RCC_AHB1Periph_GPIOB
|
#define RCC_AHB1Periph_GPIOBL RCC_AHB1Periph_GPIOB
|
||||||
@@ -353,7 +364,7 @@
|
|||||||
#define PIN_LCD_CLK GPIO_Pin_10 // PC.10
|
#define PIN_LCD_CLK GPIO_Pin_10 // PC.10
|
||||||
#define PIN_LCD_NCS GPIO_Pin_15 // PA.15
|
#define PIN_LCD_NCS GPIO_Pin_15 // PA.15
|
||||||
#define PIN_LCD_A0 GPIO_Pin_11 // PC.11
|
#define PIN_LCD_A0 GPIO_Pin_11 // PC.11
|
||||||
#define PIN_LCD_RST GPIO_Pin_12 // PD.12
|
#define PIN_LCD_RST GPIO_Pin_15 // TOTO PD.12
|
||||||
#else
|
#else
|
||||||
#define RCC_AHB1Periph_LCD RCC_AHB1Periph_GPIOD
|
#define RCC_AHB1Periph_LCD RCC_AHB1Periph_GPIOD
|
||||||
#define GPIO_LCD_SPI GPIOD
|
#define GPIO_LCD_SPI GPIOD
|
||||||
|
|||||||
@@ -271,8 +271,26 @@ static void LCD_BL_Config()
|
|||||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOBL, ENABLE);
|
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOBL, ENABLE);
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
|
|
||||||
#if defined(REVPLUS)
|
#if defined(REV9E)
|
||||||
// RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE);
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_BL|GPIO_Pin_BLW;
|
||||||
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||||
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||||
|
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||||
|
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
|
GPIO_Init(GPIOBL, &GPIO_InitStructure);
|
||||||
|
GPIO_PinAFConfig(GPIOBL, GPIO_PinSource_BL, Pin_BL_AF);
|
||||||
|
GPIO_PinAFConfig(GPIOBL, GPIO_PinSource_BLW, Pin_BL_AF);
|
||||||
|
RCC->APB2ENR |= RCC_APB2ENR_TIM9EN ; // Enable clock
|
||||||
|
TIM9->ARR = 100 ;
|
||||||
|
TIM9->PSC = (PERI2_FREQUENCY * TIMER_MULT_APB2) / 50000 - 1; // 20us * 100 = 2ms => 500Hz
|
||||||
|
TIM9->CCMR1 = TIM_CCMR1_OC2M_1 | TIM_CCMR1_OC2M_2 ; // PWM
|
||||||
|
TIM9->CCMR2 = TIM_CCMR2_OC4M_1 | TIM_CCMR2_OC4M_2 ; // PWM
|
||||||
|
TIM9->CCER = TIM_CCER_CC4E | TIM_CCER_CC2E ;
|
||||||
|
TIM9->CCR2 = 0 ;
|
||||||
|
TIM9->CCR4 = 80 ;
|
||||||
|
TIM9->EGR = 0 ;
|
||||||
|
TIM9->CR1 = TIM_CR1_CEN ; // Counter enable
|
||||||
|
#elif defined(REVPLUS)
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_BL|GPIO_Pin_BLW;
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_BL|GPIO_Pin_BLW;
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||||
@@ -430,16 +448,16 @@ void lcdSetRefVolt(uint8_t val)
|
|||||||
AspiCmd(val+CONTRAST_OFS); //0--255
|
AspiCmd(val+CONTRAST_OFS); //0--255
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(REVPLUS)
|
#if defined(REV9E) || defined(REVPLUS)
|
||||||
void turnBacklightOn(uint8_t level, uint8_t color)
|
void turnBacklightOn(uint8_t level, uint8_t color)
|
||||||
{
|
{
|
||||||
TIM4->CCR4 = ((100-level)*(20-color))/20;
|
TIM_BL->CCR4 = ((100-level)*(20-color))/20;
|
||||||
TIM4->CCR2 = ((100-level)*color)/20;
|
TIM_BL->CCR2 = ((100-level)*color)/20;
|
||||||
}
|
}
|
||||||
|
|
||||||
void turnBacklightOff(void)
|
void turnBacklightOff(void)
|
||||||
{
|
{
|
||||||
TIM4->CCR4 = 0;
|
TIM_BL->CCR4 = 0;
|
||||||
TIM4->CCR2 = 0;
|
TIM_BL->CCR2 = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -37,6 +37,15 @@
|
|||||||
#include "board_taranis.h"
|
#include "board_taranis.h"
|
||||||
#include "../../pwr.h"
|
#include "../../pwr.h"
|
||||||
|
|
||||||
|
#ifdef REV9E
|
||||||
|
#define POWER_STATE_OFF 0
|
||||||
|
#define POWER_STATE_START 1
|
||||||
|
#define POWER_STATE_RUNNING 2
|
||||||
|
#define POWER_STATE_STOPPING 3
|
||||||
|
#define POWER_STATE_STOPPED 4
|
||||||
|
uint8_t PowerState = POWER_STATE_OFF ;
|
||||||
|
#endif
|
||||||
|
|
||||||
void pwrInit()
|
void pwrInit()
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
@@ -104,6 +113,36 @@ uint32_t pwrCheck()
|
|||||||
{
|
{
|
||||||
#if defined(SIMU)
|
#if defined(SIMU)
|
||||||
return e_power_on;
|
return e_power_on;
|
||||||
|
#elif defined(REV9E)
|
||||||
|
uint32_t switchValue = GPIO_ReadInputDataBit(GPIOPWR, PIN_PWR_STATUS) == Bit_RESET;
|
||||||
|
switch ( PowerState )
|
||||||
|
{
|
||||||
|
case POWER_STATE_OFF :
|
||||||
|
PowerState = POWER_STATE_START ;
|
||||||
|
return e_power_on ;
|
||||||
|
|
||||||
|
case POWER_STATE_START :
|
||||||
|
if ( !switchValue ) {
|
||||||
|
PowerState = POWER_STATE_RUNNING ;
|
||||||
|
}
|
||||||
|
return e_power_on ;
|
||||||
|
|
||||||
|
case POWER_STATE_RUNNING :
|
||||||
|
if ( switchValue ) {
|
||||||
|
PowerState = POWER_STATE_STOPPING ;
|
||||||
|
// return e_power_on;
|
||||||
|
}
|
||||||
|
return e_power_on ;
|
||||||
|
|
||||||
|
case POWER_STATE_STOPPING :
|
||||||
|
if ( !switchValue ) {
|
||||||
|
PowerState = POWER_STATE_STOPPED ;
|
||||||
|
}
|
||||||
|
return e_power_off ;
|
||||||
|
|
||||||
|
case POWER_STATE_STOPPED :
|
||||||
|
return e_power_off ;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (GPIO_ReadInputDataBit(GPIOPWR, PIN_PWR_STATUS) == Bit_RESET)
|
if (GPIO_ReadInputDataBit(GPIOPWR, PIN_PWR_STATUS) == Bit_RESET)
|
||||||
return e_power_on;
|
return e_power_on;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
void rotencInit()
|
void rotencInit()
|
||||||
{
|
{
|
||||||
configure_pins( 0x0060, PIN_INPUT | PIN_PULLUP | PIN_PORTE ) ;
|
configure_pins( GPIO_Pin_12|GPIO_Pin_13, PIN_INPUT | PIN_PULLUP | PIN_PORTD ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rotencEnd()
|
void rotencEnd()
|
||||||
@@ -51,18 +51,18 @@ void checkRotaryEncoder()
|
|||||||
{
|
{
|
||||||
register uint32_t dummy ;
|
register uint32_t dummy ;
|
||||||
|
|
||||||
dummy = GPIOE->IDR ; // Read Rotary encoder ( PE6, PE5 )
|
dummy = GPIOD->IDR ; // Read Rotary encoder ( PE6, PE5 )
|
||||||
dummy >>= 5 ;
|
dummy >>= 12 ;
|
||||||
dummy &= 0x03 ; // pick out the two bits
|
dummy &= 0x03 ; // pick out the two bits
|
||||||
if ( dummy != ( Rotary_position & 0x03 ) )
|
if ( dummy != ( Rotary_position & 0x03 ) )
|
||||||
{
|
{
|
||||||
if ( ( Rotary_position & 0x01 ) ^ ( ( dummy & 0x02) >> 1 ) )
|
if ( ( Rotary_position & 0x01 ) ^ ( ( dummy & 0x02) >> 1 ) )
|
||||||
{
|
{
|
||||||
++x9de_rotenc;
|
--x9de_rotenc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
--x9de_rotenc;
|
++x9de_rotenc;
|
||||||
}
|
}
|
||||||
Rotary_position &= ~0x03 ;
|
Rotary_position &= ~0x03 ;
|
||||||
Rotary_position |= dummy ;
|
Rotary_position |= dummy ;
|
||||||
|
|||||||
@@ -27,9 +27,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_rcc.h"
|
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_gpio.h"
|
#include "board_taranis.h"
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/misc.h"
|
|
||||||
#include "usb_bsp.h"
|
#include "usb_bsp.h"
|
||||||
#include "usbd_conf.h"
|
#include "usbd_conf.h"
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,11 @@
|
|||||||
#ifndef __USB_CONF__H__
|
#ifndef __USB_CONF__H__
|
||||||
#define __USB_CONF__H__
|
#define __USB_CONF__H__
|
||||||
|
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
#if defined(REV9E)
|
||||||
|
#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||||
|
#else
|
||||||
|
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* USB Core and PHY interface configuration.
|
/* USB Core and PHY interface configuration.
|
||||||
Tip: To avoid modifying these defines each time you need to change the USB
|
Tip: To avoid modifying these defines each time you need to change the USB
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#if defined(__cplusplus) && !defined(SIMU)
|
#if defined(__cplusplus) && !defined(SIMU)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/misc.h"
|
|
||||||
#include "usbd_msc_mem.h"
|
#include "usbd_msc_mem.h"
|
||||||
#include "usb_conf.h"
|
#include "usb_conf.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user