Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Nov 18, 2020
2 parents d33b56b + 3bfb968 commit b935f7e
Show file tree
Hide file tree
Showing 34 changed files with 2,852 additions and 1,067 deletions.
1 change: 1 addition & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- "examples/shakti-sdk_gpio-keypad"
- "examples/shakti-sdk_i2c-lm75"
- "examples/shakti-sdk_uart-hello"
- "examples/shakti-sdk_weatherstation"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
40 changes: 40 additions & 0 deletions boards/parashu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"build": {
"extra_flags": "-D parashu",
"f_cpu": "50000000L",
"hwids": [
[
"0x002a",
"0x15ba"
]
],
"mabi": "ilp32",
"march": "rv32imac",
"mcmodel": "medany",
"mcu": "E-Class",
"shakti-sdk":{
"ldscript": "link.ld"
}
},
"debug": {
"onboard_tools": [
"ftdi"
],
"svd_path": "parashu.svd"
},
"frameworks": [
"shakti-sdk"
],
"name": "Parashu on Artix-7 100T Arty FPGA Evaluation Kit",
"upload": {
"maximum_ram_size": 131072,
"maximum_size": 0,
"protocol": "ftdi",
"protocols": [
"ftdi",
"jlink"
]
},
"url": "https://www.xilinx.com/products/boards-and-kits/arty.html",
"vendor": "Xilinx"
}
40 changes: 40 additions & 0 deletions boards/pinaka.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"build": {
"extra_flags": "-D pinaka",
"f_cpu": "50000000L",
"hwids": [
[
"0x002a",
"0x15ba"
]
],
"mabi": "ilp32",
"march": "rv32imac",
"mcmodel": "medany",
"mcu": "E-Class",
"shakti-sdk":{
"ldscript": "link.ld"
}
},
"debug": {
"onboard_tools": [
"ftdi"
],
"svd_path": "pinaka.svd"
},
"frameworks": [
"shakti-sdk"
],
"name": "Pinaka on Artix-7 35T Arty FPGA Evaluation Kit",
"upload": {
"maximum_ram_size": 131072,
"maximum_size": 0,
"protocol": "ftdi",
"protocols": [
"ftdi",
"jlink"
]
},
"url": "https://www.xilinx.com/products/boards-and-kits/arty.html",
"vendor": "Xilinx"
}
40 changes: 40 additions & 0 deletions boards/vajra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"build": {
"extra_flags": "-D vajra",
"f_cpu": "50000000L",
"hwids": [
[
"0x002a",
"0x15ba"
]
],
"mabi": "lp64",
"march": "rv64imac",
"mcmodel": "medany",
"mcu": "C-Class",
"shakti-sdk":{
"ldscript": "link.ld"
}
},
"debug": {
"onboard_tools": [
"ftdi"
],
"svd_path": "vajra.svd"
},
"frameworks": [
"shakti-sdk"
],
"name": "Vajra on Arty A7-100: Artix-7 FPGA Development Board",
"upload": {
"maximum_ram_size": 134217728,
"maximum_size": 0,
"protocol": "ftdi",
"protocols": [
"ftdi",
"jlink"
]
},
"url": "https://www.xilinx.com/products/boards-and-kits/1-w51quh.html",
"vendor": "Xilinx"
}
2 changes: 1 addition & 1 deletion builder/frameworks/_bare.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"-mcmodel=%s" % board_config.get("build.mcmodel")
],

LIBS=["c", "m", "gcc"]
LIBS=["m", "gcc"]
)

# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
Expand Down
26 changes: 14 additions & 12 deletions builder/frameworks/shakti-sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ def is_valid_target(target):

env.Append(
ASFLAGS=[
("-D__ASSEMBLY__=1")
("-D__ASSEMBLY__=1"),
"-fno-common"
],

CFLAGS=[
"-static",
"-std=gnu99"
],

CCFLAGS=[
"-fno-common",
"-fno-builtin-printf"
],

Expand All @@ -61,7 +62,11 @@ def is_valid_target(target):

LIBPATH=[
join(FRAMEWORK_DIR, "bsp", "third_party", target)
]
],

LINKFLAGS=[
"-static"
],
)

if not is_valid_target(target):
Expand All @@ -75,14 +80,9 @@ def is_valid_target(target):
# Target: Build core BSP libraries
#

unsupported_drivers = ("plic", "timer")

libs = []

for driver in listdir(join(FRAMEWORK_DIR, "bsp", "drivers")):
if driver in unsupported_drivers:
continue

libs.append(
env.BuildLibrary(
join("$BUILD_DIR", "bsp", "drivers", driver),
Expand All @@ -91,14 +91,16 @@ def is_valid_target(target):

libs.append(
env.BuildLibrary(
join("$BUILD_DIR", "bsp", "libwrap"),
join(FRAMEWORK_DIR, "bsp", "libwrap"))
join("$BUILD_DIR", "bsp", "core"),
join(FRAMEWORK_DIR, "bsp", "core")
)
)

libs.append(
env.BuildLibrary(
join("$BUILD_DIR", "bsp", "include"),
join(FRAMEWORK_DIR, "bsp", "include"))
join("$BUILD_DIR", "bsp", "libs"),
join(FRAMEWORK_DIR, "bsp", "libs")
)
)

libs.append(
Expand Down
8 changes: 4 additions & 4 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
RANLIB="riscv64-unknown-elf-gcc-ranlib",
SIZETOOL="riscv64-unknown-elf-size",

ARFLAGS=["rc"],
ARFLAGS=["rcs"],

SIZEPRINTCMD='$SIZETOOL -d $SOURCES',

Expand Down Expand Up @@ -85,8 +85,8 @@
target_elf = env.BuildProgram()
target_hex = env.ElfToHex(join("$BUILD_DIR", "${PROGNAME}"), target_elf)

AlwaysBuild(env.Alias("nobuild", target_elf))
target_buildprog = env.Alias("buildprog", target_elf, target_elf)
AlwaysBuild(env.Alias("nobuild", target_hex))
target_buildprog = env.Alias("buildprog", target_hex, target_hex)

#
# Target: Print binary size
Expand Down Expand Up @@ -147,7 +147,7 @@ def _jlink_cmd_script(env, source):
openocd_args.extend(
debug_tools.get(upload_protocol).get("server").get("arguments", []))
openocd_args.extend([
"-c", "init; load_image {$SOURCE} %s; shutdown;" %
"-c", "init; load_image {$SOURCE} %s;resume 0x80000000;shutdown" %
board_config.get("upload").get("flash_start", "")
])
env.Replace(
Expand Down
Binary file not shown.
39 changes: 0 additions & 39 deletions examples/shakti-sdk_gpio-keypad/.vscode/c_cpp_properties.json

This file was deleted.

7 changes: 0 additions & 7 deletions examples/shakti-sdk_gpio-keypad/.vscode/extensions.json

This file was deleted.

34 changes: 0 additions & 34 deletions examples/shakti-sdk_gpio-keypad/.vscode/launch.json

This file was deleted.

5 changes: 0 additions & 5 deletions examples/shakti-sdk_gpio-keypad/.vscode/settings.json

This file was deleted.

17 changes: 17 additions & 0 deletions examples/shakti-sdk_gpio-keypad/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@ framework = shakti-sdk
board = artix7_100t
monitor_speed = 19200

[env:parashu]
platform = shakti
framework = shakti-sdk
board = parashu
monitor_speed = 19200

[env:pinaka]
platform = shakti
framework = shakti-sdk
board = pinaka
monitor_speed = 19200

[env:vajra]
platform = shakti
framework = shakti-sdk
board = vajra
monitor_speed = 19200
Loading

0 comments on commit b935f7e

Please sign in to comment.