Line 1... |
Line 1... |
// #################################################################################################
|
// #################################################################################################
|
// # << NEORV32 - Bootloader >> #
|
// # << NEORV32 - Bootloader >> #
|
// # ********************************************************************************************* #
|
// # ********************************************************************************************* #
|
// # In order to run the bootloader on any CPU configuration, the bootloader should be compiled #
|
// # In order to run the bootloader on *any* CPU configuration, the bootloader should be compiled #
|
// # unsing the base ISA (rv32i/rv32e) only. #
|
// # unsing the base ISA (rv32i/rv32e) only. #
|
// # ********************************************************************************************* #
|
// # ********************************************************************************************* #
|
// # Boot from (internal) instruction memory, UART or SPI Flash. #
|
// # Boot from (internal) instruction memory, UART or SPI Flash. #
|
// # #
|
// # #
|
// # The bootloader uses the primary UART (UART0) for user console interface. #
|
// # The bootloader uses the primary UART (UART0) for user console interface. #
|
Line 16... |
Line 16... |
// # -> Try booting from SPI flash at spi_csn_o(0). #
|
// # -> Try booting from SPI flash at spi_csn_o(0). #
|
// # -> Permanently light up status led and stall CPU if SPI flash booting attempt fails. #
|
// # -> Permanently light up status led and stall CPU if SPI flash booting attempt fails. #
|
// # ********************************************************************************************* #
|
// # ********************************************************************************************* #
|
// # BSD 3-Clause License #
|
// # BSD 3-Clause License #
|
// # #
|
// # #
|
// # Copyright (c) 2020, Stephan Nolting. All rights reserved. #
|
// # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
|
// # #
|
// # #
|
// # Redistribution and use in source and binary forms, with or without modification, are #
|
// # Redistribution and use in source and binary forms, with or without modification, are #
|
// # permitted provided that the following conditions are met: #
|
// # permitted provided that the following conditions are met: #
|
// # #
|
// # #
|
// # 1. Redistributions of source code must retain the above copyright notice, this list of #
|
// # 1. Redistributions of source code must retain the above copyright notice, this list of #
|
Line 259... |
Line 259... |
neorv32_uart_print("\n\n\n\n<< NEORV32 Bootloader >>\n\n"
|
neorv32_uart_print("\n\n\n\n<< NEORV32 Bootloader >>\n\n"
|
"BLDV: "__DATE__"\nHWV: ");
|
"BLDV: "__DATE__"\nHWV: ");
|
print_hex_word(neorv32_cpu_csr_read(CSR_MIMPID));
|
print_hex_word(neorv32_cpu_csr_read(CSR_MIMPID));
|
neorv32_uart_print("\nCLK: ");
|
neorv32_uart_print("\nCLK: ");
|
print_hex_word(SYSINFO_CLK);
|
print_hex_word(SYSINFO_CLK);
|
neorv32_uart_print(" Hz\nUSER: ");
|
neorv32_uart_print("\nUSER: ");
|
print_hex_word(SYSINFO_USER_CODE);
|
print_hex_word(SYSINFO_USER_CODE);
|
neorv32_uart_print("\nMISA: ");
|
neorv32_uart_print("\nMISA: ");
|
print_hex_word(neorv32_cpu_csr_read(CSR_MISA));
|
print_hex_word(neorv32_cpu_csr_read(CSR_MISA));
|
|
neorv32_uart_print("\nZEXT: ");
|
|
print_hex_word(neorv32_cpu_csr_read(CSR_MZEXT));
|
neorv32_uart_print("\nPROC: ");
|
neorv32_uart_print("\nPROC: ");
|
print_hex_word(SYSINFO_FEATURES);
|
print_hex_word(SYSINFO_FEATURES);
|
neorv32_uart_print("\nIMEM: ");
|
neorv32_uart_print("\nIMEM: ");
|
print_hex_word(SYSINFO_IMEM_SIZE);
|
print_hex_word(SYSINFO_IMEM_SIZE);
|
neorv32_uart_print(" bytes @ ");
|
neorv32_uart_print(" bytes @ ");
|