Commit Graph

488 Commits

Author SHA1 Message Date
Sean Cross
bb0b1ff761 bitstream: use 32-bit csrs
This experimental change allows for easier writing of 32-bit registers,
and doesn't appear to adversely affect routing on the ice40.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:35:43 +08:00
Sean Cross
4c06d1dc32 sw: port to newer litex accessors
The litex register accessor functions have changed.  Use the new
function names.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:34:31 +08:00
Sean Cross
5e33e64464 deps: litex: grab latest version
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:27:53 +08:00
Sean Cross
e76d5f96c4 dfu: don't let users write more than 1.5 MB of stuff
The flash would loop around and cause boot issues.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:26:22 +08:00
Sean Cross
601f86f31d gitmodules: remove lxsocdoc
It has been integrated into litex.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:25:22 +08:00
Sean Cross
acb766e058 rtl: sbwarmboot: use upstream litex soc doc
lxsocdoc is no longer maintained.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:24:52 +08:00
Sean Cross
12bb0dba97 bitstream: generate svd as part of build
The svd file can be generated prior to building software, so generate it
as part of the build now rather than after the fact.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:24:09 +08:00
Sean Cross
42c89d12de bitstream: use "minimal" variant rather than "min"
The name "min" was deprecated and is no longer available.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:23:42 +08:00
Sean Cross
be98d4abff bitstream: specify vexriscv_debug in mem_map
This is a requirement of modern litex.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:23:01 +08:00
Sean Cross
4ce54f1b5b bitstream: use upstream litex doc documentation
lxsocdoc is now integrated into upstream litex.

This is required now in order to add new memory sections.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:22:40 +08:00
Sean Cross
fa435a44d2 update litex
Signed-off-by: Sean Cross <sean@xobs.io>
2020-02-13 08:18:09 +08:00
Sean Cross
7ced4b7ec2 litex: add csr fixes
Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-30 15:40:55 +08:00
Sean Cross
7bf4238db2 Merge branch 'master' of github.com:im-tomu/foboot 2020-01-29 10:45:56 +08:00
Sean Cross
a67d13e925 rtl: add fomucaptouch
This is an untested block that will replace fomutouch.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-29 10:32:25 +08:00
Sean Cross
3844a9a84c deps: sync with upstream
Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-29 10:32:08 +08:00
Sean Cross
ae2c39a1ac
Merge pull request #46 from wom-bat/master
Explain seed argument to foboot-bitstream.py
2020-01-25 18:13:46 +08:00
Peter Chubb
ccbefad269 Add big fat warning on updating bootloader
plus info on how to test a bootloader.
2020-01-24 12:57:27 +11:00
Peter Chubb
e6d04b8739 Add instructions for building dfu-util flashable image
Fixes #47
2020-01-23 10:57:15 +11:00
Peter Chubb
485d232563 Explain seed argument to foboot-bitstream.py
Update README to say what to do if the place-and-route process fails
to find an appropriate solution.
2020-01-23 10:27:02 +11:00
Sean Cross
be3dc254c5
LICENSE: fill in with contents of apache-2.0
Turns out that in order to apply the Apache license to your work, you're supposed
to ignore the section entitled "How to apply the Apache License to your work".
2020-01-22 20:09:33 +08:00
Sean Cross
4f24c432a8
Merge pull request #30 from enjoy-digital/yosys_template
Yosys/Build template update
2020-01-03 10:16:51 +08:00
Florent Kermarrec
0c2b05cbe6 hw/foboot-bitstream: provide yosys/build_template before override.
Since overridesof the template are done at precise locations (ex: yosys_template[2] += ...),
it's probably better to provide the template in foboot-bitstream. This allow more flexibility
for LiteX's default templates to change/evolve, while also easing foboot-bitstream code understanding.

The override code could also be simplified with the templates provided.
2020-01-02 10:35:37 +01:00
Florent Kermarrec
11f2fa8796 hw/foboot-bitstream: keep up to date with LiteX's iCE40 backend
Arachne-pnr support removed, use yosys/build_template insead of nextpnr_yosys/build_template
2020-01-02 10:35:25 +01:00
Sean Cross
bef4d6dfe5
Merge pull request #29 from david-sawatzke/doc-patch
Add note on where Boot Flags should be located
2020-01-02 10:23:27 +08:00
David Sawatzke
d8a4da6d85 Add note on where Boot Flags should be located
The first 32 words are searched
2019-12-30 17:16:14 +01:00
Sean Cross
c9571b5f4c releases: v2.0.3
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 23:33:58 +08:00
Sean Cross
447c5dac48 valentyusb: fix usb reset irq storm
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 22:17:33 +08:00
Sean Cross
5f4d07d76f releases: release v2.0.2
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 11:55:52 +08:00
Sean Cross
41e34afcbf releases: release v2.0.2
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 11:54:50 +08:00
Sean Cross
4468a55485 release: add script to make releases
This is used to produce all binaries required for release.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 10:33:56 +08:00
Sean Cross
c8872c1088 sw: don't clear OUT buffer during usb_recv
If there is data already in the OUT buffer, don't throw it away.

This was necessary when using `epfifo` due to the way it shared OUT and
SETUP packets.  However, it is causing reliability issues with eptri.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 09:47:52 +08:00
Sean Cross
bd41cbc2b5 valentyusb: get better-documented version
This improves some documentation around the eptri interface.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 08:56:50 +08:00
Sean Cross
065c0fa8b7 sw: add information to determine why it didn't update
This will be useful if it needs troubleshooting in the future.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 18:10:23 +08:00
Sean Cross
9f86fc5c96 main: initialize spi to ensure it's active
Initialize the SPI flash prior to checking for the bootloader.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 17:50:16 +08:00
Sean Cross
5718d41608 sw: accept alternate SPI ID for PVT
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:43:48 +08:00
Sean Cross
acdccf5f98 booster: change magic number for booster
Since the USB and flash communication layers are different, change the
magic number for booster.  This will prevent previous versions of foboot
from trying to launch our updater with the wrong version.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:36:45 +08:00
Sean Cross
5b5b98c6d4 sw: eptri: add a note about reset condition length
It isn't followed yet, but the note is there so I know where to look.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:36:01 +08:00
Sean Cross
0b49f2f493 sw: don't init/deinit spi at first
This was necessary due to a misunderstanding on how to use picorvspi,
but we don't even use that module anymore.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:35:20 +08:00
Sean Cross
c21b6ff7ff booster: remove obsolete usb-epfifo.c
This file isn't used anymore since we don't support epfifo.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:34:54 +08:00
Sean Cross
d10fdd580f hw: version: use 8 characters for git revision
By deafult, git only shows 7 characters.  Increase this to 8.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:33:49 +08:00
Sean Cross
b087089960 booster: don't connect usb unless in an error condition
Booster is so fast now that we probably don't need USB support.  If
there's an error condition, however, start up USB so we can hook up the
debugger.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:33:05 +08:00
Sean Cross
7f7f23be33 releases: remove updaters
There is a chance that they won't work correctly, so remove them.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 14:23:33 +08:00
Sean Cross
c79f831b63 rtl: version: always include git revision
Even when building a tagged release, include the git revision.  This
prevents the git revision from being reported as `00000000`.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 13:07:08 +08:00
Sean Cross
9b264dc7c4 v2.0.1: add svd file describing soc
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 11:53:29 +08:00
Sean Cross
57f7a8bb95 v2.0.1: generate release files
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-27 15:55:21 +08:00
Sean Cross
0156e211eb foboot: don't re-enter updater when spi id doesn't match
Consult the spi_id prior to jumping to the updater.  This will
ensure that if the wrong image is flashed, it won't get
re-executed during a reboot.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-27 14:00:05 +08:00
Sean Cross
8802d488c5 hw: foboot-bitstream: fix no-cpu build
When building without a CPU, the `self.cpu` property is not None, but
rather CPUNone.  This change was made upstream and broke no-cpu builds.

Fix these builds by checking for an instance of CPUNone.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-27 13:44:15 +08:00
Sean Cross
77632b0c9f rtl: sbled: fix pin mapping for EVT
The blue and green channels were swapped.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-27 13:24:59 +08:00
Sean Cross
e7ec80a592 Merge remote-tracking branch 'xobs/master'
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-25 15:15:06 +08:00
Sean Cross
c9a0d9d01d releases: add binaries for foboot-v2.0.0
This is the first release of Foboot v2.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-25 15:11:19 +08:00