Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
be2a89d9
Commit
be2a89d9
authored
Sep 04, 2012
by
Henrik Nordstrom
Browse files
fel-pio.bin: Add a jump table in the beginning to ease usage
parent
a072e4f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
be2a89d9
...
...
@@ -15,7 +15,7 @@ all: $(TOOLS)
misc
:
$(MISC_TOOLS)
clean
:
@
rm
-vf
$(TOOLS)
$(MISC_TOOLS)
@
rm
-vf
$(TOOLS)
$(MISC_TOOLS)
*
.o
*
.elf
$(TOOLS)
:
Makefile common.h
...
...
@@ -27,8 +27,6 @@ fexc: fexc.h script.h script.c \
script_bin.h script_bin.c
\
script_fex.h script_fex.c
bootinfo
:
bootinfo.c
LIBUSB
=
libusb-1.0
LIBUSB_CFLAGS
=
`
pkg-config
--cflags
$(LIBUSB)
`
LIBUSB_LIBS
=
`
pkg-config
--libs
$(LIBUSB)
`
...
...
@@ -39,6 +37,19 @@ fel: fel.c
%
:
%.c
$(CC)
$(CFLAGS)
$(LDFLAGS)
-o
$@
$(
filter
%.c,
$^
)
$(LIBS)
.dummy
:
fel-pio.bin
fel-pio.bin
:
fel-pio.elf fel-pio.nm
arm-none-eabi-objcopy
-O
binary fel-pio.elf fel-pio.bin
fel-pio.elf
:
fel-pio.c
arm-none-eabi-gcc
-g
-Os
-fno-common
-fno-builtin
-ffreestanding
-nostdinc
-mno-thumb-interwork
-Wall
-Wstrict-prototypes
-fno-stack-protector
-Wno-format-nonliteral
-Wno-format-security
-fno-toplevel-reorder
fel-pio.c
-nostdlib
-o
fel-pio.elf
-T
fel-pio.lds
fel-pio.nm
:
fel-pio.elf
arm-none-eabi-nm fel-pio.elf |
grep
-v
" _"
>
fel-pio.nm
bootinfo
:
bootinfo.c
.gitignore
:
Makefile
@
for
x
in
$(TOOLS)
'*.o'
'*.swp'
;
do
\
echo
"
$$
x"
;
\
...
...
fel-pio.c
View file @
be2a89d9
...
...
@@ -21,15 +21,28 @@
Build instructions:
arm-none-
linux-gnu
eabi-gcc -g -Os -fno-common
-ffixed-r8 -msoft-float
-fno-builtin -ffreestanding -nostdinc -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fno-toplevel-reorder fel-pio.c -
c
arm-none-eabi-gcc -g -Os -fno-common -fno-builtin -ffreestanding -nostdinc -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fno-toplevel-reorder fel-pio.c -
nostdlib -o fel-pio.elf
arm-none-
linux-gnu
eabi-objcopy -O binary fel-pio.
o
fel-pio.bin
arm-none-eabi-objcopy -O binary fel-pio.
elf
fel-pio.bin
arm-none-
linux-gnu
eabi-nm fel-pio.o
arm-none-eabi-nm fel-pio.o
*/
void
_pio_to_sram
(
void
);
void
_sram_to_pio
(
void
);
void
pio_to_sram
(
void
)
{
_pio_to_sram
();
}
void
sram_to_pio
(
void
)
{
_sram_to_pio
();
}
void
_pio_to_sram
(
void
)
{
unsigned
long
*
a
=
(
void
*
)
0x1c20800
;
unsigned
long
*
b
=
(
void
*
)
0x3000
;
...
...
@@ -39,7 +52,7 @@ void pio_to_sram(void)
}
}
void
sram_to_pio
(
void
)
void
_
sram_to_pio
(
void
)
{
unsigned
long
*
a
=
(
void
*
)
0x1c20800
;
unsigned
long
*
b
=
(
void
*
)
0x3000
;
...
...
fel-pio.lds
0 → 100644
View file @
be2a89d9
SECTIONS
{
. = 0x2000;
.text : { *(.text) }
}
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