Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
White Rabbit Switch - Software
Commits
90e1017f
Commit
90e1017f
authored
Mar 29, 2012
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usb-loader: Add git version to samba applets
parent
772e975b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
6 deletions
+51
-6
build.sh
usb-loader/samba_applets/isp-project/build.sh
+35
-0
Makefile
usb-loader/samba_applets/isp-project/dataflash/Makefile
+1
-1
main.c
usb-loader/samba_applets/isp-project/dataflash/main.c
+8
-1
Makefile
usb-loader/samba_applets/isp-project/extram/Makefile
+3
-3
main.c
usb-loader/samba_applets/isp-project/extram/main.c
+4
-1
No files found.
usb-loader/samba_applets/isp-project/build.sh
0 → 100755
View file @
90e1017f
#!/bin/bash
## The ATMEL boot strap seems to only compile with a specific compiler
# Sourcery G++ Lite 2008q3-39 for ARM EABI
#
# ref: http://www.at91.com/forum/viewtopic.php/f,8/t,5352/
#### Function to compile each modules
compile_module
()
{
#Go to the mopdule directory
cd
${
root
}
/
${
1
}
# Obtain the git revision of the module
GITR
=
`
git log
--abbrev-commit
--pretty
=
oneline
-1
.
|
cut
-d
" "
-f1
`
# Append '+' symbol if some files need to be commited to git
if
[[
-n
`
git status
-s
.
`
]]
;
then
GITS
=
'+'
;
else
GITS
=
''
;
fi
;
#Compile the module
make
CROSS_COMPILE
=
${
CROSS_COMPILE
}
CHIP
=
at91sam9g45
BOARD
=
at91sam9g45-ek
MEMORIES
=
sram
TRACE_LEVEL
=
5
DYN_TRACES
=
1
DEFINES
=
"-D__GIT__=
\\\"
${
GITR
}${
GITS
}
\\\"
"
INSTALLDIR
=
../../
$2
}
#### Setup global variable
CROSS_COMPILE
=
/opt/wrs/misc/cd-g++lite/bin/arm-none-eabi-
root
=
"
$(
echo
$(
/bin/pwd
)
/
$dir
|
sed
's-/.$--'
)
"
#### Compilation of dataflash module
compile_module dataflash
$2
#### Compilation of extern ram module
compile_module extram
$2
less
usb-loader/samba_applets/isp-project/dataflash/Makefile
View file @
90e1017f
...
...
@@ -118,7 +118,7 @@ CFLAGS += -UDYN_TRACES
TR_LEV
=
0
endif
CFLAGS
+=
-DTRACE_LEVEL
=
$(TR_LEV)
CFLAGS
+=
-DTRACE_LEVEL
=
$(TR_LEV)
$(DEFINES)
#-------------------------------------------------------------------------------
...
...
usb-loader/samba_applets/isp-project/dataflash/main.c
View file @
90e1017f
...
...
@@ -42,6 +42,13 @@
#include <string.h>
//------------------------------------------------------------------------------
// External definitions
//------------------------------------------------------------------------------
#ifndef __GIT__
#define __GIT__ ""
#endif
//------------------------------------------------------------------------------
// Local definitions
//------------------------------------------------------------------------------
...
...
@@ -319,7 +326,7 @@ int main(int argc, char **argv)
TRACE_INFO
(
"-- DataFlash AT45 ISP Applet %s --
\n\r
"
,
SAM_BA_APPLETS_VERSION
);
TRACE_INFO
(
"-- %s
\n\r
"
,
BOARD_NAME
);
TRACE_INFO
(
"-- Compiled: %s %s
--
\n\r
"
,
__DATE__
,
__TIME
__
);
TRACE_INFO
(
"-- Compiled: %s %s
%s --
\n\r
"
,
__DATE__
,
__TIME__
,
__GIT
__
);
if
(
at45Select
[
at45Index
].
pSpiHw
==
0
)
{
...
...
usb-loader/samba_applets/isp-project/extram/Makefile
View file @
90e1017f
...
...
@@ -95,7 +95,7 @@ endif
CFLAGS
+=
$(TARGET_OPTS)
CFLAGS
+=
-Wall
-mlong-calls
-ffunction-sections
CFLAGS
+=
-g
$(OPTIMIZATION)
-mthumb
$(INCLUDES)
-D
$(CHIP)
-DDYN_TRACES
-DTRACE_DBGU
CFLAGS
+=
-g
$(OPTIMIZATION)
-mthumb
$(INCLUDES)
-D
$(CHIP)
-DDYN_TRACES
-DTRACE_DBGU
$(DEFINES)
ASFLAGS
=
$(TARGET_OPTS)
-Wall
-g
$(OPTIMIZATION)
$(INCLUDES)
-D
$(CHIP)
-D__ASSEMBLY__
LDFLAGS
=
-g
$(OPTIMIZATION)
$(TARGET_OPTS)
-Wl
,-Map
=
$(OUTPUT)
.map,--gc-sections
#-nostartfiles
...
...
@@ -148,7 +148,7 @@ VPATH += $(BOARDS)/$(BOARD)
VPATH
+=
$(BOARDS)
/
$(BOARD)
/
$(CHIP)
# Objects built from C source files
C_OBJECTS
+=
main.o
C_OBJECTS
+=
main.o
memtest.o
C_OBJECTS
+=
board_memories.o
C_OBJECTS
+=
board_lowlevel.o
C_OBJECTS
+=
dbgu.o
...
...
@@ -184,7 +184,7 @@ ASM_OBJECTS_$(1) = $(addprefix $(OBJ)/$(1)_, $(ASM_OBJECTS))
$(1)
:
$$(ASM_OBJECTS_$(1)) $$(C_OBJECTS_$(1))
$(CC)
$(LDFLAGS)
-T
"
$(AT91LIB)
/boards/
$(BOARD)
/
$(CHIP)
/
$$
@_samba.lds"
-o
$(OUTPUT)
.elf
$$
^
#bb/init.o bb/ddramc.o
#bb/init.o bb/ddramc.o
$(OBJCOPY)
-O
binary
$(OUTPUT).elf
$(OUTPUT).bin
$(SIZE)
$$^
$(OUTPUT).elf
@cp
-f
$(OUTPUT).bin
$(INSTALLDIR)
...
...
usb-loader/samba_applets/isp-project/extram/main.c
View file @
90e1017f
...
...
@@ -46,6 +46,9 @@
//------------------------------------------------------------------------------
// External definitions
//------------------------------------------------------------------------------
#ifndef __GIT__
#define __GIT__ ""
#endif
//------------------------------------------------------------------------------
// Local definitions
...
...
@@ -232,7 +235,7 @@ int main(int argc, char **argv)
TRACE_INFO
(
"-- EXTRAM ISP Applet %s --
\n\r
"
,
SAM_BA_APPLETS_VERSION
);
TRACE_INFO
(
"-- %s
\n\r
"
,
BOARD_NAME
);
TRACE_INFO
(
"-- Compiled: %s %s
--
\n\r
"
,
__DATE__
,
__TIME
__
);
TRACE_INFO
(
"-- Compiled: %s %s
%s --
\n\r
"
,
__DATE__
,
__TIME__
,
__GIT
__
);
TRACE_INFO
(
"INIT command:
\n\r
"
);
TRACE_INFO
(
"
\t
Communication link type : %d
\n\r
"
,
pMailbox
->
argument
.
inputInit
.
comType
);
...
...
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