0. 环境
- win10 + vivado 2018.3 + keil mdk
- jlink
- XC7A35TV12
1. 下载资料
https://keilpack.azureedge.net/pack/Keil.V2M-MPS2_DSx_BSP.1.1.0.pack
https://gitee.com/whik/cortex_m3_on_xc7a100t
2. vivado 2018
Create Project -> Next ->
-> Project name: cortex_m3
-> Project location: E:/Workspaces/vivado2018/XC7A35TV12/
-> 取消勾选 Create project subdirectory
-> RTL Project
-> Next -> Next
-> xc7a35tftg256-1
-> finish
创建Block Design
点击IP INTEGRATOR下的 Create Block Design -> Design name: cm3_core -> OK
2.1 添加m3 ip核
把
mcu designstart cortex-m3\cortex_m3_on_xc7a100t-main\cm3_core
拷贝到
E:\Workspaces\vivado2018\XC7A35TV12\cortex_m3\cm3_core

-> 点击PROJECT MANAGER下的Settings -> IP -> Repository -> Add -> E:\Workspaces\vivado2018\XC7A35TV12\cortex_m3\cm3_core
-> Apply -> OK
添加Cortex-M3
点击Diagram下的+ -> 筛选并双击Cortex-M3 -> 双击新建的实例CORTEXM3_AXI_0 ->
-> Debug -> Trace Level: 0 = No trace -> 取消勾选 JTAG Port Present
-> Instruction Memory -> ITCM Size: 64kB -> 取消勾选 Initialise ITCM
2.2 Clocking Wizard
点击Diagram下的+ -> 筛选并双击Clocking Wizard -> 双击新建的实例 clk_wiz_0 ->
-> Clocking Options -> Primary 50MHz ->
-> Output Clocks -> clk_out1: 50MHz ->
-> Reset Type: Active Low
-> OK

2.3 复位
点击Diagram下的+ -> 筛选并双击Processor System Reset -> OK
点击Diagram下的+ -> 筛选并双击 Utility Vector Logic -> 双击新建的实例 util_vector_logic_0 ->
-> C_SIZE: 1 -> not -> OK

2.4 AXI
点击Diagram下的+ -> 筛选并双击 AXI Interconnect -> OK
File -> Add Sources -> Add or create design sources -> Next
-> Create File -> swdiobuf -> OK
-> Finish

2.5 SWD调试口
修改swdiobuf.v
添加以下内容:
module swdiobuf(
input swd_o,
output swd_i,
input swd_oe,
inout swd_io
);
IOBUF swd_iobuf_inst1
(
.O(swd_i),
.I(swd_o),
.IO(swd_io),
.T(~swd_oe) //
);
endmodule
S
318



被折叠的 条评论
为什么被折叠?



