-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,005 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Copyright 2014-present PlatformIO <contact@platformio.org> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import os | ||
|
||
from SCons.Script import DefaultEnvironment | ||
|
||
env = DefaultEnvironment() | ||
platform = env.PioPlatform() | ||
|
||
FIRMWARE_DIR = platform.get_package_dir("framework-wd-riscv-sdk") | ||
assert os.path.isdir(FIRMWARE_DIR) | ||
|
||
if "wd-riscv-sdk" not in env.subst("$PIOFRAMEWORK"): | ||
# Force SDK package to build if only FreeRTOS is specified in framework list | ||
env.SConscript("wd-riscv-sdk.py") | ||
|
||
env.Append( | ||
CPPDEFINES=[ | ||
"D_USE_RTOSAL", | ||
"D_USE_FREERTOS" | ||
], | ||
|
||
CPPPATH=[ | ||
os.path.join(FIRMWARE_DIR, "rtos", "rtosal", "loc_inc"), | ||
os.path.join(FIRMWARE_DIR, "rtos", "rtosal", "api_inc"), | ||
os.path.join(FIRMWARE_DIR, "rtos", "rtosal", "config", "eh1"), | ||
os.path.join( | ||
FIRMWARE_DIR, "rtos", "rtos_core", "freertos", "Source", "include"), | ||
], | ||
|
||
LIBS=[ | ||
env.BuildLibrary( | ||
os.path.join("$BUILD_DIR", "RTOS-AL"), | ||
os.path.join(FIRMWARE_DIR, "rtos", "rtosal"), | ||
src_filter=[ | ||
"+<*>", | ||
"-<rtosal_memory.c>", | ||
"-<list.c>", | ||
"-<rtosal_int_vect_*.S>", | ||
"+<rtosal_int_vect_eh1.S>" | ||
] | ||
), | ||
env.BuildLibrary( | ||
os.path.join("$BUILD_DIR", "FreeRTOS"), | ||
os.path.join(FIRMWARE_DIR, "rtos", "rtos_core", "freertos", "Source"), | ||
src_filter=[ | ||
"-<*>", | ||
"+<croutine.c>", | ||
"+<list.c>", | ||
"+<portable/portASM.S>", | ||
"+<queue.c>", | ||
"+<tasks.c>", | ||
"+<timers.c>", | ||
] | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.pio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Continuous Integration (CI) is the practice, in software | ||
# engineering, of merging all developer working copies with a shared mainline | ||
# several times a day < https://docs.platformio.org/page/ci/index.html > | ||
# | ||
# Documentation: | ||
# | ||
# * Travis CI Embedded Builds with PlatformIO | ||
# < https://docs.travis-ci.com/user/integration/platformio/ > | ||
# | ||
# * PlatformIO integration with Travis CI | ||
# < https://docs.platformio.org/page/ci/travis.html > | ||
# | ||
# * User Guide for `platformio ci` command | ||
# < https://docs.platformio.org/page/userguide/cmd_ci.html > | ||
# | ||
# | ||
# Please choose one of the following templates (proposed below) and uncomment | ||
# it (remove "# " before each line) or use own configuration according to the | ||
# Travis CI documentation (see above). | ||
# | ||
|
||
|
||
# | ||
# Template #1: General project. Test it using existing `platformio.ini`. | ||
# | ||
|
||
# language: python | ||
# python: | ||
# - "2.7" | ||
# | ||
# sudo: false | ||
# cache: | ||
# directories: | ||
# - "~/.platformio" | ||
# | ||
# install: | ||
# - pip install -U platformio | ||
# - platformio update | ||
# | ||
# script: | ||
# - platformio run | ||
|
||
|
||
# | ||
# Template #2: The project is intended to be used as a library with examples. | ||
# | ||
|
||
# language: python | ||
# python: | ||
# - "2.7" | ||
# | ||
# sudo: false | ||
# cache: | ||
# directories: | ||
# - "~/.platformio" | ||
# | ||
# env: | ||
# - PLATFORMIO_CI_SRC=path/to/test/file.c | ||
# - PLATFORMIO_CI_SRC=examples/file.ino | ||
# - PLATFORMIO_CI_SRC=path/to/test/directory | ||
# | ||
# install: | ||
# - pip install -U platformio | ||
# - platformio update | ||
# | ||
# script: | ||
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. Copyright 2014-present PlatformIO <contact@platformio.org> | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
How to build PlatformIO based project | ||
===================================== | ||
|
||
1. `Install PlatformIO Core <http://docs.platformio.org/page/core.html>`_ | ||
2. Download `development platform with examples <https://github.com/platformio/platform-chipsalliance/archive/develop.zip>`_ | ||
3. Extract ZIP archive | ||
4. Run these commands: | ||
|
||
.. code-block:: bash | ||
# Change directory to example | ||
> cd platform-chipsalliance/examples/native-blink_asm | ||
# Build project | ||
> platformio run | ||
# Upload firmware | ||
> platformio run --target upload | ||
# Upload bitstream | ||
> platformio run --target program_fpga | ||
# Generate trace for GTKWave | ||
> platformio run --target generate_trace | ||
# Start verilator as JTAG server for OpenOCD | ||
> platformio run --target start_verilator | ||
# Generate bistream for SweRV Core using Xilinx Vivado | ||
> platformio run --target generate_bitstream | ||
# Upload firmware for the specific environment | ||
> platformio run -e swervolf_nexys --target upload | ||
# Clean build files | ||
> platformio run --target clean |
Oops, something went wrong.