-
Notifications
You must be signed in to change notification settings - Fork 0
/
blink.gpr
68 lines (51 loc) · 2.6 KB
/
blink.gpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
project Blink is
for Languages use ("Ada", "ASM_CPP"); -- ASM_CPP to compile the startup code
for Source_Dirs use ("src");
for Object_Dir use "obj";
for Main use ("blink.adb");
-- Compiler to use
for Target use "riscv32-elf";
-- generic ZFP run-time compatible with our MCU
for Runtime ("Ada") use "zfp-rv32imc";
-- We are building our own abstraction
package Compiler is
for Default_Switches ("Ada") use ("-gnatpg", "-march=rv32i", "-mabi=ilp32");
end Compiler;
package Linker is
-- Linker script generated by startup-gen
for Switches ("Ada") use ("-T", Project'Project_Dir & "/src/link.ld", "-march=rv32i", "-mabi=ilp32");
end Linker;
package Device_Configuration is
-- Name of the CPU core on the VexRiscv_Linux
-- for CPU_Name use "VexRiscv_Linux";
for CPU_Name use "riscv32";
for Float_Handling use "hard";
-- Number of interrupt lines on the VexRiscv_Linux. See: https://github.com/SpinalHDL/SaxonSoc/blob/dev-0.3/bsp/radiona/ulx3s/smp/include/soc.h#L64
for Number_Of_Interrupts use "0";
-- List of memory banks on the VexRiscv_Linux
-- for Memories use ("ROM", "SDRAM", "FLASH");
for Memories use ("ROM", "SDRAM");
-- Specify from which memory bank the program will load
-- We use SRAM since we are going to let uboot load the program
for Boot_Memory use "SDRAM";
-- for Main_Stack_Memory use "SRAM";
for Main_Stack_Size use "8K"; -- TODO: I have no clue
-- Specification of the SRAM
-- Information taken from: https://github.com/SpinalHDL/SaxonSoc/blob/dev-0.3/bsp/radiona/ulx3s/smp/linker/default.ld and https://github.com/SpinalHDL/SaxonSoc/tree/dev-0.3/bsp/radiona/ulx3s/smp
for Mem_Kind ("SDRAM") use "ram";
for Address ("SDRAM") use "0x80000000"; -- 0x80F80000 if not using uboot
for Size ("SDRAM") use "32M"; -- Theoretically until 0x80F00000 . 32MB since that is my model
-- Specification of the FLASH
-- for Mem_Kind ("FLASH") use "rom";
-- for Address ("FLASH") use "0x08000000";
-- for Size ("FLASH") use "1024K";
-- Specification of the MAIN_RAM
-- for Mem_Kind ("MAIN_RAM") use "ram";
-- for Address ("MAIN_RAM") use "0x40000000";
-- for Size ("MAIN_RAM") use "32M"; -- TODO: I have no clue
-- Specification of the ROM
for Mem_Kind ("ROM") use "rom"; -- Its has QSPI... But that is not really rom...
for Address ("ROM") use "0x00000000";
for Size ("ROM") use "64K"; -- TODO: I have no clue
end Device_Configuration;
end Blink;