Add OLED example
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled
ci / Check formatting (pull_request) Has been cancelled
ci / Check Documentation Build (pull_request) Has been cancelled
ci / Clippy (pull_request) Has been cancelled
ci / Check build (push) Has been cancelled
ci / Check build (pull_request) Has been cancelled

This commit is contained in:
2026-05-04 12:08:32 +02:00
parent 62eebc6770
commit f7c64809a9
22 changed files with 666 additions and 166 deletions
+6 -3
View File
@@ -33,10 +33,11 @@ proc ps7_clock_init_data_3_0 {} {
mask_write 0XF800014C 0x00003F31 0x00000501
mask_write 0XF8000150 0x00003F33 0x00001401
mask_write 0XF8000154 0x00003F33 0x00000A03
mask_write 0XF8000158 0x00003F33 0x00000601
mask_write 0XF8000168 0x00003F31 0x00000501
mask_write 0XF8000170 0x03F03F30 0x00200500
mask_write 0XF80001C4 0x00000001 0x00000001
mask_write 0XF800012C 0x01FFCCCD 0x01FC044D
mask_write 0XF800012C 0x01FFCCCD 0x01FC444D
mwr -force 0XF8000004 0x0000767B
}
proc ps7_ddr_init_data_3_0 {} {
@@ -268,10 +269,11 @@ proc ps7_clock_init_data_2_0 {} {
mask_write 0XF800014C 0x00003F31 0x00000501
mask_write 0XF8000150 0x00003F33 0x00001401
mask_write 0XF8000154 0x00003F33 0x00000A03
mask_write 0XF8000158 0x00003F33 0x00000601
mask_write 0XF8000168 0x00003F31 0x00000501
mask_write 0XF8000170 0x03F03F30 0x00200500
mask_write 0XF80001C4 0x00000001 0x00000001
mask_write 0XF800012C 0x01FFCCCD 0x01FC044D
mask_write 0XF800012C 0x01FFCCCD 0x01FC444D
mwr -force 0XF8000004 0x0000767B
}
proc ps7_ddr_init_data_2_0 {} {
@@ -504,10 +506,11 @@ proc ps7_clock_init_data_1_0 {} {
mask_write 0XF800014C 0x00003F31 0x00000501
mask_write 0XF8000150 0x00003F33 0x00001401
mask_write 0XF8000154 0x00003F33 0x00000A03
mask_write 0XF8000158 0x00003F33 0x00000601
mask_write 0XF8000168 0x00003F31 0x00000501
mask_write 0XF8000170 0x03F03F30 0x00200500
mask_write 0XF80001C4 0x00000001 0x00000001
mask_write 0XF800012C 0x01FFCCCD 0x01FC044D
mask_write 0XF800012C 0x01FFCCCD 0x01FC444D
mwr -force 0XF8000004 0x0000767B
}
proc ps7_ddr_init_data_1_0 {} {
+11 -7
View File
@@ -13,13 +13,15 @@ set bitstream ""
proc usage {} {
puts "Usage: xsct xsct-helper.tcl <init.tcl> \[-a|--app app.elf\] \[-b|--bit design.bit]"
puts "Options:"
puts " -a, --app Path to application ELF to download"
puts " -b, --bit Path to FPGA bitstream (.bit) to program"
puts " -h, --help Show this help"
puts " -a, --app Path to application ELF to download"
puts " -b, --bit Path to FPGA bitstream (.bit) to program"
puts " -s, --skip-reset Skip reset"
puts " -h, --help Show this help"
}
# Compact, robust parser
set expecting ""
set skip_reset 0
set endopts 0
foreach arg $argv {
# If previous option expects a value, take this arg
@@ -34,6 +36,7 @@ foreach arg $argv {
if {$arg eq "--"} { set endopts 1; continue }
if {$arg eq "-h" || $arg eq "--help"} { usage; exit 0 }
if {$arg eq "-a" || $arg eq "--app"} { set expecting app; continue }
if {$arg eq "-s" || $arg eq "--skip-reset"} { set skip_reset 1; continue }
if {$arg eq "-b" || $arg eq "--bit"} { set expecting bitstream; continue }
puts "error: unknown option: $arg"; usage; exit 1
}
@@ -100,10 +103,11 @@ target $apu_device_num
# Resetting the target involved problems when an image is stored on the flash.
# It has turned out that it is not essential to reset the system before loading
# the software components into the device.
puts "Reset target"
# TODO: Make the reset optional/configurable via input argument.
# Reset the target
rst
if {!$skip_reset} {
puts "Reset target"
# Reset the target
rst
}
# Check if bitstream is set and the file exists before programming FPGA
if {$bitstream eq ""} {
+8
View File
@@ -40,6 +40,12 @@ def main():
action="store_true",
help="No bitstream flashing for initialization with SDT.",
)
parser.add_argument(
"-s",
"--skip-reset",
action="store_true",
help="Skip device reset",
)
parser.add_argument("-a", "--app", dest="app", help="Path to the app to program")
default_ip = os.getenv("HW_SERVER_IP")
if not default_ip:
@@ -141,6 +147,8 @@ def main():
if args.app:
cmd_list.append("--app")
cmd_list.append(args.app)
if args.skip_reset:
cmd_list.append("-s")
# Join safely for shell execution
xsct_cmd = shlex.join(cmd_list)