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
3abe33fa
Commit
3abe33fa
authored
Aug 14, 2020
by
Tomasz Wlostowski
Committed by
Grzegorz Daniluk
Oct 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UART bootloader for Greg
parent
361de2e8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
164 additions
and
17293 deletions
+164
-17293
board.h
tools/uart-bootloader/board.h
+2
-0
boot.c
tools/uart-bootloader/boot.c
+7
-2
boot.ld
tools/uart-bootloader/boot.ld
+2
-2
wrc-bootloader.ram
tools/uart-bootloader/wrc-bootloader.ram
+153
-17289
No files found.
tools/uart-bootloader/board.h
View file @
3abe33fa
...
...
@@ -25,6 +25,8 @@
#include <stdint.h>
#define BASE_CLOCK 62500000 // Xtal frequency
#define CPU_CLOCK 62500000 // Xtal frequency
#define CONSOLE_UART_BAUDRATE 921600 // Xtal frequency
#define BASE_UART 0x20500
#define BASE_SYSCON 0x20400
...
...
tools/uart-bootloader/boot.c
View file @
3abe33fa
...
...
@@ -22,7 +22,7 @@
#include <stdint.h>
#include <stdio.h>
#
define
CONFIG_ERTM14_FLASH
#
undef
CONFIG_ERTM14_FLASH
#include "board.h"
...
...
@@ -79,6 +79,8 @@ struct gpio_device gpio_aux;
struct
spi_bus
spi_flash
;
struct
spi_flash_device
dev_flash
;
void
start_user
();
static
void
boot_sysc_gpio_set_dir
(
const
struct
gpio_pin
*
pin
,
int
dir
)
{
}
...
...
@@ -119,7 +121,7 @@ void boot_flash_init()
&
boot_pin_sysc_spi_sclk
,
10
);
spi_flash_create
(
&
dev_flash
,
&
spi_flash
,
16384
);
spi_flash_create
(
&
dev_flash
,
&
spi_flash
,
16384
,
0x0
);
}
#endif
...
...
@@ -398,8 +400,10 @@ void boot_fsm()
#define ERTM14_FLASH_PAGE_SIZE 65536
#define ERTM14_FLASH_SIZE 16777216
#define ERTM14_FIRMWARE_MAGIC 0xf1dee41a
void
try_flash_boot
()
{
#ifdef CONFIG_ERTM14_FLASH
uint8_t
buf
[
512
];
uint32_t
offset
;
for
(
offset
=
0
;
offset
<
ERTM14_FLASH_SIZE
;
offset
+=
ERTM14_FLASH_PAGE_SIZE
)
...
...
@@ -415,6 +419,7 @@ void try_flash_boot()
start_user
();
}
}
#endif
}
...
...
tools/uart-bootloader/boot.ld
View file @
3abe33fa
...
...
@@ -7,10 +7,10 @@ MEMORY
LENGTH = 0x100
ram :
ORIGIN = 131072
+ 65536
- 8192
ORIGIN = 131072 - 8192
LENGTH = 6800
stack :
ORIGIN = 131072
+ 65536
- 2048,
ORIGIN = 131072 - 2048,
LENGTH = 2038
}
...
...
tools/uart-bootloader/wrc-bootloader.ram
View file @
3abe33fa
This diff is collapsed.
Click to expand it.
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