mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 22:27:21 -04:00
⚠️ bootloader now stores executable as low-endian to flash
This commit is contained in:
parent
93470f572a
commit
82f57d8d39
4 changed files with 902 additions and 907 deletions
|
@ -506,8 +506,8 @@ corresponding operation:
|
|||
* `h`: Show the help text (again)
|
||||
* `r`: Restart the bootloader and the auto-boot sequence
|
||||
* `u`: Upload new program executable (`neorv32_exe.bin`) via UART into the instruction memory
|
||||
* `s`: Store executable to SPI flash at `spi_csn_o(0)`
|
||||
* `l`: Load executable from SPI flash at `spi_csn_o(0)`
|
||||
* `s`: Store executable to SPI flash at `spi_csn_o(0)` (little-endian byte order)
|
||||
* `l`: Load executable from SPI flash at `spi_csn_o(0)` (little-endian byte order)
|
||||
* `e`: Start the application, which is currently stored in the instruction memory (IMEM)
|
||||
|
||||
A new executable can be uploaded via UART by executing the `u` command. After that, the executable can be directly
|
||||
|
|
|
@ -503,7 +503,6 @@ the application requires to re-program the FPGA via the bitstream.
|
|||
See datasheet section https://stnolting.github.io/neorv32/#_direct_boot[Direct Boot] for more information.
|
||||
|
||||
|
||||
|
||||
Using the IMEM as ROM:
|
||||
|
||||
* for this boot concept the bootloader is no longer required
|
||||
|
@ -1009,6 +1008,9 @@ Flashing... OK
|
|||
CMD:>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The bootloader stores the executable in **little-endian** byte-order to the flash.
|
||||
|
||||
[start=6]
|
||||
. If "OK" appears in the terminal line, the programming process was successful. Now you can use the
|
||||
auto boot sequence to automatically boot your application from the flash at system start-up without
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -202,13 +202,13 @@ enum NEORV32_EXECUTABLE {
|
|||
* This global variable keeps the size of the available executable in bytes.
|
||||
* If =0 no executable is available (yet).
|
||||
**************************************************************************/
|
||||
volatile uint32_t exe_available = 0;
|
||||
volatile uint32_t exe_available;
|
||||
|
||||
|
||||
/**********************************************************************//**
|
||||
* Only set during executable fetch (required for capturing STORE BUS-TIMOUT exception).
|
||||
**************************************************************************/
|
||||
volatile uint32_t getting_exe = 0;
|
||||
volatile uint32_t getting_exe;
|
||||
|
||||
|
||||
// Function prototypes
|
||||
|
@ -687,7 +687,7 @@ uint32_t get_exe_word(int src, uint32_t addr) {
|
|||
}
|
||||
#if (SPI_EN != 0)
|
||||
else {
|
||||
data.uint8[i] = spi_flash_read_byte(addr + i);
|
||||
data.uint8[i] = spi_flash_read_byte(addr + (3-i));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -809,7 +809,7 @@ void spi_flash_write_word(uint32_t addr, uint32_t wdata) {
|
|||
|
||||
int i;
|
||||
for (i=0; i<4; i++) {
|
||||
spi_flash_write_byte(addr + i, data.uint8[i]);
|
||||
spi_flash_write_byte(addr + (3-i), data.uint8[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue