Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
14a84cc7
Commit
14a84cc7
authored
Nov 01, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'build-changes'
parents
922fbf87
f05f3757
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
100 additions
and
202 deletions
+100
-202
Kconfig
Kconfig
+5
-0
Makefile
Makefile
+44
-30
ram.ld
arch/lm32/ram.ld
+19
-109
board.c
boards/arria/board.c
+0
-13
board.c
boards/spec/board.c
+0
-13
dev.mk
dev/dev.mk
+12
-11
lib.mk
lib/lib.mk
+2
-7
shell.mk
shell/shell.mk
+16
-17
sockitowm.mk
sockitowm/sockitowm.mk
+1
-1
tests.mk
tests/tests.mk
+1
-1
No files found.
Kconfig
View file @
14a84cc7
...
@@ -19,3 +19,8 @@ config DETERMINISTIC_BINARY
...
@@ -19,3 +19,8 @@ config DETERMINISTIC_BINARY
changes.
changes.
If in doubt, say No.
If in doubt, say No.
# The following will soon become a choice with ppsi
config PTP_NOPOSIX
boolean
default y
\ No newline at end of file
Makefile
View file @
14a84cc7
...
@@ -11,20 +11,17 @@ SIZE = $(CROSS_COMPILE)size
...
@@ -11,20 +11,17 @@ SIZE = $(CROSS_COMPILE)size
-include
$(CURDIR)/.config
-include
$(CURDIR)/.config
OBJS_WRC
=
wrc_main.o
\
wrc_ptp.o
\
monitor/monitor.o
PTP_NOPOSIX
=
ptp-noposix
PTP_NOPOSIX
=
ptp-noposix
INCLUDE_DIRS
=
-I
$(PTP_NOPOSIX)
/wrsw_hal
\
obj-y
=
arch
/lm32/crt0.o
arch
/lm32/irq.o
arch
/lm32/debug.o
-I
$(PTP_NOPOSIX)
/libptpnetif
\
obj-y
+=
wrc_main.o wrc_ptp.o monitor/monitor.o
-I
$(PTP_NOPOSIX)
/softpll
\
-Iinclude
CFLAGS
=
-include
$(CURDIR)
/include/generated/autoconf.h
cflags-y
=
-include
$(CURDIR)
/include/generated/autoconf.h
\
-Iinclude
-I
.
CFLAGS_PTPD
=
-ffreestanding
\
cflags-$(CONFIG_PTP_NOPOSIX)
+=
\
-ffreestanding
\
-DPTPD_FREESTANDING
\
-DPTPD_FREESTANDING
\
-DWRPC_EXTRA_SLIM
\
-DWRPC_EXTRA_SLIM
\
-DPTPD_MSBF
\
-DPTPD_MSBF
\
...
@@ -34,9 +31,13 @@ CFLAGS_PTPD = -ffreestanding \
...
@@ -34,9 +31,13 @@ CFLAGS_PTPD = -ffreestanding \
-DPTPD_TRACE_MASK
=
0
\
-DPTPD_TRACE_MASK
=
0
\
-include
$(PTP_NOPOSIX)
/compat.h
\
-include
$(PTP_NOPOSIX)
/compat.h
\
-include
$(PTP_NOPOSIX)
/PTPWRd/dep/trace.h
\
-include
$(PTP_NOPOSIX)
/PTPWRd/dep/trace.h
\
-include
$(PTP_NOPOSIX)
/libposix/ptpd-wrappers.h
-include
$(PTP_NOPOSIX)
/libposix/ptpd-wrappers.h
\
-I
$(PTP_NOPOSIX)
/wrsw_hal
\
-I
$(PTP_NOPOSIX)
/libptpnetif
\
-I
$(PTP_NOPOSIX)
/softpll
\
-I
$(PTP_NOPOSIX)
/PTPWRd
OBJS_PTPD
=
$(PTP_NOPOSIX)
/PTPWRd/arith.o
\
obj-$(CONFIG_PTP_NOPOSIX)
+
=
$(PTP_NOPOSIX)/PTPWRd/arith.o
\
$(PTP_NOPOSIX)/PTPWRd/bmc.o
\
$(PTP_NOPOSIX)/PTPWRd/bmc.o
\
$(PTP_NOPOSIX)/PTPWRd/dep/msg.o
\
$(PTP_NOPOSIX)/PTPWRd/dep/msg.o
\
$(PTP_NOPOSIX)/PTPWRd/dep/net.o
\
$(PTP_NOPOSIX)/PTPWRd/dep/net.o
\
...
@@ -55,8 +56,6 @@ CFLAGS_PLATFORM = -mmultiply-enabled -mbarrel-shift-enabled
...
@@ -55,8 +56,6 @@ CFLAGS_PLATFORM = -mmultiply-enabled -mbarrel-shift-enabled
LDFLAGS_PLATFORM
=
-mmultiply-enabled
-mbarrel-shift-enabled
\
LDFLAGS_PLATFORM
=
-mmultiply-enabled
-mbarrel-shift-enabled
\
-nostdlib
-T
arch
/lm32/ram.ld
-nostdlib
-T
arch
/lm32/ram.ld
OBJS_PLATFORM
=
arch
/lm32/crt0.o
arch
/lm32/irq.o
arch
/lm32/debug.o
include
shell/shell.mk
include
shell/shell.mk
include
tests/tests.mk
include
tests/tests.mk
include
lib/lib.mk
include
lib/lib.mk
...
@@ -64,33 +63,38 @@ include sockitowm/sockitowm.mk
...
@@ -64,33 +63,38 @@ include sockitowm/sockitowm.mk
include
dev/dev.mk
include
dev/dev.mk
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_EB)
$(CFLAGS_PTPD)
$(INCLUDE_DIRS)
\
CFLAGS
=
$(CFLAGS_PLATFORM)
$
(
cflags-y
)
\
-ffunction-sections
-fdata-sections
-Os
-Iinclude
\
-ffunction-sections
-fdata-sections
-Os
\
-include
include/trace.h
\
-include
include/trace.h
$(PTPD_CFLAGS)
-I
$(PTP_NOPOSIX)
/PTPWRd
-I
.
-Isoftpll
LDFLAGS
=
$(LDFLAGS_PLATFORM)
\
LDFLAGS
=
$(LDFLAGS_PLATFORM)
\
-
ffunction-sections
-fdata-sections
-Wl
,--gc-sections
-Os
-Iinclude
-
Wl
,--gc-sections
-Os
-lgcc
-lc
OBJS
=
$(OBJS_PLATFORM)
$(OBJS_WRC)
$(OBJS_PTPD)
\
OBJS
=
$
(
obj-y
)
$(OBJS_SHELL)
$(OBJS_TESTS)
$(OBJS_LIB)
\
$(OBJS_SOCKITOWM)
$(OBJS_SOFTPLL)
$(OBJS_DEV)
OUTPUT
=
wrc
OUTPUT
=
wrc
REVISION
=
$(
shell
git describe
--dirty
--always
)
REVISION
=
$(
shell
git describe
--dirty
--always
)
all
:
tools wrc
all
:
tools $(OUTPUT).ram $(OUTPUT).vhd
.PRECIOUS
:
%.elf %.bin
.PHONY
:
all tools clean gitmodules
wrc
:
silentoldconfig
$(OBJS)
$(OUTPUT).elf
:
silentoldconfig gitmodules
$(OBJS)
$(CC)
$(CFLAGS)
-DGIT_REVISION
=
\"
$(REVISION)
\"
-c
revision.c
$(CC)
$(CFLAGS)
-DGIT_REVISION
=
\"
$(REVISION)
\"
-c
revision.c
$(SIZE)
-t
$(OBJS)
${
CC
}
-o
$@
revision.o
$(OBJS)
$(LDFLAGS)
${
CC
}
-o
$(OUTPUT)
.elf revision.o
$(OBJS)
$(LDFLAGS)
${
OBJCOPY
}
-O
binary
$(OUTPUT)
.elf
$(OUTPUT)
.bin
${
OBJDUMP
}
-d
$(OUTPUT)
.elf
>
$(OUTPUT)
_disasm.S
${
OBJDUMP
}
-d
$(OUTPUT)
.elf
>
$(OUTPUT)
_disasm.S
cd
tools
;
$(MAKE)
$(SIZE)
$@
./tools/genraminit
$(OUTPUT)
.bin 0
>
$(OUTPUT)
.ram
./tools/genramvhd
-s
90112
$(OUTPUT)
.bin
>
$(OUTPUT)
.vhd
%.bin
:
%.elf
${
OBJCOPY
}
-O
binary
$^
$@
%.ram
:
tools %.bin
./tools/genraminit
$*
.bin 0
>
$@
%.vhd
:
tools %.bin
./tools/genramvhd
-s
90112
$*
.bin
>
$@
$(OBJS)
:
include/board.h
$(OBJS)
:
include/board.h
...
@@ -105,7 +109,16 @@ clean:
...
@@ -105,7 +109,16 @@ clean:
${
CC
}
$(CFLAGS)
$(PTPD_CFLAGS)
$(INCLUDE_DIR)
$(LIB_DIR)
-c
$*
.c
-o
$@
${
CC
}
$(CFLAGS)
$(PTPD_CFLAGS)
$(INCLUDE_DIR)
$(LIB_DIR)
-c
$*
.c
-o
$@
tools
:
tools
:
make
-C
tools
$(MAKE)
-C
tools
# if needed, check out the submodules (first time only), so users
# who didn't read carefully the manual won't get confused
gitmodules
:
@
test
-d
ptp-noposix/libposix
||
echo
"Checking out submodules"
@
test
-d
ptp-noposix/libposix
||
\
git submodule init
&&
git submodule update
# following targets from Makefile.kconfig
# following targets from Makefile.kconfig
silentoldconfig
:
silentoldconfig
:
...
@@ -116,3 +129,4 @@ scripts_basic config %config:
...
@@ -116,3 +129,4 @@ scripts_basic config %config:
$(MAKE)
-f
Makefile.kconfig
$@
$(MAKE)
-f
Makefile.kconfig
$@
.config
:
silentoldconfig
.config
:
silentoldconfig
arch/lm32/ram.ld
View file @
14a84cc7
/*
/*
* Simulator Link script for Lattice Mico32.
* Link script for Lattice Mico32. Very loosely based on
* Contributed by Jon Beniston <jon@beniston.com>
* code contributed by Jon Beniston <jon@beniston.com>
*
* Jon's license (BSD-style):
*
*
* Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* modification, are permitted provided that the following conditions
...
@@ -26,8 +28,6 @@
...
@@ -26,8 +28,6 @@
OUTPUT_FORMAT("elf32-lm32")
OUTPUT_FORMAT("elf32-lm32")
ENTRY(_start)
ENTRY(_start)
/*INPUT() */
GROUP(-lgcc -lc)
MEMORY
MEMORY
{
{
...
@@ -36,114 +36,24 @@ MEMORY
...
@@ -36,114 +36,24 @@ MEMORY
SECTIONS
SECTIONS
{
{
.boot : { *(.boot) } > ram
.boot : { *(.boot) } > ram
.text : { *(.text .text.*) } > ram =0
/* Code */
.text :
{
. = ALIGN(4);
_ftext = .;
_ftext_rom = LOADADDR(.text);
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.gnu.warning)
KEEP (*(.init))
KEEP (*(.fini))
/* Constructors and destructors */
KEEP (*crtbegin*.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
KEEP (*crtbegin*.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
KEEP (*(.jcr))
_etext = .;
} > ram =0
/* Exception handlers */
.eh_frame_hdr : { *(.eh_frame_hdr) } > ram
.eh_frame : { KEEP (*(.eh_frame)) } > ram
.gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) } > ram
/* Read-only data */
.rodata :
{
. = ALIGN(4);
_frodata = .;
_frodata_rom = LOADADDR(.rodata);
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1)
_erodata = .;
} > ram
/* Data */
.data :
{
. = ALIGN(4);
_fdata = .;
_fdata_rom = LOADADDR(.data);
*(.data .data.* .gnu.linkonce.d.*)
*(.data1)
SORT(CONSTRUCTORS)
_gp = ALIGN(16) + 0x7ff0;
*(.sdata .sdata.* .gnu.linkonce.s.*)
_edata = .;
} > ram
/* BSS */
.rodata : { *(.rodata .rodata.*) } > ram
.bss :
{
. = ALIGN(4);
_fbss = .;
*(.dynsbss)
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
_end = .;
PROVIDE (end = .);
} > ram
/* First location in stack is highest address in RAM */
.data : {
PROVIDE(_fstack = ORIGIN(ram) + LENGTH(ram) - 4);
*(.data .data.*)
_gp = ALIGN(16) + 0x7ff0; /* FIXME: what is this? */
} > ram
/* Stabs debugging sections. */
.bss : {
.stab 0 : { *(.stab) }
_fbss = .;
.stabstr 0 : { *(.stabstr) }
*(.bss .bss.*)
.stab.excl 0 : { *(.stab.excl) }
*(COMMON)
.stab.exclstr 0 : { *(.stab.exclstr) }
_ebss = .;
.stab.index 0 : { *(.stab.index) }
} > ram
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
/* First location in stack is highest address in RAM */
Symbols in the DWARF debugging sections are relative to the beginning
PROVIDE(_fstack = ORIGIN(ram) + LENGTH(ram) - 4);
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
}
}
boards/arria/board.c
deleted
100644 → 0
View file @
922fbf87
#include "board.h"
/* Board-specific initialization code */
int
board_init
()
{
}
int
board_update
()
{
}
boards/spec/board.c
deleted
100644 → 0
View file @
922fbf87
#include "board.h"
/* Board-specific initialization code */
int
board_init
()
{
}
int
board_update
()
{
}
dev/dev.mk
View file @
14a84cc7
OBJS_DEV = dev/eeprom.o \
obj-y += \
dev/endpoint.o \
dev/eeprom.o \
dev/ep_pfilter.o \
dev/endpoint.o \
dev/i2c.o \
dev/ep_pfilter.o \
dev/minic.o \
dev/i2c.o \
dev/pps_gen.o \
dev/minic.o \
dev/syscon.o \
dev/pps_gen.o \
dev/uart.o \
dev/syscon.o \
dev/sfp.o \
dev/uart.o \
dev/onewire.o \
dev/sfp.o \
dev/sdb.o
dev/onewire.o \
dev/sdb.o
lib/lib.mk
View file @
14a84cc7
OBJS_LIB= lib/mprintf.o \
obj-y += lib/mprintf.o lib/util.o
lib/util.o
ifdef CONFIG_ETHERBONE
obj-$(CONFIG_ETHERBONE) += lib/arp.o lib/icmp.o lib/ipv4.o lib/bootp.o
OBJS_LIB += lib/arp.o lib/icmp.o lib/ipv4.o lib/bootp.o
endif
\ No newline at end of file
shell/shell.mk
View file @
14a84cc7
OBJS_SHELL = shell/shell.o \
obj-y += \
shell/environ.o \
shell/shell.o \
shell/cmd_version.o \
shell/environ.o \
shell/cmd_pll.o \
shell/cmd_version.o \
shell/cmd_sfp.o \
shell/cmd_pll.o \
shell/cmd_stat.o \
shell/cmd_sfp.o \
shell/cmd_ptp.o \
shell/cmd_stat.o \
shell/cmd_mode.o \
shell/cmd_ptp.o \
shell/cmd_calib.o \
shell/cmd_mode.o \
shell/cmd_time.o \
shell/cmd_calib.o \
shell/cmd_gui.o \
shell/cmd_time.o \
shell/cmd_sdb.o \
shell/cmd_gui.o \
shell/cmd_mac.o \
shell/cmd_sdb.o \
shell/cmd_init.o
shell/cmd_mac.o \
shell/cmd_init.o
ifdef CONFIG_ETHERBONE
obj-$(CONFIG_ETHERBONE) += shell/cmd_ip.o
OBJS_SHELL += shell/cmd_ip.o
endif
sockitowm/sockitowm.mk
View file @
14a84cc7
OBJS_SOCKITOWM
= \
obj-y +
= \
sockitowm/crcutil.o \
sockitowm/crcutil.o \
sockitowm/eep43.o \
sockitowm/eep43.o \
sockitowm/findtype.o \
sockitowm/findtype.o \
...
...
tests/tests.mk
View file @
14a84cc7
OBJS_TESTS = tests/measure_t24p.o
obj-y += tests/measure_t24p.o
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment