Skip to content

Commit

Permalink
Synopsys ARC port, adding support for ARC EM and HS cores -- continue…
Browse files Browse the repository at this point in the history
…d from PR #8. (FreeRTOS#28)

Synopsys ARC port, adding support for ARC EM and HS cores.
  • Loading branch information
yuhui-zheng authored Mar 24, 2020
1 parent a5531aa commit 464695a
Show file tree
Hide file tree
Showing 6 changed files with 1,264 additions and 0 deletions.
52 changes: 52 additions & 0 deletions portable/ThirdParty/GCC/ARC_EM_HS/arc_freertos_exceptions.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* FreeRTOS Kernel V10.2.1
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/

/**
* \file
* \brief exception processing for freertos
*/

// #include "embARC.h"

#include "arc_freertos_exceptions.h"

#ifdef __GNU__
extern void gnu_printf_setup(void);
#endif
/**
* \brief freertos related cpu exception initialization, all the interrupts handled by freertos must be not
* fast irqs. If fiq is needed, please install the default firq_exc_entry or your own fast irq entry into
* the specific interrupt exception.
*/
void freertos_exc_init(void)
{

#ifdef __GNU__
gnu_printf_setup();
#endif

}
45 changes: 45 additions & 0 deletions portable/ThirdParty/GCC/ARC_EM_HS/arc_freertos_exceptions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* FreeRTOS Kernel V10.2.1
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/

#ifndef ARC_FREERTOS_EXCEPTIONS_H
#define ARC_FREERTOS_EXCEPTIONS_H

/*
* here, all arc cpu exceptions share the same entry, also for all interrupt
* exceptions
*/
extern void exc_entry_cpu(void); /* cpu exception entry for freertos */
extern void exc_entry_int(void); /* int exception entry for freertos */

/* task dispatch functions in .s */
extern void start_r(void);
extern void start_dispatch();
extern void dispatch();

extern void freertos_exc_init(void);

#endif /* ARC_FREERTOS_EXCEPTIONS_H */
Loading

0 comments on commit 464695a

Please sign in to comment.