arm: working bootloader, example app
'make' will produce two outputs: - bootloader.elf to be loaded into the bitstream - app.bin to be loaded through the programmer Loading app.bin is as simple as: - reset the board - `python3 prog.py app.bin`
This commit is contained in:
21
arm/uart.cc
Normal file
21
arm/uart.cc
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "uart.h"
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr uintptr_t kUart0BaseAddress = 0x40001000;
|
||||
XUartLite uart0_inst;
|
||||
XUartLite_Config uart0_config = {
|
||||
.DeviceId = 0,
|
||||
.RegBaseAddr = kUart0BaseAddress,
|
||||
.BaudRate = 115200,
|
||||
.UseParity = false,
|
||||
.DataBits = 8,
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
XUartLite* uart0 = &uart0_inst;
|
||||
|
||||
void InitUarts() {
|
||||
XUartLite_CfgInitialize(uart0, &uart0_config, uart0_config.RegBaseAddr);
|
||||
}
|
Reference in New Issue
Block a user