Skip to content

Commit 89b4387

Browse files
committed
Synopsys ARC port, adding support for ARC EM and HS cores
Signed-off-by: Yuguo Zou <[email protected]>
1 parent 210b1ff commit 89b4387

File tree

6 files changed

+1264
-0
lines changed

6 files changed

+1264
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* FreeRTOS Kernel V10.2.1
3+
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* http://www.FreeRTOS.org
23+
* http://aws.amazon.com/freertos
24+
*
25+
* 1 tab == 4 spaces!
26+
*/
27+
28+
/**
29+
* \file
30+
* \brief exception processing for freertos
31+
*/
32+
33+
// #include "embARC.h"
34+
35+
#include "arc_freertos_exceptions.h"
36+
37+
#ifdef __GNU__
38+
extern void gnu_printf_setup(void);
39+
#endif
40+
/**
41+
* \brief freertos related cpu exception initialization, all the interrupts handled by freertos must be not
42+
* fast irqs. If fiq is needed, please install the default firq_exc_entry or your own fast irq entry into
43+
* the specific interrupt exception.
44+
*/
45+
void freertos_exc_init(void)
46+
{
47+
48+
#ifdef __GNU__
49+
gnu_printf_setup();
50+
#endif
51+
52+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* FreeRTOS Kernel V10.2.1
3+
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* http://www.FreeRTOS.org
23+
* http://aws.amazon.com/freertos
24+
*
25+
* 1 tab == 4 spaces!
26+
*/
27+
28+
#ifndef ARC_FREERTOS_EXCEPTIONS_H
29+
#define ARC_FREERTOS_EXCEPTIONS_H
30+
31+
/*
32+
* here, all arc cpu exceptions share the same entry, also for all interrupt
33+
* exceptions
34+
*/
35+
extern void exc_entry_cpu(void); /* cpu exception entry for freertos */
36+
extern void exc_entry_int(void); /* int exception entry for freertos */
37+
38+
/* task dispatch functions in .s */
39+
extern void start_r(void);
40+
extern void start_dispatch();
41+
extern void dispatch();
42+
43+
extern void freertos_exc_init(void);
44+
45+
#endif /* ARC_FREERTOS_EXCEPTIONS_H */

0 commit comments

Comments
 (0)