Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #295 from sifive/update-targets
Browse files Browse the repository at this point in the history
Fix OpenOCD cfg and remove warnings
  • Loading branch information
nategraff-sifive authored Jun 21, 2019
2 parents 543c5f1 + b3cf267 commit 4bc2e51
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion bsp/freedom-e310-arty/metal-inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/* --------------------- fixed_clock ------------ */
extern inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock);
extern inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock);


/* --------------------- fixed_factor_clock ------------ */
Expand Down
2 changes: 1 addition & 1 deletion bsp/freedom-e310-arty/metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct __metal_driver_sifive_uart0 __metal_dt_serial_10013000;


/* --------------------- fixed_clock ------------ */
static inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock)
static inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock)
{
if ((uintptr_t)clock == (uintptr_t)&__metal_dt_clock_0) {
return METAL_FIXED_CLOCK_0_CLOCK_FREQUENCY;
Expand Down
2 changes: 1 addition & 1 deletion bsp/qemu-sifive-e31/metal-inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/* --------------------- fixed_clock ------------ */
extern inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock);
extern inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock);


/* --------------------- fixed_factor_clock ------------ */
Expand Down
2 changes: 1 addition & 1 deletion bsp/qemu-sifive-e31/metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000;


/* --------------------- fixed_clock ------------ */
static inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock)
static inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock)
{
if ((uintptr_t)clock == (uintptr_t)&__metal_dt_clock_0) {
return METAL_FIXED_CLOCK_0_CLOCK_FREQUENCY;
Expand Down
2 changes: 1 addition & 1 deletion bsp/qemu-sifive-s51/metal-inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/* --------------------- fixed_clock ------------ */
extern inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock);
extern inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock);


/* --------------------- fixed_factor_clock ------------ */
Expand Down
2 changes: 1 addition & 1 deletion bsp/qemu-sifive-s51/metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000;


/* --------------------- fixed_clock ------------ */
static inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock)
static inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock)
{
if ((uintptr_t)clock == (uintptr_t)&__metal_dt_clock_0) {
return METAL_FIXED_CLOCK_0_CLOCK_FREQUENCY;
Expand Down
2 changes: 1 addition & 1 deletion bsp/sifive-hifive-unleashed/metal-inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/* --------------------- fixed_clock ------------ */
extern inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock);
extern inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock);


/* --------------------- fixed_factor_clock ------------ */
Expand Down
2 changes: 1 addition & 1 deletion bsp/sifive-hifive-unleashed/metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct __metal_driver_sifive_fu540_c000_l2 __metal_dt_cache_controller_2010000;


/* --------------------- fixed_clock ------------ */
static inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock)
static inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock)
{
if ((uintptr_t)clock == (uintptr_t)&__metal_dt_refclk) {
return METAL_FIXED_CLOCK__CLOCK_FREQUENCY;
Expand Down
10 changes: 5 additions & 5 deletions bsp/sifive-hifive-unleashed/openocd.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
adapter_khz 10000

interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ftdi_vid_pid 0x15ba 0x002a
ftdi_device_desc "Dual RS232-HS"
ftdi_vid_pid 0x0403 0x6010

ftdi_layout_init 0x0808 0x0a1b
ftdi_layout_signal nSRST -oe 0x0200
ftdi_layout_signal LED -data 0x0800
ftdi_layout_init 0x0008 0x001b
ftdi_layout_signal nSRST -oe 0x0020
ftdi_layout_signal LED -data 0x0020

set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5
Expand Down
2 changes: 1 addition & 1 deletion bsp/sifive-hifive1-revb/metal-inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/* --------------------- fixed_clock ------------ */
extern inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock);
extern inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock);


/* --------------------- fixed_factor_clock ------------ */
Expand Down
2 changes: 1 addition & 1 deletion bsp/sifive-hifive1-revb/metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000;


/* --------------------- fixed_clock ------------ */
static inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock)
static inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock)
{
if ((uintptr_t)clock == (uintptr_t)&__metal_dt_clock_0) {
return METAL_FIXED_CLOCK_0_CLOCK_FREQUENCY;
Expand Down
2 changes: 1 addition & 1 deletion bsp/sifive-hifive1/metal-inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/* --------------------- fixed_clock ------------ */
extern inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock);
extern inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock);


/* --------------------- fixed_factor_clock ------------ */
Expand Down
2 changes: 1 addition & 1 deletion bsp/sifive-hifive1/metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct __metal_driver_sifive_fe310_g000_prci __metal_dt_prci_10008000;


/* --------------------- fixed_clock ------------ */
static inline unsigned long __metal_driver_fixed_clock_rate(struct metal_clock *clock)
static inline unsigned long __metal_driver_fixed_clock_rate(const struct metal_clock *clock)
{
if ((uintptr_t)clock == (uintptr_t)&__metal_dt_clock_0) {
return METAL_FIXED_CLOCK_0_CLOCK_FREQUENCY;
Expand Down
10 changes: 5 additions & 5 deletions bsp/sifive-hifive1/openocd.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
adapter_khz 10000

interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ftdi_vid_pid 0x15ba 0x002a
ftdi_device_desc "Dual RS232-HS"
ftdi_vid_pid 0x0403 0x6010

ftdi_layout_init 0x0808 0x0a1b
ftdi_layout_signal nSRST -oe 0x0200
ftdi_layout_signal LED -data 0x0800
ftdi_layout_init 0x0008 0x001b
ftdi_layout_signal nSRST -oe 0x0020
ftdi_layout_signal LED -data 0x0020

set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5
Expand Down
3 changes: 2 additions & 1 deletion bsp/update-targets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ update_target() {

if [[ "$TARGET_TYPE" =~ "arty" || "$TARGET_TYPE" =~ "hifive" ]] ; then
if [ `grep -c "jlink" $TARGET/$SETTINGS_FILENAME` -ne 1 ] ; then
$OPENOCDCFG_GENERATOR -d $TARGET/$DTB_FILENAME -o $TARGET/$OPENOCDCFG_FILENAME || warn "Failed to produce $TARGET/$OPENOCDCFG_FILENAME"
echo "generating openocd.cfg"
$OPENOCDCFG_GENERATOR -d $TARGET/$DTB_FILENAME -b $TARGET_TYPE -o $TARGET/$OPENOCDCFG_FILENAME || warn "Failed to produce $TARGET/$OPENOCDCFG_FILENAME"
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion freedom-devicetree-tools

0 comments on commit 4bc2e51

Please sign in to comment.