adds bsp as submodule
This commit is contained in:
		
							
								
								
									
										2
									
								
								fw/hello-world/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								fw/hello-world/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,3 +1,3 @@ | ||||
| /hello | ||||
| /hello.dis | ||||
| /firmware.map | ||||
| /hello.map | ||||
|   | ||||
| @@ -1,17 +1,28 @@ | ||||
|  | ||||
| TARGET  = hello | ||||
| ISA?=imc | ||||
|  | ||||
| C_SRCS  = $(wildcard *.c)  | ||||
| HEADERS = $(wildcard *.h) | ||||
| CFLAGS += -O0 -g  | ||||
| OPT ?= -O2 | ||||
| CFLAGS += $(OPT) -g  | ||||
|  | ||||
| BOARD=tgfs-vp | ||||
| LINK_TARGET=flash | ||||
| RISCV_ARCH:=rv32i | ||||
| RISCV_ABI:=ilp32 | ||||
| LDFLAGS := -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) | ||||
| BOARD=tgc_vp | ||||
| LINK_TARGET=link | ||||
| RISCV_ARCH:=rv32$(ISA) | ||||
| ifeq ($(ISA),e) | ||||
|     RISCV_ABI:=ilp32e | ||||
| else | ||||
|     RISCV_ABI:=ilp32 | ||||
| endif | ||||
| LDFLAGS += -g -Wl,--wrap=printf | ||||
|  | ||||
| compiler := $(shell which riscv32-unknown-elf-gcc) | ||||
| compiler := $(shell which riscv64-unknown-elf-gcc) | ||||
| TOOL_DIR=$(dir $(compiler)) | ||||
|  | ||||
| TRIPLET=riscv64-unknown-elf | ||||
| BSP_BASE = ../bsp | ||||
| include $(BSP_BASE)/env/common-gcc.mk | ||||
|  | ||||
| $(TARGET).vlog:$(TARGET) | ||||
| 	riscv32-unknown-elf-objcopy -O verilog $(TARGET) $(TARGET).vlog | ||||
|   | ||||
| @@ -17,8 +17,6 @@ int factorial(int i){ | ||||
|  | ||||
| int main() | ||||
| { | ||||
|     *(uint32_t*)(GPIO_CTRL_ADDR+GPIO_IOF_SEL) &= ~IOF0_UART0_MASK; | ||||
|     *(uint32_t*)(GPIO_CTRL_ADDR+GPIO_IOF_EN)  |= IOF0_UART0_MASK; | ||||
| 	volatile int result = factorial (10); | ||||
| 	printf("Factorial is %d\n", result); | ||||
| 	printf("End of execution"); | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user