| // Copyright lowRISC contributors. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| #include "sw/device/boot_rom/chip_info.h" // Generated. |
| #include "sw/device/boot_rom/bootstrap.h" |
| #include "sw/device/lib/common.h" |
| #include "sw/device/lib/flash_ctrl.h" |
| #include "sw/device/lib/gpio.h" |
| #include "sw/device/lib/spi_device.h" |
| #include "sw/device/lib/uart.h" |
| static inline void try_launch(void) { |
| int main(int argc, char **argv) { |
| uart_init(UART_BAUD_RATE); |
| uart_send_str((char *)chip_info); |
| uart_send_str("Bootstrap failed with status code: "); |
| // Currently the only way to recover is by a hard reset. |
| uart_send_str("Jump!\r\n"); |
| while (!uart_tx_empty()) { |