X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FGCC%2FMicroBlazeV8%2Fport_exceptions.c;h=a037078f3c13d22430c9891c4f6b84180029aeeb;hb=eb6d9aef2fc46c1b84f84e5e8c24de28de65c56d;hp=e78ce014510c6950f462e509da4394c9d799d696;hpb=04f5830e5a04fd6d0d953fefe62e3c2ae922a5b1;p=freertos diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c index e78ce0145..a037078f3 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV8/port_exceptions.c @@ -1,5 +1,5 @@ /* - FreeRTOS V8.2.0rc1 - Copyright (C) 2014 Real Time Engineers Ltd. + FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -8,29 +8,20 @@ FreeRTOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. + Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception. + *************************************************************************** >>! NOTE: The modification to the GPL is included to allow you to !<< >>! distribute a combined work that includes FreeRTOS without being !<< >>! obliged to provide the source code for proprietary components !<< >>! outside of the FreeRTOS kernel. !<< + *************************************************************************** FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Full license text is available on the following link: http://www.freertos.org/a00114.html - 1 tab == 4 spaces! - - *************************************************************************** - * * - * Having a problem? Start by reading the FAQ "My application does * - * not run, what could be wrong?". Have you defined configASSERT()? * - * * - * http://www.FreeRTOS.org/FAQHelp.html * - * * - *************************************************************************** - *************************************************************************** * * * FreeRTOS provides completely free yet professionally developed, * @@ -45,35 +36,18 @@ * * *************************************************************************** - *************************************************************************** - * * - * Investing in training allows your team to be as productive as * - * possible as early as possible, lowering your overall development * - * cost, and enabling you to bring a more robust product to market * - * earlier than would otherwise be possible. Richard Barry is both * - * the architect and key author of FreeRTOS, and so also the world's * - * leading authority on what is the world's most popular real time * - * kernel for deeply embedded MCU designs. Obtaining your training * - * from Richard ensures your team will gain directly from his in-depth * - * product knowledge and years of usage experience. Contact Real Time * - * Engineers Ltd to enquire about the FreeRTOS Masterclass, presented * - * by Richard Barry: http://www.FreeRTOS.org/contact - * * - *************************************************************************** + http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading + the FAQ page "My application does not run, what could be wrong?". Have you + defined configASSERT()? - *************************************************************************** - * * - * You are receiving this top quality software for free. Please play * - * fair and reciprocate by reporting any suspected issues and * - * participating in the community forum: * - * http://www.FreeRTOS.org/support * - * * - * Thank you! * - * * - *************************************************************************** + http://www.FreeRTOS.org/support - In return for receiving this top quality + embedded software for free we request you assist our global community by + participating in the support forum. - http://www.FreeRTOS.org - Documentation, books, training, latest versions, - license and Real Time Engineers Ltd. contact details. + http://www.FreeRTOS.org/training - Investing in training allows your team to + be as productive as possible as early as possible. Now you can receive + FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers + Ltd, and the world's leading authority on the world's leading RTOS. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool, a DOS @@ -82,7 +56,7 @@ http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High + http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS licenses offer ticketed support, indemnification and commercial middleware. @@ -226,7 +200,7 @@ extern void *pxCurrentTCB; exception. */ xRegisterDump.ulPC = xRegisterDump.ulR17_return_address_from_exceptions - portexINSTRUCTION_SIZE; - #if XPAR_MICROBLAZE_0_USE_FPU != 0 + #if( XPAR_MICROBLAZE_USE_FPU != 0 ) { xRegisterDump.ulFSR = mffsr(); } @@ -269,13 +243,13 @@ extern void *pxCurrentTCB; xRegisterDump.pcExceptionCause = ( int8_t * const ) "XEXC_ID_STACK_VIOLATION or XEXC_ID_MMU"; break; - #if XPAR_MICROBLAZE_0_USE_FPU != 0 + #if( XPAR_MICROBLAZE_USE_FPU != 0 ) case XEXC_ID_FPU : xRegisterDump.pcExceptionCause = ( int8_t * const ) "XEXC_ID_FPU see ulFSR value"; break; - #endif /* XPAR_MICROBLAZE_0_USE_FPU */ + #endif /* XPAR_MICROBLAZE_USE_FPU */ } /* vApplicationExceptionRegisterDump() is a callback function that the @@ -301,41 +275,43 @@ static uint32_t ulHandlersAlreadyInstalled = pdFALSE; { ulHandlersAlreadyInstalled = pdTRUE; - #if XPAR_MICROBLAZE_0_UNALIGNED_EXCEPTIONS == 1 + #if XPAR_MICROBLAZE_UNALIGNED_EXCEPTIONS == 1 microblaze_register_exception_handler( XEXC_ID_UNALIGNED_ACCESS, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_UNALIGNED_ACCESS ); - #endif /* XPAR_MICROBLAZE_0_UNALIGNED_EXCEPTIONS*/ + #endif /* XPAR_MICROBLAZE_UNALIGNED_EXCEPTIONS*/ - #if XPAR_MICROBLAZE_0_ILL_OPCODE_EXCEPTION == 1 + #if XPAR_MICROBLAZE_ILL_OPCODE_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_ILLEGAL_OPCODE, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_ILLEGAL_OPCODE ); - #endif /* XPAR_MICROBLAZE_0_ILL_OPCODE_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_ILL_OPCODE_EXCEPTION */ - #if XPAR_MICROBLAZE_0_M_AXI_I_BUS_EXCEPTION == 1 + #if XPAR_MICROBLAZE_M_AXI_I_BUS_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_M_AXI_I_EXCEPTION, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_M_AXI_I_EXCEPTION ); - #endif /* XPAR_MICROBLAZE_0_M_AXI_I_BUS_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_M_AXI_I_BUS_EXCEPTION */ - #if XPAR_MICROBLAZE_0_M_AXI_D_BUS_EXCEPTION == 1 + #if XPAR_MICROBLAZE_M_AXI_D_BUS_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_M_AXI_D_EXCEPTION, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_M_AXI_D_EXCEPTION ); - #endif /* XPAR_MICROBLAZE_0_M_AXI_D_BUS_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_M_AXI_D_BUS_EXCEPTION */ - #if XPAR_MICROBLAZE_0_IPLB_BUS_EXCEPTION == 1 + #if XPAR_MICROBLAZE_IPLB_BUS_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_IPLB_EXCEPTION, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_IPLB_EXCEPTION ); - #endif /* XPAR_MICROBLAZE_0_IPLB_BUS_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_IPLB_BUS_EXCEPTION */ - #if XPAR_MICROBLAZE_0_DPLB_BUS_EXCEPTION == 1 + #if XPAR_MICROBLAZE_DPLB_BUS_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_DPLB_EXCEPTION, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_DPLB_EXCEPTION ); - #endif /* XPAR_MICROBLAZE_0_DPLB_BUS_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_DPLB_BUS_EXCEPTION */ - #if XPAR_MICROBLAZE_0_DIV_ZERO_EXCEPTION == 1 + #if XPAR_MICROBLAZE_DIV_ZERO_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_DIV_BY_ZERO, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_DIV_BY_ZERO ); - #endif /* XPAR_MICROBLAZE_0_DIV_ZERO_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_DIV_ZERO_EXCEPTION */ - #if XPAR_MICROBLAZE_0_FPU_EXCEPTION == 1 + #if XPAR_MICROBLAZE_FPU_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_FPU, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_FPU ); - #endif /* XPAR_MICROBLAZE_0_FPU_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_FPU_EXCEPTION */ - #if XPAR_MICROBLAZE_0_FSL_EXCEPTION == 1 + #if XPAR_MICROBLAZE_FSL_EXCEPTION == 1 microblaze_register_exception_handler( XEXC_ID_FSL, vPortExceptionHandlerEntry, ( void * ) XEXC_ID_FSL ); - #endif /* XPAR_MICROBLAZE_0_FSL_EXCEPTION*/ + #endif /* XPAR_MICROBLAZE_FSL_EXCEPTION */ + + microblaze_enable_exceptions(); } }