URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [docs/] [userguide/] [new_application_project.adoc] - Blame information for rev 71
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
69 |
zero_gravi |
<<<
|
2 |
|
|
:sectnums:
|
3 |
|
|
== Setup of a New Application Program Project
|
4 |
|
|
|
5 |
|
|
[start=1]
|
6 |
|
|
. The easiest way of creating a _new_ software application project is to copy an _existing_ one. This will keep all
|
7 |
|
|
file dependencies. For example you can copy `sw/example/blink_led` to `sw/example/flux_capacitor`.
|
8 |
|
|
. If you want to place you application somewhere outside `sw/example` you need to adapt the application's makefile.
|
9 |
|
|
In the makefile you will find a variable that keeps the relative or absolute path to the NEORV32 repository home
|
10 |
|
|
folder. Just modify this variable according to your new project's home location:
|
11 |
|
|
|
12 |
|
|
[source,makefile]
|
13 |
|
|
----
|
14 |
|
|
# Relative or absolute path to the NEORV32 home folder (use default if not set by user)
|
15 |
|
|
NEORV32_HOME ?= ../../..
|
16 |
|
|
----
|
17 |
|
|
|
18 |
|
|
[start=3]
|
19 |
|
|
. If your project contains additional source files outside of the project folder, you can add them to
|
20 |
|
|
the `APP_SRC` variable:
|
21 |
|
|
|
22 |
|
|
[source,makefile]
|
23 |
|
|
----
|
24 |
|
|
# User's application sources (add additional files here)
|
25 |
|
|
APP_SRC = $(wildcard *.c) ../somewhere/some_file.c
|
26 |
|
|
----
|
27 |
|
|
|
28 |
|
|
[start=4]
|
29 |
|
|
. You also can add a folder containing your application's include files to the
|
30 |
|
|
`APP_INC` variable (do not forget the `-I` prefix):
|
31 |
|
|
|
32 |
|
|
[source,makefile]
|
33 |
|
|
----
|
34 |
|
|
# User's application include folders (don't forget the '-I' before each entry)
|
35 |
|
|
APP_INC = -I . -I ../somewhere/include_stuff_folder
|
36 |
|
|
----
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.