Skip to content

Commit 8fb1a4c

Browse files
author
Wayne Ren
committed
doc: update the docs of arc feature examples
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
1 parent 7faf347 commit 8fb1a4c

File tree

6 files changed

+27
-162
lines changed

6 files changed

+27
-162
lines changed

example/baremetal/arc_feature/cache/README.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARC Cache Example
66
Overview
77
********
88

9-
This example is designed to test the cache module of ARC. Besides, it shows how to use ARC Cache API defined in embARC.
9+
This example is designed to test the cache module of |arc|. Besides, it shows how to use ARC cache API defined in |embarc|.
1010

1111
Detailed Description
1212
====================
@@ -18,26 +18,22 @@ Detailed Description
1818
NO
1919

2020
* Design Concept
21-
This example is designed to test the cache module of ARC. Besides, it shows how to use ARC Cache API defined in embARC.
21+
This example is designed to test the cache module of |arc|. Besides, it shows how to use ARC Cache API defined in ``arc_cache.h``.
2222

23-
* Usage Manual
24-
Test cases for ARC cache-related functions defined in arc_cache.h.
25-
26-
27-
* Extra Comments
28-
Only for ARC EM cores that contain cache, so EM4, EM4CR16 on EMSK 1.x, and EM5D, EM9D on EMSK 2.x should NOT run this example
23+
.. note::
24+
Hardware support: Only works for |arc| that contain cache, please check your |arc| configuration before running this example
2925

3026
Buidling and Running
3127
********************
3228

33-
The commands to run this example are as follows:
29+
Taking |emsk| as exmaple, the commands to run this example are as follows:
3430

3531
.. code-block:: console
3632
3733
$ cd <embarc_root>/example/baremetal/arc_feature/cache
3834
$ make BOARD=emsk BD_VER=22 CUR_CORE=arcem7d TOOLCHAIN=gnu run
3935
40-
.. note:: Make sure you have selected the correct configuration of EMSK via dipswitches and that you have reset the board (button above “R”) to confirme its configuration
36+
.. note:: Make sure you have selected the correct configuration of |emsk| via dip switches and that you have reset the board (button above “R”).
4137

4238
Sample Output
4339
=============

example/baremetal/arc_feature/cache/main.c

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,6 @@
2727
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*
2929
--------------------------------------------- */
30-
31-
/**
32-
* \defgroup EMBARC_APP_BAREMETAL_ARC_FEATURE_CACHE embARC Cache Example
33-
* \ingroup EMBARC_APPS_TOTAL
34-
* \ingroup EMBARC_APPS_BAREMETAL
35-
* \brief embARC example for testing ARC cache module
36-
*
37-
* \details
38-
* ### Extra Required Tools
39-
*
40-
* ### Extra Required Peripherals
41-
*
42-
* ### Design Concept
43-
* This example is designed to test the cache module of ARC,
44-
* by the way to show how to use ARC Cache API defined in embARC.
45-
*
46-
* ### Usage Manual
47-
* Test cases for ARC cache-related functions defined in arc_cache.h.
48-
* ![ScreenShot of cache under baremetal](pic/images/example/emsk/emsk_cache.jpg)
49-
*
50-
* ### Extra Comments
51-
* Only for ARC EM cores that contain cache, so EM4, EM4CR16 on EMSK 1.x, and EM5D.
52-
* ARC EM SEP on EMSK 2.x shouldn't run this application
53-
*/
54-
55-
/**
56-
* \file
57-
* \ingroup EMBARC_APP_BAREMETAL_ARC_FEATURE_CACHE
58-
* \brief main source of example of cache
59-
* show the basic operations of cache
60-
*/
61-
62-
/**
63-
* \addtogroup EMBARC_APP_BAREMETAL_ARC_FEATURE_CACHE
64-
* @{
65-
*/
66-
/* embARC HAL */
6730
#include "embARC.h"
6831
#include "embARC_debug.h"
6932

@@ -161,6 +124,4 @@ int main(void)
161124
while(1);
162125

163126
return E_SYS;
164-
}
165-
166-
/** @} */
127+
}

example/baremetal/arc_feature/timer_interrupt/README.rst

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ ARC Timer Interrupt Example
66
Overview
77
********
88

9-
This example is designed to show how to use ARC timer and interrupt.
9+
This example is designed to show how to use |arc| internal timers and timer interrupt.
1010

1111
Detailed Description
1212
====================
13-
embARC example for testing ARC timer and interrupt
1413

1514
* Extra Required Tools
1615
NO
@@ -20,33 +19,22 @@ Detailed Description
2019

2120
* Design Concept
2221
This example is designed to show how to use ARC timer and interrupt.
23-
24-
* Usage Manual
2522
During initialization, the timer 0 and timer 1 are enabled and interrupt is configured. The timer 0 Interrupt Service Routine (ISR) is set as Fast Interrupt Request Queue (FIQ) using ``int_pri_set()``. The timer 0 interrupt is responsed with the highest priority.
2623

27-
* Extra Comments
28-
Please take care of the selected ARC core configuration to make sure FIQ is enabled.
24+
.. note::
25+
Hardware support: all |arc| based platform with internal timers configured
2926

3027
Buidling and Running
3128
********************
3229

33-
This example outputs to the console. It is supported by all platform. The commands
34-
to run this example are as follows:
35-
36-
.. code-block:: console
37-
38-
$ cd <embarc_root>/example/baremetal/arc_feature/timer_interrupt
39-
$ make BOARD=emsk BD_VER=11 CUR_CORE=arcem6 TOOLCHAIN=gnu run
40-
41-
If you do not have an EMSK development board, you can use the nSIM simulator
42-
which have been installed in MetaWare IDE.
30+
Taking |emsk| as exmaple, the commands to run this example are as follows:
4331

4432
.. code-block:: console
4533
4634
$ cd <embarc_root>/example/baremetal/arc_feature/timer_interrupt
47-
$ gmake BOARD=nism BD_VER=1506 CUR_CORE=arcemfull TOOLCHAIN=mw run
35+
$ make BOARD=emsk BD_VER=22 CUR_CORE=arcem7d TOOLCHAIN=gnu run
4836
49-
.. note:: Make sure you have selected the correct configuration of EMSK via dipswitches and that you have reset the board (button above “R”) to confirme its configuration
37+
.. note:: Make sure you have selected the correct configuration of |emsk| via dip switches and that you have reset the board (button above “R”).
5038

5139
Sample Output
5240
=============
@@ -86,6 +74,6 @@ If you are using the ``nSIM``, you will see the following outputs in the CMD win
8674
enable timer 0 watchdog
8775
---end----
8876
89-
If you are using the ``ARC EMSK`` development board, you will see the same msg in the ``COM DEBUG TOOL`` (eg.Tera Term VT).
77+
If you are using the |emsk|, you will see the same msg through UART
9078

91-
.. note:: Make sure you have chosen correct COM port and set the Baud rate to 115200 before you start.
79+
.. note:: Make sure you have chosen correct COM port and set the baud rate to 115200 before you start.

example/baremetal/arc_feature/timer_interrupt/main.c

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,6 @@
2727
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*
2929
--------------------------------------------- */
30-
31-
/**
32-
* \defgroup EMBARC_APP_BAREMETAL_ARC_FEATURE_TIMER_INTERRUPT embARC ARC Timer and Interrupt Example
33-
* \ingroup EMBARC_APPS_TOTAL
34-
* \ingroup EMBARC_APPS_BAREMETAL
35-
* \brief embARC example for testing ARC timer and interrupt
36-
*
37-
* \details
38-
* ### Extra Required Tools
39-
*
40-
* ### Extra Required Peripherals
41-
*
42-
* ### Design Concept
43-
* This example is designed to show how to use ARC timer and interrupt.
44-
*
45-
* ### Usage Manual
46-
* In the initialization, the timer 0 and timer 1 are enabled and interrupt is configured.
47-
* The timer 0 Interrupt Service Routine (ISR) is set as Fast Interrupt Request Queue (FIQ) using int_pri_set().
48-
* The timer 0 interrupt is responsed with the highest priority.
49-
* ![ScreenShot of timer 0 and timer 1 ISR under baremetal](pic/images/example/emsk/emsk_timer_interrupt.jpg)
50-
*
51-
* ### Extra Comments
52-
* Please take care of the selected ARC core configuration to make sure FIQ is enabled.
53-
*/
54-
55-
/**
56-
* \file
57-
* \ingroup EMBARC_APP_BAREMETAL_ARC_FEATURE_TIMER_INTERRUPT
58-
* \brief example of ARC timer and interrupt
59-
*/
60-
61-
/**
62-
* \addtogroup EMBARC_APP_BAREMETAL_ARC_FEATURE_TIMER_INTERRUPT
63-
* @{
64-
*/
65-
6630
/* embARC HAL */
6731
#include "embARC.h"
6832
#include "embARC_debug.h"
@@ -87,7 +51,6 @@ static void timer1_isr(void *ptr)
8751
EMBARC_PRINTF("timer1 interrupt:%d\r\n", t1);
8852
}
8953

90-
/** main entry for testing arc fiq interrupt */
9154
int main(void)
9255
{
9356
uint32_t val;
@@ -154,5 +117,3 @@ int main(void)
154117
while(1);
155118
return E_SYS;
156119
}
157-
158-
/** @} */

example/baremetal/arc_feature/udma/README.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,27 @@ Detailed Description
2020
* Design Concept
2121
This example is designed to show how to use uDMA API and to compare uDMA copy with memory copy.
2222

23-
* Usage Manual
24-
| You can uncomment the *APPL_DEFINES* line in this application makefile to overwrite the linker script settings.
25-
| If you uncomment the *APPL_DEFINES* line, then you can modify the *REGION_ROM* and *REGION_RAM* in *appl_mem_config.h* to proper values.
26-
| If you want to run in DDR, you can set this two values to *EXT_RAM*.
27-
| When you change this values defined in *appl_mem_config.h* in this example, you need to clean the project first then rebuilt it.
28-
29-
30-
* Extra Comments
31-
- This example only supports EMSK 2.2 and EMSK 2.3.
32-
- the uDMA option is required in core configuration to run this example.
23+
.. note::
24+
Hardware support: all |arc| based platform with uDMA configured
3325

3426
Buidling and Running
3527
********************
3628

37-
The commands to run this example are as follows:
29+
Taking |emsk| as exmaple, the commands to run this example are as follows:
3830

3931
.. code-block:: console
4032
4133
$ cd <embarc_root>/example/baremetal/arc_feature/udma
4234
$ gmake BOARD=emsk BD_VER=22 CUR_CORE=arcem7d TOOLCHAIN=mw run
4335
44-
.. note:: Make sure you have selected the correct configuration of EMSK via dipswitches and that you have reset the board (button above “R”) to confirme its configuration
36+
.. note:: Make sure you have selected the correct configuration of |emsk| via dip switches and that you have reset the board (button above “R”).
37+
38+
You can uncomment the *APPL_DEFINES* line in this application makefile to overwrite the linker script settings.
39+
If you uncomment the *APPL_DEFINES* line, then you can modify the *REGION_ROM* and *REGION_RAM* in ``appl_mem_config.h`` to proper values.
40+
41+
If you want to run in DDR, you can set this two values to *EXT_RAM*. When you
42+
change this values defined in ``appl_mem_config.h`` in this example, you need to
43+
clean the project first then rebuilt it.
4544

4645
Sample Output
4746
=============

example/baremetal/arc_feature/udma/main.c

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,44 +27,6 @@
2727
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*
2929
--------------------------------------------- */
30-
31-
/**
32-
* \defgroup EMBARC_APP_BAREMETAL_ARC_FEATURE_UDMA embARC ARC uDMA Example
33-
* \ingroup EMBARC_APPS_TOTAL
34-
* \ingroup EMBARC_APPS_BAREMETAL
35-
* \brief embARC example for testing ARC uDMA feature in baremetal mode
36-
*
37-
* \details
38-
* ### Extra Required Tools
39-
*
40-
* ### Extra Required Peripherals
41-
*
42-
* ### Design Concept
43-
* This example is designed to show how to use uDMA API and compare uDMA copy with memory copy.
44-
*
45-
* ### Usage Manual
46-
* ![ScreenShot of uDMA features under baremetal](pic/images/example/emsk/baremetal_arc_feature_udma.jpg)
47-
* You can uncomment the *APPL_DEFINES* line in this application makefile to overwrite the linker script settings.
48-
* If you uncomment the *APPL_DEFINES* line, then you can modify the *REGION_ROM* and *REGION_RAM* in *appl_mem_config.h* to proper values.
49-
* If you want to run in DDR, you can set this two values to *EXT_RAM*.
50-
* When you change this values defined in *appl_mem_config.h* in this example, you need to clean the project first then rebuilt it.
51-
*
52-
* ### Extra Comments
53-
* - This example only supported EMSK 2.2 and EMSK 2.3.
54-
* - This example require the core configuration to have uDMA option.
55-
*/
56-
57-
/**
58-
* \file
59-
* \ingroup EMBARC_APP_BAREMETAL_ARC_FEATURE_UDMA
60-
* \brief example of ARC uDMA in baremetal mode
61-
*/
62-
63-
/**
64-
* \addtogroup EMBARC_APP_BAREMETAL_ARC_FEATURE_UDMA
65-
* @{
66-
*/
67-
6830
/* embARC HAL */
6931
#include "embARC.h"
7032
#include "embARC_debug.h"
@@ -321,6 +283,4 @@ int main( void )
321283
dma_finish();
322284
dmac_close();
323285
return 0;
324-
}
325-
326-
/** @} */
286+
}

0 commit comments

Comments
 (0)