An ARM processor forked from amber a25 project. https://github.com/Disasm/amber-arm
- A Cmod-A7 FPGA module from Digilent : https://reference.digilentinc.com/reference/programmable-logic/cmod-a7/start
- MSYS2, Windows 10 WSL or Ubuntu Linux or CentOS Linux, root access for serial port.
- Vivado WebPACK (cost free from xilinx) (Digilent driver included)
- Any serial port debug tool, like putty
- ARM none-eabi compilers, either install from arm.com or like 'apt-get install gcc-arm-none-eabi'. Add the executables into PATH.
- Open Xilinx Hardware Manager and find the Cmod-A7 FPGA
- Open a serial terminal (putty or minicom) and find the second serial port of Cmod-A7, set the baudrate of 115200.
- Program cmod_a7.bit (unzipped from board/ca7/release/cmod_a7.zip)
- You may see Leds blink in turn and serial port prints hello messages. The source code is in /tests/blink_print/app.c
All hardware from 'Quick Start'
All software from 'Quick Start', and
- Python3 with pyserial installed (pip3 install pyserial)
- Open Xilinx Hardware Manager and find the Cmod-A7 FPGA.
- Close all serial port debuggers to release the serial port, we'll use it later.
- Program cmod_a7_bls_uart0.bit (unzipped from board/ca7/release/cmod_a7_bls_uart0.zip).
- Edit the
setenv.csh
orsetenv.bash
to setup the directory, andsource
it. - To build a test, run
cd simdir && make sw APP=blink
. Here blink is the application name stored in tests/blink. - Program the CPU via serial port, run
python3 sw/bin/proj.py -p <serial_port> -f tests/blink/app.mem
. Press the reset button (the one next to the PMod slot) when required, and the programmer will flush the code into instruction memory. - Run the application by
python3 sw/bin/proj.py -p <serial_port> -e run
, you will see the leds and the coler leds blink in turn.
We know the programmer requires UART0 which is not good for application that also uses UART0. Therefore we have an alternative method for programming applications.
All hardware from 'Quick Start', and
- A USB-Serial converter, or RS232-TTL converter. A converter with RTS pin is recommended.
All software from 'Quick Start'
- Power off the FPGA before operation. Plug the tx of your serial converter to Cmod-A7 Pin26 (Which is the rx of the chip), rx to Pin27, cts to Pin28 if you have one. Also GND to Pin24.
- Plug the converter onto your computer, notice its serial number.
- Open Xilinx Hardware Manager and find the Cmod-A7 FPGA.
- Serial port debuggers does not have to be closed, especially when your application uses it.
- Program cmod_a7_bls_uart1.bit (unzipped from board/ca7/release/cmod_a7_bls_uart1.zip).
- Edit the
setenv.csh
orsetenv.bash
to setup the directory, andsource
it - To build a test, run
cd simdir && make sw APP=blink
. Here blink is the application name stored in tests/blink. - Program the CPU via serial port, run
python3 sw/bin/proj.py -p <converter_serial_port> -f tests/blink/app.mem
. If your serial converter has a cts pin connected, the programming will automatically start. Otherwise, press the reset button (the one next to the PMod slot) when required, and the programmer will flush the code into instruction memory. - Run the application by
python3 sw/bin/proj.py -p <converter_serial_port> -e run
, you will see the leds and the coler leds blink in turn. Also you may try the uart_led tests to control the leds by serial port.
If you have FPGAs of Xilinx 7-series, make sure you have the followings on your platform:
- A 12MHz clock (usually from USB-serial chips), or you have the idea on how to generate a 12MHz clock (see
/board/ca7/rtl/top.v
for MMC) - Enough GPIO pins for serial, push buttons and leds.
Then create a new board entry in /board. You may copy the original /board/ca7 as start point.
Then modify the followings:
/board/<your_board>/rtl/top.xdc
to re-config the IO bindings./board/<your_board>/scripts/platform.tcl
to re-set your FPGA part.
Also you may edit /board/<your_board>/rtl/top.v
to get your own top, and also /board/<your_board>/tb/tb.sv
to setup your own testbench.
Then run vivado with:
- Edit the
setenv.csh
orsetenv.bash
to setup the directory, andsource
it. - Set env A25_BOARD (use setenv/csh or export/bash) to your board name (the same name in /board directory)
- Source the vivado settings csh/sh.
- Run
cd simdir && make vivado APP=blink_print OPTS=-D_NO_BLS_
to generate a cmod_a7.bit similiar in 'Quick Start'. - Run
cd simdir && make vivado APP=blink_print OPTS=-D_BLS_UART0_
to generate a cmod_a7_bls_uart0.bit alike. - Run
cd simdir && make vivado APP=blink_print
to generate a cmod_a7_bls_uart1.bit alike. You need an extra usb-serial converter. - The bit file is in simdir/work_xilinx7_<your_board>/a25.bit, program the bit file using Vivado Hardware Manager and the run demos.
See A25_BOARD = hsxc7 for board https://item.taobao.com/item.htm?spm=a230r.1.14.4.76c36abazr01v0&id=598068789139&ns=1&abbucket=17#detail